UNISWAP - Everything you should know about it

Uniswap is a decentralized stock exchange based on the Ethereum network. Accessible and uncensored, it is an important building block of the DeFi (decentralized finance) area. Its operation is fully decentralized and automatic thanks to smart contracts.

 

UNISWAP CREATED A DECENTRALIZED STOCK EXCHANGE

Hayden Adams released Uniswap V1 (version 1) in November 2018. The stock exchange, operated by liquidity pools and automated market makers, approached the concept of a decentralized stock market with a different concept than EtherDelta. EtherDelta is also a decentralized exchange where ERC-20 tokens can be traded as usual on a traditional exchange. In general, exchanges take place on centralized exchanges according to an order book. The Uniswap solution fits better into Ethereum’s network and was also easier to use.

Any ERC-20 token could go public thanks to V1. Users were able to join ETH-ERC20 liquidity pools, after which they received a commission from the trading fee paid by other users. Although version 1 will be available forever (as long as the Ethereum network exists), version 2 was born due to the great interest and the expansion of the Uniswap team.

The main novelty of V2 (version 2) is that we can directly exchange ERC-20 tokens. While in V1 there were only ETH-ERC20 liquidity pools, in V2 there are already ERC20-ERC20 pools. Previously, if we wanted to trade in two ERC-20 token markets, let’s say we wanted to buy DAI from USDC, we had to buy ether first from USDC and then DAI from ether. This was done for us automatically by Uniswap, the problem with this was that I had to pay a trading fee twice as there were two shifts.

Other innovations include flash swap and oracle services. Flash swaps can be used to take advantage of arbitrage opportunities, similar to flash loans. The advantage of these is that you do not have to have a large amount of capital or provide collateral, the borrowed capital is repaid in the block in which we borrowed. With the help of the Uniswap oracle service, we can determine the price of tokens in a decentralized and manipulation-free manner.

HOW UNISWAP (DEFI) WORKS

Uniswap is an automated system with “liquidity pools” that provide liquidity to the system and a concept called “automated market maker” that determines the price of tokens. We call a liquidity provider those who send money into pools, the pool is really nothing more than a smart contract (a wallet on the Ethereum network that is programmable). In return for providing liquidity, users receive a reward, which is distributed from the trading fee.

The system is based on the “constant product formula” concept, which means that the product of the set of two tokens is constant in a given liquidity pool. It is a kind of system within the “automated market maker” (AMM) group that allows traders to trade against the liquidity pool and not browse for offers from other users (order book) as is normally the case. This is necessary because of the problem mentioned earlier, so to use the decentralized model quickly and easily.

AUTOMATED MARKET MAKER DETAILS

AMMs usually have three participants:

merchants: They exchange one token for another.

liquidity provider (LP): They are willing to provide liquidity for a trading fee.

arbitrage traders: They balance prices on a given stock exchange to match those found in the big world.

The AMM used by Uniswap uses the following equation:

(R?-??) X (R?+(1+?)??)=k

Where R? and R? are the stock of the two tokens, ? (gamma) is the transaction cost, the trader received a ?? token in exchange for the payment of ??. If ? is zero, i.e. there is no transaction cost, the product of R? * R? must be constant. This is often simplified by the “x * y = k formula”. However, since ? is not zero but 0.3% for Uniswap, k actually increases after each transaction.

Let ? be some token and ? be a tokenized dollar, R? = 100, R? = 200, this determines ? (we'll turn to that later), which is $ 2. Suppose you want to take an ? token of $ 1. According to our model, if there is no transaction cost, then:

100 X 200 = (100 – ??) X (200 + 1)

Accordingly, ?? = 0.49. After the transaction, the value of the tokens in the liquidity pool is the same. However, the price of the ? token is rising as its inventory in the pool has dropped to $ 2.02. The value of tokens in the liquidity pool is determined by the quotient of their stock. Since the value of one of our tokens was always $ 1, the value of the other token can be determined by the formula R? / R?. If the price of one of the tokens is not fixed, we can only determine the relative price of each other.

 

ADVANTAGES AND DISADVANTAGES OF THE AMM SYSTEM

On traditional stock exchanges, bids must be posted in the order book, whereas on Uniswap there is only one price, the current exchange rate. This is both an advantage and a disadvantage of AMM, as it makes trading faster, however, if we want to exchange at a different price, we cannot put an offer in the order book.

The model that determines the price of a token on Uniswap is fully automatic. There is a growing demand for oracle protocols that provide information on the prices of different cryptocurrencies. Uniswap is perfect for this, as we can see at any time the proportion of tokens in the pools, it is difficult to influence, so it is secure and decentralized.

The term, called slippage, means that we end up exchanging at a different price in the end than we would have originally expected. This is because liquidity ratios in a given pool change. The higher the value of the exchange, the greater the difference. Slippage can be a problem even if the pool liquidity is not high enough.

A somewhat complicated problem is impermanent loss, which affects liquidity providers. This phenomenon occurs when the relative values ??of the two tokens change drastically in a given pool. Then we can do worse than follow the simple HODL tactic, but the loss is only temporary, because if the previous price is restored, we can stay with our money. Fortunately, the Uniswap model causes a small loss if there is no large price movement. The figure below compares an ETH / DAI pool with the case of keeping a simple ether in our wallet. According to this, we are better off with the liquidity pool as long as the price of ether is not doubled or quadrupled.

 

A UNISWAP TOKENE A UNI

On September 16, 2020, Uniswap announced that it would issue its own token, UNI. Instead of bringing it to market in the traditional way with the help of ICO (Initial Coin Offering), the Uniswap team decided otherwise. All users who had already used Uniswap before September 1 received 400 UNI tokens. In the days following the issue, the price of the token was around $ 3, and the seller who sold the tokens at that time received approximately $ 360,000, as long as he did so at the time of writing this article.

The distribution of the UNI token brought even more fame to Uniswap, the new token was quickly listed on several stock exchanges, reaching a price of $ 5 by 2021 and $ 20 by February. The giant airdrop distributed the tokens widely, sending them to more than 50,000 ethereum addresses from the UNI stockpile. It is the responsibility of token holders to participate in the management of Uniswap by deciding on proposals. With this, the Uniswap team wanted to increase decentralization and maintain and protect the existing infrastructure while V3 is being prepared and developed.

 

UNISWAP SUMMARY AND THE FUTURE OF DEFI

Uniswap now has several competitors, the most significant of which are Curve Finance and SushiSwap, with more than $ 3 billion tied up in all three decentralized exchanges. At the time of writing, users have invested more than $ 10 billion in cryptocurrency in decentralized exchanges (DEX) in the DeFi sector. That’s quite amazing, compared to the fact that in mid-2020, that amount was just over $ 100 million.

After the success of large projects, the open source code of the protocols was copied one after the other by programmers to provide a similar service as the projects that were run. This was partly detrimental as a lot of incorrectly rewritten program code led to bugs, many people lost their money due to Yam finance, for example. However, many players are interested in innovating and providing a better or different service than their competitors.

I think the current hype around DeFi has been good for the crypto market, but it can hardly evolve until Ethereum migrates to PoS. Current gas costs on Uniswap are hard to afford for small investors. As the Ethereum network is developed, other smart grids, such as the BINANCE Smart Chain, may gain ground.

 

Have a nice day and please don't forget to TIP ! :)

 18.02.2021

Hotest Cryptocurrency News

Latest Reviews and Analytics

X