Liquidity pools

From CryptoWiki

"A liquidity pool is a collection of cryptocurrencies that facilitate trading on a decentralized exchange (DEX). These assets are provided by users, known as liquidity providers, who deposit them into the pool in exchange for a share of the trading fees generated by the DEX. The assets in the pool can be traded by other users on the DEX, allowing for increased trading volume and liquidity.

Liquidity pools are a crucial part of many DeFi applications, including automated market makers, yield farming, GameFi, and synthetic assets. As with other DeFi components, a liquidity pool is open to be supported by anybody, and doesn’t constitute an actual 3rd party, making them a very attractive solution to the problem of “the middleman” in centralized solutions.

An LP token (liquidity provider token) is a token that represents a user’s share in a liquidity pool on a decentralized exchange (DEX). When a user deposits assets into a liquidity pool, they receive LP tokens in return. It is important to note that the holder is in control of said token and that it stands in place of the liquidity that they provided. These tokens can be traded on the DEX and have value based on the assets and trading fees in the pool.

The value of an LP token is tied to the value of the assets in the pool and the trading fees generated by the pool. Functionally, they would allow a provider to claim their original stake and the rewards that are owed to them.

Of course with any solution there come risks, one of the most well-known being the risk of impermanent loss. Impermanent loss refers to the event in which the price of one’s assets deposited in a liquidity falls compared to when they put them in. The operative word here, though, is impermanent, because just as deposited tokens can lose value, they can also regain that value."

"In practice, Uniswap leverage liquidity pools to make unique markets for supported assets according to a deterministic algorithm. By using an automated market maker (AMM), the exchange can quote prices to the end-user according to some predefined ruleset. In the case of Uniswap today, a variant called the “Constant Product Market Maker Model.” is used, particularly due to a feature that enables the exchange to always provide liquidity, no matter how large the order size nor how tiny the liquidity pool.

For this to work, the spot price of any given asset increases as the desired quantity increases. While this does result in larger orders suffering from increased spot prices, the system never has to worry about running out of liquidity. Stated another way, Uniswap always maintains an aggregate supply in its smart contracts, meaning that the larger the liquidity pool gets, the lower the slippage across any trading pair is likely to be."