DEX 7 years: the road to Uniswap

avatar

After the popularity of DeFi in 2020, many investors only paid attention to DEX like Uniswap. In fact, Uniswap is not the first DEX, in fact it has been in development for more than 7 years. The earliest DEX was born on the Bitcoin network. This Hardcore edition focuses on the evolution of DEX over the past 7 years, how to expand from Counterparty on Bitcoin to IDEX, decentralized exchange as thin as orders on Ethereum, and then to Uniswap under the AMM mechanism. BitMEX Research's "Battle of DEX".

Abstract: We study a brief seven-year history of decentralized exchanges (DEXes), including the first major iteration of technology, Counterparty. We examine the reasons for the failure of these early attempts, how they developed into the current Uniswap agreement, and Uniswap's genius mechanism for introducing and managing liquidity. Also studied Uniswap, copycat and how he got a position in the DeFi field. We conclude that the DeFi fever is largely due to unsustainable price bubbles and aggressive token issuance arrangements, fueling speculative demand. However, under the frenzy of unsustainable speculative and interconnected and complex DeFi platforms, we thought there might be technology that could bring about sustainable development. Non-custodial trading, leverage,

Foreword

As of January 2019, the concepts of a decentralized exchange (DEX) and a decentralized stable currency are intertwined to some extent. Should be considered as the two holy grails of financial technology. More specifically, the objective of a decentralized exchange or stable currency is quite simple and concise, namely to ensure that the system is not suspended in the face of regulatory pressures. If these systems could truly function, even the most skeptical of people would have no doubt about their potential transformative effects. A rational criticism of decentralized exchanges may be that they cannot work strongly.

For the blockchain system and its tokens, DEX is of course technically feasible. Since all tokens are native to the blockchain, a centralized order book and clearing mechanism can be used to create exchanges on the blockchain. This can be done on Bitcoin (eg Counterparty) or Ethereum. The main challenges are scalability, liquidity, availability, and ensuring the fairness of the exchange. This report will focus on the DEX without cross-chain functionality. DEXs looking to implement asset transactions on multiple blockchains or non-encrypted assets (such as US dollars) are another separate topic.

Counterparty

In 2013, Mastercoin is widely considered to be the first ICO in the DEX field. The goal of the project is to become an agreement to issue tokens on Bitcoin. The Mastercoin protocol basically interprets additional bitcoin transaction data as issuing or spending additional tokens. It established the Mastercoin Foundation to manage the proceeds from the ICO. However, the community opposed the founding of the foundation, believing that some people would have the privilege of managing and controlling the funds, which was unfair.

Therefore, in early 2014, a competition project, Counterparty, was founded. It has the same purpose as Mastercoin and has issued XCP tokens. Mastercoin token is MSC. The difference is that the Counterparties do not conduct an ICO. An ICO requires a small team to manage funds. The counterparties adopt "burn proof". Bitcoin is sent to an unusable address. The initial distribution of XCP tokens It's up to the person who burns the most bitcoins. This avoids disputes. Perhaps due to the issuance of "fairer" tokens and the hard work of lead developer Adam Krellenstein, the Counterparty protocol has managed to become the dominant token issuing platform in this area. To create new tokens, XCP tokens must be paid. But beyond that, their use is limited.

Counterparty is becoming the most popular crowdfunding platform in the industry. If an entrepreneur or developer wants to launch a new token via crowdfunding, Counterparty is the platform of choice. For nostalgia purposes, here are some examples of popular tokens issued by Counterparties:

Storj: The first token of the "decentralized cloud storage" platform, and after that issued another token on Ethereum.

LTB: Tokens are given to listeners for the popular "Let's Talk Bitcoin" podcast. After the ICO bubble in 2017, tokens were finally exchanged for new POET tokens.

FoldingCoin: A token used to reward those who donate computing power to folding DNA to study disease.

GetGems: The native token for instant messaging and Bitcoin wallet app.

BitCrystals: A token that rewards participation.

Swarm: Token for a new crowdfunding platform.

Screenshot of Counterwallet showing multiple token balances, source: You Tube

Issuance token swarm

There are several other examples of tokens. These tokens include Football Coin and Blockfreight (transportation and logistics tokens), which were pioneers of the messy token in the 2017 ICO boom.

