1/ As we are getting closer to launching Maiar DEX, a thread about liquidity pools (LPs) and impermanent loss (IL) seems required for those new to the DeFi space, decentralized exchanges (DEX) and swapping.👇
2/ What are liquidity pools (LPs)?

A liquidity pool is a Smart Contract that locks tokens to ensure liquidity for those tokens on a decentralized exchange. Users who provide tokens to the Smart Contract are called liquidity providers.
3/ How do liquidity pools work?

The liquidity pool holds two tokens in a Smart Contract to form a trading pair. Let’s use EGLD & BUSD as an example, and to make it simple, the price of EGLD can be equal to 200 BUSD.

Liquidity providers contribute an equal value of EGLD and...
4/ ...BUSD to the pool, so someone depositing 1 EGLD would have to match it with 200 BUSD.

The liquidity in the pool means that when some1 wants to trade EGLD for BUSD, they can do so based on the funds deposited, rather than waiting for a counterparty to come along to match it.
5/ The liquidity pools emerged as an innovative and automated way of solving the liquidity challenge on DEXs.

They replace the traditional order book model used by centralized crypto exchanges by using Automated Market Makers (AMM).
6/ Liquidity providers are incentivized for their contribution with rewards. When they make a deposit, they receive a new token representing their stake, called a liquidity pool token or LP token. In this example, the LP token would be EGLDBUSD.
7/ The share of trading fees paid by users who use the pool to swap tokens is distributed automatically to all liquidity providers proportionate to their stake size.

So if the trading fees for the EGLD-BUSD pool are 0.25% & a liquidity provider has contributed 10% of the pool...
8/ ... they’re entitled to 10% of 0.25% of the total value of all trades.

When a user wants to withdraw their stake in the liquidity pool, they burn the LP token and can withdraw their stake.
9/ On Maiar DEX, LP tokens can be also staked in a staking pool specific to each liquidity pool so that even more rewards are earned in the form of MEX token.

So in our example, the LP token EGLDBUSD can be staked in the EGLDBUSD staking pool to earn MEX.
10/ Thus, a liquidity provider will earn rewards from 2 streams: the fees from the LP and MEX for staking the LP token in a staking pool.

Keep in mind that the LP token is very important. In order to withdraw the stake in the liquidity pool you need to provide the LP token.
11/ What Are The Risks of LPs?
Providing liquidity to a LP can be profitable, but you’ll need to keep the concept of impermanent loss (IL) in mind.

IL describes the temporary loss of funds occasionally experienced by liquidity providers because of volatility in a trading pair.
12/ The bigger the volatility, the more you are exposed to IL as there is an irresistible opportunity for arbitrage, because the price in the LP doesn’t reflect what’s going on.

In this case, the loss means less dollar value at the time of withdrawal than at the time of deposit
13/ After arbitrage, a liquidity provider may end up with a greater amount of BUSD & slightly less EGLD or vice versa.

So why do liquidity providers still provide liquidity if they’re exposed to potential losses? Well, IL can still be counteracted by trading fees & MEX rewards.
14/ In fact, even pools that are quite exposed to impermanent loss can be profitable thanks to the trading fees and MEX token rewards.

Impermanent loss is one of the fundamental concepts that anyone who wants to provide liquidity to AMMs should understand.
You can follow @luciantodea.
Tip: mention @twtextapp on a Twitter thread with the keyword “unroll” to get a link to it.

Latest Threads Unrolled: