Uniswap is a decentralized exchange protocol built on Ethereum. Uniswap, like the other DEFI protocols, allows users to trade without intermediaries, with a high degree of decentralization and resistance to censorship and without any KYC.
Uniswap works with an exchange model that involves liquidity providers who create liquidity pools. This system provides a decentralized pricing mechanism that allows users to trade their ERC-20 tokens.
On Uniswap it is possible to quote any ERC-20 token, the important thing is that there is a pool of liquidity, this pool can be created without Uniswap charging any insertion fee.
Uniswap does not have, like traditional exchanges, an order book, but works with a model called Constant Product Market Maker, which is a variant of the Automated Market Maker (AMM).
Automated market makers are smart contracts that hold liquidity pools (LPs) that traders can trade with. These reserves are financed by liquidity providers. Anyone can be a liquidity provider who deposits an equivalent value of two tokens in the pool. In return, traders pay a commission to the pool which is then distributed to liquidity providers based on their share of the pool.
Let's take an example of how a liquidity pool works and assume that the liquidity pool is made up of ETH / DAI. We will call the ETH part of the pool x and the DAI part y. Uniswap takes these two quantities and multiplies them to calculate the total liquidity in the pool. Let's call it k. The idea behind Uniswap is that k must remain constant, which means that the total liquidity in the pool is constant. Thus, the formula for total liquidity in the pool is:
x * y = k
So what happens when someone wants to trade?
Suppose John buys 1 ETH for 1800 DAI using the ETH / DAI liquidity pool. In this way, the DAI portion of the pool increases and the ETH portion of the pool decreases. This effectively means that the price of ETH goes up. Why? There is less ETH in the pool after the trade and we know that total liquidity (k) must remain constant. This mechanism is what determines the price. Ultimately, the price paid for this ETH is based on how much a given trade shifts the ratio between x and y.
This mechanism means that the larger the order, the more the balance shifts between x and y and this determines that the larger pools of liquidity are more efficient and less expensive in terms of slippage.
What is slippage?
Trading slippage occurs when the price at which the order is finally executed does not match the price at the time the transaction is confirmed. When trading on Uniswap, it is referred to as "slip tolerance" and is expressed as a percentage.
To better understand how Uniswap works, I suggest you read my articles: What Is Yield Farming? What is Impermanent Loss?
Disclaimer: This article reflects its author’s opinion only and is not financial advice. I take no responsibility for the results of any trader’s decision or action.
Tank you if you want use my Binance ref link with 10% cash back: https://www.binance.com/en/register?ref=QZHRIPXJ