From impermanence loss to gas fee, briefly describe the solution to Dex's existing problems

in hive-110112 •  4 years ago 

Original title: "Taihe Observation丨A Brief Introduction to Dex's Solutions to Existing Problems"

Maybe many people don't know that there is a DEX project that is almost called Unipeg, a hybrid word of Unicorn and Pegasus, and Vitalik proposed to change it to Uniswap. There are also many people who don't know that X*Y=K market making was first proposed by Alan Lu of Gnosis to predict the market. In January 2020, the daily trading volume of DEX was only one million level, and today, one year later, the daily trading volume of DEX has reached billions. As CEX has stepped into decentralized exchanges from being questioned, gradually accepted, and now, it shows that people's concepts have undergone tremendous changes in this year. After all, the huge increase in DEX trading volume is only the beginning of the third quarter of 2020. Presumably people who know DEX know the problems of slippage and impermanence, while those who have used it are more likely to experience more problems involved in trading in a decentralized world.

This article will discuss various issues of DEX based on the following context:

  • Impermanence loss
  • Slippage
  • privacy protection
  • Cross-chain interoperability
  • Ethereum transfer fees
  • Conclusion

Impermanence loss

Impermanent loss is a concept that was first proposed after the emergence of AMM. There is no need for an oracle. The price difference between AMM and the market is smoothed by arbitrageurs. Compared with buying equivalent bilateral assets only in the wallet, AMM will provide liquidity. When the market price changes, abnormal trading behavior is automatically carried out, that is, the lower the price, the higher the price, the higher the price, which will cause the asset value at the time of withdrawal to be lower than that in the wallet, and this difference is impermanent loss. In most cases, due to price fluctuations, the price of entering the liquidity pool is often not recovered, so why are many people willing to provide liquidity? Because of the expectation of the currency price of liquidity rewards, coupled with the benefits of transaction fees and other benefits, people are still willing to try the short-term wealth of many copycat projects or the long-term upward trend of leading projects to provide liquidity, that is, mining. I have to mention that liquid mining should coexist with value. While short-term gains can be expected, there are many instances where the price of the mined mining pool has returned to zero, and no one wants to become a receiver. Therefore, it is a better choice to weigh the pros and cons in combination with your own expectations of the project. Secondly, when it comes to impermanence loss is the inherent attribute of AMM, presumably many people also have expectations on how to reduce impermanence loss.

Since AMM does not have an oracle and relies on constant function curve pricing, why not introduce an oracle and not give arbitrageurs a chance to flatten the price difference. Some DEX rising stars such as Cofix, Dodo chose to introduce oracles in order to reduce the problem of impermanence loss. This move can be described as choosing a larger oracle risk exposure in weighing the pros and cons and intends to reduce the impermanence loss exposure. The problem of oracle attacks is common in the Defi world. Dodo's PMM (Proactive Market Maker) actively introduces market making. The oracle feeds the price, and when the price fluctuates, the pool actively fine-tunes the price to ensure the stable balance of the fund pool. Therefore, the dependence on the oracle and the accuracy requirements of the price feed can also be imagined. Secondly, the utilization rate of Uniswap's funds is also a big criticism, and Dodo's PMM can imitate human behavior to gather funds near the market price, so even if only Uniswap 1/10 of the liquidity can provide similar slippage to Uniswap.

Looking at the market share of Uniswap, from 30%-40% in July 2020 to 60% of Uniswap+ Sushiswap in 2021, it has been steadily increasing. Although there are solutions for impermanence loss in the market, the effect is not Obviously, the lock-up volume and transaction volume seem to tell everything.

Slippage

Unlike impermanent loss, slippage is not a concept that appears after AMM. Unlike the order book model of one-to-one transactions, the price of AMM depends on the fund pool reserve, so the slippage of large transactions will be amplified, which has become the fear of slippage.

When it comes to the solution of slippage, you have to mention Curve, which is known for its low slippage. CRV's currency price performance in the early 2021 can be described as earning enough attention. The combination of constant product and constant sum solves the problem of slippage. From the figure below, it can be seen that the curve (blue) is very smooth in a large area, that is to say, it slips in this area. The point is very small, so the Curve mechanism requires the exchange of currencies with relatively stable currency prices to ensure that the slippage is extremely small, which is a stable currency. Recently, Curve announced that using Synthetix as a bridge can achieve cross-asset transactions, which means that stablecoins can be directly exchanged for Wrapped BTC. Although cross-assets can be exchanged through different paths for DEX, the slippage when combined with Curve is extremely low. The characteristics of being extremely friendly to large transactions can be said to be a great improvement.

