TokenPocket CTO Chen Invited to a Streaming Conference, Sharing Insights on Uniswap
Source: Guowei Finance
Theme：Uniswap — Simplified Trading and Decentralization at the Extreme
Strategic sponsors：Guowei Finance × CoinW × ChainCapital × TokenPocket × CZZ Tech Community×Consensus Lab
Guests：Zha (CoinW CEO Sabstian), Su (ChainCapital Analyst), Chen (TokenPocket Co-founder), Peng (CZZ Tech Community), Yu (Consensus Lab analyst)
Speaker: Chen (TokenPocket Co-founder)
Uniswap achieved a transaction volume of $28,000,000 in the last 24 hours. According to CoinMarketCap, this number is around half of Gate.io ($54,000,000) and one-third of Bitfinex ($84,000,000). With such a high volume of daily transactions, Uniswap is indeed more popular than most decentralized exchanges.
Let me give you a brief introduction on Uniswap first. We have several keywords: Constant product, automatic market-making, censorship-free token-listing, token-to-token swap.
Unlike the pending order mechanism adopted by most exchanges, Uniswap uses a token-to-token swap method. How many B tokens can a certain amount of token A exchange for depends on the proportion and quantity of the two tokens that liquidity providers injected to the liquidity pool.
- Exchange rates for an ERC20 token are calculated based on an equation:
x * y = k. The exchange rate of a token will always be at a particular point lying on the resulting curve of this equation.
kis a constant value that never changes, whereas
yrepresent the quantity of Token A and Token B available in a particular exchange that ultimately determines the exchange rate.
Any user can contribute to liquidity pools for any ERC20 token, and therefore gain commissions in the form of exchange fees for doing so, with a certain degree of risk of course. It’s worth mentioning that Uniswap does not charge any fee throughout the process.
If you want Uniswap to support the trading between two tokens, you achieve so by creating a liquidity pool and add tokens to it, which is completely permissionless.
For example, I created a liquidity pool for ETH and ABC, and put 10 ETH and 1000 ABC in it. Now the exchange rate of ETH and ABC follows 1000 ABC = 1 ETH. If a trader wants 5-ETH worth of ABC, according to the following Constant Product Principle,
10 * 1000 =（10+5）* (1000 — X)
X stands for the quantity of ABC that the trader will get, which is 333 in this case. Now, there are 15ETH and 667 ABC in the liquidity pool and the price of ABC raised to 44 ABC=1 ETH。
It’s not hard to tell that a high price slippage may occur when the liquidity is low, which is also why some tokens increased tenfold or even hundredfold in price recently.
Uniswap has the following main advantages and adoption scenarios thanks to its characteristics and utilization,
- Very suitable for small and quick token-to-token swap
- Meet the needs of token issuance by small teams
- Perfect for tradings that don’t require registration and authorization
- Enrich the variety of tools thanks to its open database
The fourth point I mentioned above is quite useful and interesting. Developers can conduct data analysis, like every transaction on-chain, and make some rather powerful and practical DeFi DApps.
However, Uniswap has its challenges:
- Not suitable for big transactions, as it highly depends on liquidity and has high slippage.
- Makes it easier to do evil, as there it doesn’t require any verification process.
Overall, Uniswap is an addition to decentralized exchanges, without the capability to fully replace the pending order mechanism. The two may merge into one in the near future, which is not technically complicated.