The Basic Understanding & Working Of Uniswap

Basic Understanding & Working Of Uniswap

The Basic Understanding & Working Of Uniswap

Uniswap is a decentralised exchange trading protocol with reference to the automated provision on the Ethereum blockchain platform. It facilitates its service for the developers, liquidity providers and traders while enabling them to participate in a financial marketplace which is open and accessible to everyone. It utilises the ERC20 tokens while any user can swap, add or list tokens with Uniswap.

Uniswap is an open-source automated liquidity protocol that has been written on the Vyper smart contract, it is one of the most known AMM - Automated Market Maker exchanges since the launch of Uniswap’s V1 in November 2018. 

Uniswap is powered by a constant product formula and executed in the system of smart contracts on the Ethereum blockchain. It is built on the base of the following factors: censorship-resistance, trusted intermediaries, security, and decentralization.

Uniswap was created by Hayden Adams who was inspired to create and implement protocols because of a post made by the founder of Ethereum - Vitalik Buterin.

Working of Uniswap

The protocol of Uniswap powers a marketplace that is decentralized of the trading pairs wherein the pair consists of reserves including two tokens based on the equal ratio of a 1:1, while the pairs are managed by Uniswap contracts, thus the model mentioned enables any user to be an LP - Liquidity Provider. Meaning each uniswap smart contract or the pair manages a liquidity pool which is made from its reserves of two ERC-20 tokens.

Hence, anyone can participate and be a liquidity provider by depositing the equal value of every token in return of the pool tokens. The liquidity providers on Uniswap are granted for their services through pro-rata >

AMM-based decentralized exchanges - DEXes consists of multiple genres to determine prices, however, Uniswap uses CPMM - “Constant Product Market Maker”.

Its working relies on the equation of x*y=k.

The pairs in the process act as AMM leading to accepting one token for the other while considering and preserving its “constant product” formula. The formula states about the trades not changing the product of the pair’s reserve balances as it must remain unchanged from the reference frame of trade also known to be invariant. This formula attributes to the desirable property considering that larger trades execute at rapid worse rates than the smaller trades.

Uniswap applies a fee to the trades with 0.30%, which is added to the reserves leading to an increase in each trade. This process functions as a payout for the liquidity providers with the realization that the pool token is burnt post the withdrawal of their share of total reserves.

It does not involve an order book, centralized party or any centralized facilitator of trade.

Also Read, Future Of Cryptocurrency Trading Pool

Mathematics of Determining the Price

The prices in Uniswap are determined by the amount of every token in the pool. Its smart contract uses the following constant function: x*y=k

Wherein,

x = token0

y = token1

k  = constant

In each trade, a given specific amount of tokens is removed from the pool for the other token’s amount. Hence, to maintain the k, the balances that are implemented by the smart contract are adjusted during the trade execution leading to the change in the price.

Adding Token to Uniswap

Uniswap works on the Ethereum ecosystem and thus it is compatible with any ERC-20 tokens. With Uniswap, anyone can add its project’s token and list it permissionless for trading.

1. Navigate the platform at Uniswap exchange.

2. Click the button that states “Select a token”.

 

You will arrive at the “Search name or paste address” option wherein you will have to paste the contract address of the ERC-20 token that you need to list.

After the pasting of the contact address, Uniswap will instantly find the tokens on its Uniswap listing.

The user then needs to click on the token selected that leads to a warning screen.

The warning screen occurs as the protocol’s listing process is permissionless; while with the warning screen, uniswap attempts to stress a cautionary step as an initiative to avoid malicious projects and scammers.

The user needs to click on the “I understand” which later directs to Uniswap’s trading interface that consists of buttons named - “Swap” and “Pool”.

The user then needs to click on the “Add Liquidity” button and incase prompted the user will have to paste the token contract address and select the token on the dropdown menu.

The user needs to add liquidity to the pool. However, one should notice that the Uniswap price is dynamic and it is important to consider while gauging the newly listed tokens on the protocol. Also, the project can list only a certain fraction of the token’s supply to Uniswap.

Once the token ratio is set, you would need to approve Uniswap to handle the tokens and send the transaction while pressing the “Confirm” button as prompted.

Post the process, an approval transaction is conducted by the Uniswap and once that is done, Uniswap will activate the “Supply” button on its UI leading to a final pop up prompting confirmation.

The user then needs to click on the “Create Pool & Supply” button, submit its transaction and wait for the process to go through. After it’s processed through, a liquidity pool is created resulting in your token being listed on Uniswap.

Read More:

Comments