The only model of a DeFi liquidity pool holds two tokens in a wise contract to kind a buying and selling pair.
Let’s use Ether (ETH) and USD Coin (USDC) for instance, and to make it easy, the worth of ETH will be equal to 1,000 USDC. Liquidity suppliers contribute an equal worth of ETH and USDC to the pool, so somebody depositing 1 ETH must match it with 1,000 USDC.
The liquidity within the pool implies that when somebody needs to commerce ETH for USDC, they’ll achieve this based mostly on the funds deposited, fairly than ready for a counterparty to return alongside to match their commerce.
Liquidity suppliers are incentivized for his or her contribution with rewards. After they make a deposit, they obtain a brand new token representing their stake, referred to as a pool token. On this instance, the pool token could be USDCETH.
The share of buying and selling charges paid by customers who use the pool to swap tokens is distributed robotically to all liquidity suppliers proportionate to their stake dimension. So if the buying and selling charges for the USDC-ETH pool are 0.3% and a liquidity supplier has contributed 10% of the pool, they’re entitled to 10% of 0.3% of the entire worth of all trades.
When a consumer needs to withdraw their stake within the liquidity pool, they burn their pool tokens and may withdraw their stake.