Data source: Curve whitepaper

In addition to Curve, I have to mention 1inch. As the leading DEX aggregator, its split transaction method will divide the user's large transaction into multiple parts and go to different exchanges for trading as shown in the figure below. It is well known that different DEXs will have different quotations due to the depth of the capital pool, market-making mechanism and fees. In the picture below, Dai-WBTC's million-dollar transaction will eventually get WBTC through 3 different paths and various mainstream exchanges, effectively finding the best exchange rate and the lowest slippage.

Data source: 1inch

Another solution is the virtual balance concept proposed by Vitalik, which has been implemented in Mooniswap, the AMM market maker under 1inch. When a transaction occurs, AMM will not move the prices of buyers and sellers at the same time to create arbitrage opportunities. Instead, it will make the purchase and sale move asymmetrically, which means that the automatic market-making behavior of AMM will experience a delay. Slowly increase the arbitrageur’s exchange rate within 5 minutes (the time is determined by the community’s voting). As a result, the arbitrageur can only capture a part of the slippage income, while the other part of the slippage income will still be obtained from the fund pool. The concept of virtual balance It can not only reduce slippage loss, but also a weapon to prevent Front-running.

privacy protection 

A major feature of the Defi ecosystem is that there is no KYC. However, most of the fiat currency channels of decentralized wallets are centralized exchanges, and centralized exchanges have KYC, which means that regardless of whether CEX may leak user information, user information is It is possible to be obtained by hackers. Dr. Feng Xiao, the vice chairman of Vientiane Group, once expressed the importance of privacy protection at the 4th Global Blockchain Summit, and said that encryption algorithm + blockchain is its solution.

Front-running, also known as pre-running transaction, is one of the major problems caused by privacy. When users conduct transactions, they need to pay gas. Everyone knows that transfer transactions will have different speeds based on the amount of Eth that users are willing to pay. Large transactions usually cause slippage and increase prices, so some hackers use this mechanism to pay higher gas to preemptively buy a certain token before the large transaction is completed, and then sell the token after the large transaction is completed. Currency, a risk-free arbitrage can be completed in a few minutes or even a few seconds. A similar situation also occurs in flash loans. Hackers can copy the flash loan arbitrage strategy of others and make transactions before others. The story of preemptive transactions is a long story, and the order of transactions when Ethereum miners construct blocks determines the order of transaction execution. In fact, such arbitrage robots do exist and are very intelligent, and the trigger mechanism and operation methods are also Each is different.

Based on the solution to such problems, 1inch chose to develop the privacy transaction function. The fact that hackers can get in early is that people can obtain upcoming transactions in advance, and 1inch's privacy transaction function can block transactions in the liquidity pool from being obtained in advance. Secondly, transactions on the Ethereum chain are selectively packaged by Ethereum miners, while another privacy transaction function of 1inch can directly send transaction information to 10 miners. As long as the gas is not low, excessive miners usually choose to package. Not only has there been a breakthrough in transaction speed, it also provides protection for privacy transactions.

Another concept related to privacy protection is Manta. Manta is a decentralized exchange that supports cross-chain and protects privacy. Transactions are realized through ZK-Snark technology, and ZK-snark can now be completely anonymous from end to end. The sender can prove the legitimacy of the transaction to the verifier without revealing the transaction amount, address and other details. Second, a fast consensus protocol can provide a user experience with the best privacy protection properties, and Polkadot's GRANDPA consensus protocol is one of the fastest consensus protocols currently. Privacy is a major trend from 2021 onwards, and Manta is a good choice for institutional users and users who require privacy.

Cross-chain interoperability

In addition to the above problems, the current Ethereum DEX can only support the exchange of ERC-20 tokens. Compared to centralized exchanges, transactions are all unified in the order book. Many decentralized public chains cannot currently be traded. This is why the concept of BTC liquidity is introduced such as WBTC, which can be used for other assets on the chain except BTC. How to trade it.