Apart from tokens, Counterparty also quickly developed more technology pioneers, which later became popular on Ethereum, including gambling. In gambling, third-party oracle machines release sports game results, and users can bet on the results of games on the Bitcoin blockchain, and even place bets. We still remember that using the Counterparty platform to bet on the results of the FIFA World Cup in Brazil in 2014, we managed to leave the traditional sports betting platform held. Counterpary also quickly implemented other functions, such as paying dividends to token holders and using the platform to play the game "rock, scissors, cloth".

The most fun and interesting feature is undoubtedly Counterparty DEX. All Counterparty tokens can be traded on DEX based on the Bitcoin network. Bitcoin transactions contain additional data, and the Counterparty protocol can interpret this as a buy limit order (bid), limit sell order (offer), or cancellation order. If the Bitcoin block contains the corresponding bid and offer prices, the agreement considers executing the transaction. At that time, people were very excited about using DEX, as if this was the future.

Screenshot of Counterwallet DEX

DEX counterparties failed to attract people

The opposing DEX failed to gain clear traction. We believe there are five main reasons:

User experience: The user experience is not good, especially the Bitcoin blocking interval is 10 minutes, which means the user has to wait several minutes after performing an action such as submitting an order before it can appear in the order book.

Lack of liquidity: Dex liquidity is very low, and people have no incentive to become market makers. At the same time, adjusting orders is a time-consuming and arduous process. In order to maintain a liquid market with small spreads, market makers have to carry out complex and high-risk on-chain processes. Market makers also face the risk of miners executing orders in advance. Often times, liquidity is basically running out.

Scalability: At that time, Bitcoin transaction fees became increasingly expensive, especially for large counterparty transactions. Counterparty transactions could be multi-signature transactions or OP_Return transactions which would later be used. Ordering alone costs a lot, maybe just a dollar, but it might be a huge burden for some.

Bitcoin Culture: Cultural issues may be more important than scalability. Some people in the Bitcoin community do not welcome this kind of on-chain activity. They believe that Bitcoin is more important than all these "joke tokens", and many communities believe that these tokens will increase verification fees, increase transaction fees or cause false incentives. In our opinion, it is this cultural concept that drives a lot of token issuance and dex-type activity to Ethereum, not technical factors.

Timing: The ecosystem and habitat were too small at that time, and the time for DEX development had not yet arrived. Many community members are still familiar with some of the more basic concepts, such as transaction confirmation.

Mastercoin eventually changed its name to Omni, and the old Mastercoin tokens were no longer used. Later, USDT was issued in the Omni layer, which was a huge success. And the Counterparty becomes irrelevant. Given the recent success of DEX on Ethereum and its relatively high fees, it might be an interesting idea to implement Bitcoin DEX on-chain at Omni and allow USDT / BTC transactions.

IDEX

The first generation of Ethereum DEX emulated Counterparties to some extent. Because in terms of value, most of the altcoins are now issued on Ethereum rather than Bitcoin, so developers have no choice but to choose Ethereum as their DEX platform. Although this situation is changing now, there are also trading pairs such as WBTC and USDT which are popular on the "DEX", but tokens with a centralized custody can theoretically exist on any platform. We believe that the most famous and popular DEX on Ethereum used to be IDEX. We talk about this in our January 2019 article.

Like Counterparties, buy orders, sell orders, and cancel orders are all sent to the Ethereum blockchain to form a decentralized order book. However, to solve user experience problems, the order is first sent to the IDEX server, IDEX adds its signature to the transaction, and then broadcasts it to the Ethereum network. This means that the user must trust a centralized entity to determine the sequence of events, but transactions are still non-custodial. We believe that IDEX is basically a non-custodial exchange, not DEX, but it is still an attractive achievement and business model. Likewise, exchanges such as these have failed to generate any clear market appeal. The main problem is that it is difficult to generate liquidity.

Uniswap

The next DEX protocol was Uniswap, which ended up being a case of phenomenal success after years of trial and error, and the trading volume was enormous.

To create a market on Uniswap, market makers lock tokens in an Ethereum smart contract, and each trading pair has a separate pool of funds. Encourage market makers to ensure that the two tokens in the liquidity pool are allocated 50:50 according to the token value. Then the price between the two tokens is calculated by the number of tokens locked in the liquidity pool. For example, if the fund pool contains 4000 USDT and 10 ETH, the price of ETH is 4000/10 = 400. In short, this $ 400 is the price at which the smart contract allows ETH to be exchanged for US dollars, of course for a small amount of exchange.

