Copied


Uniswap: Everything You Need to Know

Kun Hu   Nov 04, 2020 09:13 4 Min Read


what is UniSwap?

UniSwap is a set of Ethereum smart contracts that implement automated liquidity providers. As a decentralized exchange, UniSwap inherits the benefits of blockchain and removes the drawbacks inherent in centralized ones including price manipulation, scam, security, and fake transactions. We can see the decentralized exchange as the third generation of the decentralized movement. UniSwap is one of the leads in decentralized movement by volume.

Who is UniSwap's founder?

 

UniSwap was written by Hayden Adams. After he was laid off from his first job out of college, working as a Mechanical Engineer at Siemens. Then Karl convinced him to focus on the Ethereum world. And he spent two months learning about the basics of Ethereum. You can read more on the official blog.

Automated Market Makers (AMM) 

UniSwap uses automated market makers (AMM) for liquidity problems. What behind the model is that as an incentive liquidity providers share revenue from cryptocurrency swap or transaction. There are two pricing models: order book and automated market maker (AMM). Almost all traditional exchanges, including centralized crypto ones, use order book. Due to efficiency reasons, there are only a few order book based Decentralized exchanges like IDEX and DDEX. Most decentralized exchanges use, including UniSwap AMM. But Bancor is the first decentralized exchange that implemented AMM.

Constant Product Formula (CPF) pricing mechanism

UniSwap uses a "Constant product formula" pricing mechanism. This is one of the major differences from other decentralized exchanges. In UniSwap, the constant product formula is simply a constant equation:  x * y = k. k is a constant value while x and y are the quantity of Ethereum and the quantity of another token respectively. Although the model is simple yet powerful and had proven to perform well by UniSwap. Alan Lu of Gnosis was the very first person to conceive of x*y=k market makers on Ethereum. For depth, read research paper “An analysis of Uniswap markets”.

The constant value k is fixed when the first liquidity provider provides x&y trading pairs and sets the initial exchange rate. To add liquidity, you need to deposit an equivalent value of x and y token at the current exchange rate, otherwise, there is an opportunity to being arbitraged.

In UniSwap V1, x must be Ethereum token ETH, In UniSwap V2, you can add an equivalent value of any ERC-20 and ERC-20 token directly. list from coingeco.

When one trades x for y, then the quantity of x increases and y decreases. then the price of x rises in comparison to y.

Fees

f you swap tokens, the network will charge you 0.3% as a swapping fee which immediately is deposited into liquidity reserves in form of liquidity tokens. When liquidity providers withdraw liquidity, they will get fees by burning liquidity tokens to remove a proportional share of the underlying reserves.

In UniSwap 2, it introduces a protocol fee to guarantee continuously growing and improving. This will be 0.5% and then the liquidity providers will get a reduced fee of 0.25% of 0.3%.

0.3% (Swapping fee paid by swapper) = 0.25% ( Swapping fee earned by liquidity provider) + 0.05 (Protocol Fees for management team)

UniSwap token UNI

You may has realized that UniSwap's uniqueness and that UniSwap lacked a token. On Sept 16, 2020, UniSwap token UNI was is live. Then popular crypto exchanges like Coinbase immediately announced the trading support of UNI token.

There are 1 billion UNI minted at the genesis and will be allocated in 4 years. After 4 years, UniSwap will generate UNI tokens from a perpetual inflation rate of 2% per year. The UNI smart contract address: 0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984.

The 1 billion genesis UNI tokens are distributed as follows (1) 60% to Uniswap community members and 25% of which (15% of total supply) were distributed to past users (2) 21.266% to team members and future employees (3) 18.044% to (4) 0.69% to advisors

The adding of UNI token to UniSwap is actually a result of pressure from SushiSwap, a fork project of UniSwap. SushiSwap was an overnight success project. The major difference SushiSwap has from UniSwap is that it added its own native token Sushi token as an incentive, especially for liquidity providers (LP). Since the birth of SushiSwap, it received lots of critics and interests from communities. Until now, we still don't know who is the real creator of SushiSwap. UniSwap founder Hayden Adams criticized SushiSwap by saying,

"Can't tell who is pretending and who legitimately doesn't understand that the $1B TVL deposited in an incredibly high risk investment on a single days notice is mostly massive whales. Anyone talking about community vs VC here is either delusional or intentionally misleading."

The secret of UniSwap token and other decentralized exchange tokens

Most decentralized exchanges, including UniSwap, now have native tokens. These tokens are in fact extra wealth out of "credit" which bitcoin tried to remove. All involved like founders, LP, and users will get "extra wealth" by receiving these tokens, thus maintain the ecosystem development of the project. As it is easy to create a new decentralized exchange by forking, there are many decentralized exchanges with their tokens.

Resources

Official website: https://uniswap.org

GitHub: https://github.com/Uniswap


Read More