Taihe Observation: Briefly describe the solutions to the existing problems of DEX
Along with the increasing trend of Dex development, issues like impermanent loss, slippage, front-running etc. disturbing users in Defi ecology, The following article will mainly discuss about those problems and existing solutions
Many people may not know that there is a DEX project that was almost called Unipeg, a portmanteau of Unicorn and Pegasus, but Vitalik proposed to change it to Uniswap. There are also many people who do not 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 at the level of one million, but today, one year later, the daily trading volume of DEX has reached billions. Accompanied by being questioned, gradually accepted, and now CEXs have set foot in decentralized exchanges, which shows that people's ideas have undergone tremendous changes within this year. After all, the surge in DEX trading volume only started in the third quarter of 2020. Anyone who knows DEX must know the problems of slippage and impermanent loss, and those who have used it are more likely to experience more problems involved in trading in a decentralized world.
Cross-chain interoperability
impermanent loss
Slippage
privacy protection
Cross-chain interoperability
impermanent loss
epilogue
impermanent loss
Impermanent loss (Impermanent loss) is a concept that was first proposed after the emergence of AMM. There is no need for an oracle machine, and the price difference between AMM and the market is smoothed out by arbitrageurs. Compared with buying equivalent bilateral assets and only putting them in the wallet, AMM will provide liquidity. When the market price changes, abnormal trading behaviors are automatically carried out, that is, the lower the price, the higher the price, the higher the price, and the higher the price, the higher the price, the higher the price. As a result, the value of the asset when withdrawn is lower than that in the wallet, and this difference is impermanent loss. In most cases, because the price fluctuation often does not return to the price of entering the liquidity pool, why are there still many people willing to provide liquidity? Because there are expectations for the currency price of liquidity rewards, coupled with income such as transaction fees, people are still willing to try to provide liquidity for the short-term riches of many copycat projects or the long-term upward trend of leading projects, that is, mining. It has to be mentioned that liquidity mining should coexist with value. Short-term profits can be expected, but there are many examples where the currency price of the empty mining pool returns to zero. No one wants to be a catcher. Therefore, it is a better choice to weigh the pros and cons and operate with your own expectations for the project. Secondly, when it comes to impermanence loss is an 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 to prevent arbitrageurs from smoothing out the price difference. Some DEX rising stars such as Cofix and Dodo chose to introduce oracles in order to reduce the problem of impermanence loss. This move can be said to have chosen a larger oracle risk exposure in the balance of pros and cons with the intention of reducing the impermanence loss exposure. The problem of oracle attack is not uncommon in the Defi world. Dodo’s PMM (Proactive Market Maker) is introduced in the active market The oracle feeds the price, and when the price fluctuates, the pool will actively fine-tune the price to ensure the stability and balance of the fund pool. Therefore, the dependence on the oracle and the accuracy of the price feed can also be imagined. Secondly, Uniswap’s capital utilization rate is also a major criticism, and Dodo’s PMM can imitate human behavior to gather funds near the market price, so even with only 1/10 of Uniswap’s liquidity, it can provide slippage similar to Uniswap.
Slippage
Slippage
Unlike impermanent loss, slippage is not a post-AMM concept. Unlike the 1-to-1 transaction in the order book mode, the price of AMM depends on the reserve of the fund pool, so the magnification of slippage for large transactions has become the fear of slippage.
image description

Data source: Curve whitepaper
image description

Data source: 1inch
privacy protection
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 still centralized exchanges, and centralized exchanges have KYC. That is to say, no matter whether there is a possibility of CEX leaking user information, user information is guaranteed. It is possible to be obtained by hackers. Dr. Xiao Feng, vice chairman of Vientiane Group, once expressed his emphasis on privacy protection at the 4th Global Blockchain Summit, and said that encryption algorithm + blockchain is its solution.
Front-running, also known as front-running transactions, is one of the major problems caused by privacy. Everyone knows that users need to pay gas when they conduct transactions, and transfer transactions will have different speeds based on the amount of Eth users are willing to pay. Large-value transactions usually cause slippage and increase prices, so some hackers use this mechanism to pay higher gas to buy a certain token before the large-value transaction is completed, and then sell the token after the large-value transaction is completed. Coins, a risk-free arbitrage can be completed in a few minutes or even seconds. A similar situation also occurs in flash loans. Hackers can copy other people's flash loan arbitrage strategies and make transactions before others. The story of front-running transactions is a long story, and the order in which Ethereum miners arrange transactions when building blocks determines the order in which transactions are executed. In fact, this kind of arbitrage robot does exist and is very intelligent. The trigger mechanism and operation method are also vary.
Based on the solution to such problems, 1inch chose to develop the private transaction function. Hackers can get ahead because people can obtain upcoming transactions in advance, and 1inch's private transaction function can shield transactions in the liquidity pool from being obtained in advance. Secondly, transactions on the Ethereum chain are selectively packaged by Ethereum miners, and another privacy transaction function of 1inch can directly send transaction information to 10 miners. As long as the gas is not too low, miners usually choose to package. Not only has there been a breakthrough in transaction speed, but it has also provided protection for private transactions.
Cross-chain interoperability
Cross-chain interoperability
In addition to the above problems, the current Ethereum DEX can only support the exchange of ERC-20 tokens. Compared with centralized exchanges, transactions are unified on the order book, and many decentralized public chains are currently unable to conduct transactions. This is why there are concepts such as WBTC that introduce BTC liquidity, but assets on other chains other than BTC How to trade it.
secondary title
Ethereum transfer fees
We all know the existing problems of Ethereum, the gas fee can be several times higher than 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 Layer 2 expansion solutions, but with so many existing expansion solutions, why is the Ethereum network still so congested? The reasons are, firstly, for the project side, the completion of the migration will involve a large number of code changes, which will incur a lot of expenses such as audit and maintenance, and secondly, for the users, there are certain challenges in switching costs and operational difficulty.
image description

Data source: ZKSwap
image description

epilogue
epilogue
image description


Data as of 2021.2.5
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
Dev@12lab.org. (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