Regarding cross-chain solutions, Polka and Cosmos are the most popular ones. ETH2.0 can be said to be a day without landing, and the new public chain will have a lot of room for hype. With the progress of the parachain slot auction, the expectations of many projects in the Polkadot ecology and even the Kusama ecology have gradually been enlarged. In addition to the Polkadot-based Manta mentioned above, I believe many people have also noticed the nearly four times the currency price performance of AVAX in one month. As the first Dex project in the ecology, Pangolin can achieve sub-second speed and as low as a few US dollars. The cost of cents comes from various cryptocurrencies based on the Avalanche Protocol or Ethereum. Sifchain on Cosmos will carry out cross-chain integration for 20-25 public chains including Ethereum. To minimize the cost of cross-chain integration in terms of capital and developer resources, it is said that its TPS can reach 100 times that of Ethereum, and the transaction fee can be as low as $0.1·. Now there are no projects that dare to clamor for the killer of Ethereum, and we have not personally experienced the transaction fee of 0.1 USD, so why don't we quietly expect these projects to land?

Ethereum transfer fees

It is well known that the existing problems of Ethereum, gas fee can be several times as much as usual when the network is congested, and the transfer fee of tens of dollars is extremely unfriendly to many retail investors. When the network is congested, not only the gas is high, but the transmission speed is also very slow. At this time, many people may think of the Layer 2 expansion plan, but why the Ethereum network is still so congested with so many existing expansion plans? The reason is that firstly, for the project party, the completion of the migration will involve a large number of code changes, which will cause a lot of expenses such as audit and maintenance. Secondly, for users, there are certain challenges in switching costs and operational difficulties.

As for the recent Layer2 ZKRollup solution ZKSwap, I believe many people have experienced its silky experience. ZK-Rollup is currently one of the two hotter Layer-2 expansion solutions. Compared with other expansion solutions, ZK-Rollup has huge advantages in terms of safety, economy, TPS and availability. All transactions take place on Layer 2 to avoid the generation of Gas fees (as shown in the figure below). TPS is a hundred times higher than Ethereum, and real-time transaction users no longer need to wait for a block to be confirmed. The'run test' is also very interesting.

Regarding the high gas cost, I have to mention 1inch again. Its Chi gas Token released in June 2020 uses the Ethereum storage refund mechanism. Simply put, users can buy and store when the gas price is lower. And when the gas is high, the gas refund can be obtained by destroying it to offset part of the expenditure. According to official data, Chi Gas Token can save users up to 42% of gas costs. According to Dune Analytics statistics, about 6 million Gas Tokens have been destroyed since then. As of October 2020, it has saved users about US$2 million in gas fees as shown in the figure below. Show.

Data source: Dune Analytics

Conclusion

Comparing the one-million-level average daily trading volume of DEX at the beginning of 2020 to the one-billion-level average daily trading volume at the beginning of 2021, the one-hundred-fold increase in this year is also accompanied by the decline of early head exchanges such as Kyber, and more Rising DEX stars such as Sushiswap, 1inch, Curve. Presumably, the competition in the head DEX will only become more intense in 2021. Will Uniswap's leading position be tested? Can SushiSwap use the AC ecosystem to step out of micro-innovation? Will Layer2 Dex have a share in the DEX market? Will Polkadot's landing? The emergence of interoperable privacy transactions such as Manta, and whether the aggregator track will become the future traffic portal will allow users to interact with various aggregation front ends instead of interacting with the fund pool. These are things that can be expected in the future.

Reference:

0x88. (2021,Jan,5). URL: BlockBeats: https://www.theblockbeats.com/news/19630

Anton BukovMelnikMikhail. (2020,Aug,10). Mooniswap. URL: https://mooniswap.exchange/docs/MooniswapWhitePaper-v1.0.pdf

[email protected]. (2020,Feb,2). ZKSwap Whitepaper. URL: zks.org

EgorovMichael. (2019,Nov,11). StableSwap-efficient mechanism for Stablecoin. URL: https://www.curve.fi/stableswap-paper.pdf

KonstantopoulosRobinson, GeorgiosDan. (2020,Aug,29). Ethereum is a Dark Forest. URL: medium: medium.com/@danrobinson/ethereum-is-a-dark-forest-ecc5f0505dff

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!
Sort Order:  

This post was resteemed by @steemvote and received a 9.7% Upvote. Send 0.5 SBD or STEEM to @steemvote