This simple, clever and sensible mechanism encourages liquidity providers to ensure that the value of two tokens in the liquidity pool remains 50:50. If the market price of one of the tokens changes and the market maker does not adjust the size of the liquidity pool, the trader can arbitrage by buying the token at a price lower than the market price. Returning to the example in the previous paragraph, if the ETH price suddenly drops to $ 200, the trader will be incentivized to use the smart contract to exchange ETH for USDT, thereby reducing the ETH in the contract and adding more USDT to the contract until the value is proportional. This reaches 50 : 50 again.

The above methods can be carried out to some extent, but liquidity issues, slippage and large orders need to be resolved. Uniswap was created to solve the liquidity problem, the core working principle behind it is related to the y = 1 / x curve, and find the point on the curve that maximizes the area under the curve. The x and y axes represent the amount of each token in the liquidity pool. Only after the exchange, the area under the curve is larger than the area before the exchange (including the impact of the 0.3% handling fee, which has been added to the liquidity pool), the transaction is executed.

As the above situation shows, the bigger the amount the trader is willing to exchange, the bigger the slip the trader will experience. This system means that there are no orders, only a pool of two tokens, and this alone is sufficient for trading. This is much easier than frequently using blockchain to customize orders. Under normal market conditions, there are no sharp price fluctuations. Market makers only need to provide liquidity to the pool and rely on other liquidity providers to add and remove tokens from the pool. Therefore, not all market makers need to adjust orders, thereby greatly reducing tedious and expensive blockchain operations. This clever mechanism basically solves some of the liquidity and scalability issues listed above related to Counterparties, and at least partially solves availability issues to some extent. Ethereum's block interval is faster, only 15 seconds. Therefore, we believe that Uniswap is a strong and innovative protocol, real DEX.

Uniswap impersonators

As of September 2020, Uniswap has not issued any tokens. All 0.3% transaction fees are paid to liquidity providers. Of course, there are other models, such as a 0.25% fee for liquidity providers and a 0.05% transaction fee for agreement token holders. Tokens can also be partially distributed to protocol users, users can store tokens and encourage users to use more of the protocol. The facts prove that this kind of token incentive model is very popular in the DeFi field. Tokens are issued according to certain activities, and token holders will be charged. Although this model is very popular, it also shares many features common with Ponzi schemes, and causes very unstable usage patterns of many Ethereum smart contracts. Many of these tokens have aggressive initial issuance arrangements,

However, Uniswap does not have a token that provides an opportunity for copycats. They can use the Uniswap method when issuing native tokens. The copycat original token will incentivize more people to use it and gain market share from Uniswap. For example, TukarSushi.

SushiSwap

Uniswap Tokens

Due to the appearance of the Yi series DEX copycats, they are usually named food, which causes the Uniswap team to react. In September 2020, they announced the launch of a Uniswap protocol token called UNI. Tokens will be issued in four years, with a total supply of 1 billion, and around 150 million tokens will be issued to Uniswap smart contract users. As of now, UNI token holders have not received any financial benefits, but they can choose to give themselves the right to collect future transaction fees.

The Uniswap team received 21% of the tokens. This can be a problem, especially in the case of DEX. The focus of the DEX appears to be sensor resistance. For example, anyone can build an exchange without worrying about being cracked down by regulators or implementing KYC. In theory, the Ethereum smart contract developer can lock the contract so that it is no longer possible to make changes and therefore cannot control the transaction, making it a DEX. However, if the developer brings their own financial gain by issuing tokens for themselves, regulators can monitor these people in the same way as centralized transaction owners, and can sanction them.

Since the inception of Mastercoin in 2013, we have always held the following point of view. Token issuance is good, but token distribution to team members or advisors and the organization centrally manages revenue from token issuance, which represents a significant reduction in integrity and regulatory risks. But perhaps this view is outdated and irrelevant to today's environment.

Even if the team has allocated tokens for itself, Uniswap is still very different from a centralized exchange. First, it is very important that this is non-custodial; second, the components of the clearinghouse system have been decentralized to some extent. For example, there is no need for a centralized IT infrastructure. Most people will use the Uniswap application on a website instead of manually interacting with a smart contract, which is probably owned and controlled by the same team that issued the token. If the ownership and control of these components (such as team tokens and website applications) were more diverse, this could make Uniswap more resilient.

DeFi boom recently

Recently, DeFi has achieved tremendous growth. DEXs like Uniswap have been key to DeFi's success. Uniswap can almost be considered the lowest layer of DeFi. Of course, the recent DeFi boom has been driven primarily by speculation and a desire for financial gain. According to the DeFi boom development, we can divide it into four stages. The last three stages happen very quickly:

DEXs (2018/2019): Uniswap was launched at the end of 2018, and the agreement has been developing slowly and steadily into 2020. Uniswap allows liquidity providers to obtain substantial financial benefits without having to assume custody risks.

Combining multiple protocols to achieve decentralized leverage (2020): A major event in DeFi's growth was the release of the Compound protocol. This system allows users to borrow and lend assets on Ethereum. We believe that the reason Compound is so popular is because it can combine lending and DEX to increase leverage and gain speculative profits from price changes. For example, you can lend ETH to Compound and borrow Dai, then use Uniswap to swap Dai back to ETH, then lend ETH to Compound again. Repetition can occur several times. Thus using multiple DeFi protocols to increase leverage. While this increases system risk and can lead to large-scale liquidations, falling prices, and severe chain congestion, leverage can be an integral part of financial markets. We believe that people should not be too harsh in their use.

Yield Farming (2020) based on new token issuance: The next wave of expansion comes from DEX and other layers of loan agreements. The DeFi project creates tokens and distributes them to users, thus providing a higher rate of return, namely the so-called "yield farming". Again, this boom was driven primarily by speculation and made money growing these tokens. This stage is highly dependent on the increase in the token price and can be considered unsustainable.

"Auto" investment strategy (2020): Located at the last level at the top of the DeFi pyramid, we classify it as an "auto" investment strategy that maximizes profits. Create a structure similar to an investment fund, participate in multi-layer yield farming, loans, transactions and DEX liquidity for financial gain. Then issue another set of tokens to do this process. A typical example is YFI.

Relevant complexity at the DeFi level

Ethereum scalability and transaction fees

Enthusiasm for speculative activity on the Ethereum network, and the desire to invest in new tokens, have led to soaring fees on the chain. Transaction fees prove to be very inelastic as traders are eager to stay ahead of their peers and are willing to pay high prices for confirmation. Ethereum's total transaction fees are now higher than Bitcoin. One Ethereum protocol such as Uniswap generates nearly the same transaction fees as Bitcoin over a period of time. While costs have gone up, network availability has also decreased, as users typically have to wait a long time before they can confirm. Transactions often crash and require additional fees. Due to high transaction fees, some projects are even releasing  Ethereum because this makes their project economically unfit.

Unilogin announced it would be closed due to high gas costs

Apart from high fees, Ethereum node operators are also trying to stay ahead of time. Even if we are using a high-end 64GB RAM computer, when running Geth, it is often difficult to achieve the best conditions, and it is often 5 to 50 blocks behind. Ethereum is at its limit when it comes to verification fees and on-chain fees. Of course, Bitcoin avoids this problem. Many people in the Bitcoin community realized years ago that it was impossible to get all three at the same time if the blocks were large enough, the chain was effectively extended, and censorship resistance was maintained. These people no doubt said: I have told you ...

However, the Ethereum community will certainly not regret the great success they have achieved at DeFi. The difference between the two Bitcoin and Ethereum communities lies mainly in the culture. They had very different timing expectations, so they had different priorities in the trade-off between endurance and experimentation.

The conclusion

Uniswap is an interesting, ingenious and successful invention. Of course to make it really attractive, it actually takes a token on Ethereum to be useful and worthy of trading and investment. There are custodial tokens (such as USDT, DAI, and WBTC) that represent the US dollar or Bitcoin in Ethereum, but if the assets are controlled by a centralized custodian, people will lose most of the benefits of DEX. On the other hand, at least in the medium term, breaking the DEX into separate parts (only one centralized) can increase platform flexibility. Therefore, we believe that even though the main tokens on DEX are USDT and WBTC, DeFi is still quite attractive.

As for DeFi, it appears to be a very complex network of interconnection protocols as well as a speculative frenzy, driven primarily by the issuance of new tokens, which we believe is unsustainable. It has a lot in common with the 2017 ICO bubble.But, at least for us, hidden in the depths of all this complexity, madness and experimentation, at least at the bottom of the DeFi pyramid, there are some things that are brilliant and on going. This is something we didn't feel during the ICO bubble. Perhaps before the token was issued, Uniswap was probably the best example.



0
0
0.000
3 comments
avatar

Source
Plagiarism is the copying & pasting of others' work without giving credit to the original author or artist. Plagiarized posts are considered fraud and violate the intellectual property rights of the original creator.

Fraud is discouraged by the community and may result in the account being Blacklisted.

If you believe this comment is in error, please contact us in #appeals in Discord.

0
0
0.000