Liquidity pools

Liquidity pools

Right now the topic of liquidity pools is getting more and more traction. Not surprising, considering DeFi markets are trending right now. In this article we’ll try to simplify at as much as possible and provide examples.

DeFi are decentralized finances, specifically non-custodial protocols for lending to cryptoassets, decentralized exchanges, release protocols for synthetic assets and derivatives. But the most popular kind of DeFi are liquidity pools.

Imagine a bank, a decentralized organization. The bank has currency exchange points. There you can perform an exchange between the currencies the bank operates with. For example, it’s 4 currency pairs: RUB-USD, RUB-EUR, RUB-GBP, RUB-CHF. Liquidity is provided by the bank. You can exchange both ways (rubles to dollars, dollars to rubles). The exchange rates are determined prior, they may be updated daily or biweekly. Banks, of course, make money off these operations. And their profit is based off of the differences of the buying/selling exchange rates, margins.

Now imagine a similar “exchange” where there are dozens, hundreds, possibly thousands of currency pairs and the exchange operations are saved in the blockchain, providing reliability and security. This is exactly what decentralized finance, or DeFi, is. The most popular of these platforms are Uniswap and PancakeSwap. Exchange rates don’t change every day or every few days, they change after every single trade with this currency pair. This pair is called a liquidity pool, for example HUB-USDT on Uniswap. The liquidity here is not provided by an organization, but by any user that can provide liquidity to a pair with 1:1 accuracy.

image

For example, HUB = $100 (~100 USDT). To add liquidity to the HUB-USDT pool you need to add 1 HUB and 100 USDT. If you want to add 5 HUB, you have to add 500 USDT along with it.

Still, DeFi has one thing in common with banks — the one providing liquidity is the one who makes money off trades. Banks individually provide the liquidity, so they are the only ones profiting off exchanges. In DeFi liquidity is provided by the user base, and they all profit. The profits are distributed proportionally to the provided liquidity. If my share in a pool is 5%, then I’ll receive 5% of all fees taken on trades. The volume of the fee is dependent on the platform, on Uniswap it’s 0.3%, on Minter it’ll be 0.2%.

Liquidity provider profitability

A liquidity provider is someone who provides liquidity for a pool.

Example

Input data:

  • Pool HUB-USDC
  • Amount of HUB in the pool: 100
  • Amount of USDC in the pool: 5000
  • Amount of liquidity providers: 2
  • The first liquidity provider brought: 70 HUB and 3500 USDC
  • The second liquidity provider brought: 30 HUB and 1500 USDC
  • Exchange fee: 1% (for convenience sake, the real percentage is lower)

This means that 1 HUB = 50 USDC. The providers’ shares were distributed as 70% and 30% respectively.

A user makes an exchange: purchases 10 HUB for 500 USDC. They pay a fee of 5 USDC (1%). The correlation of the coins changes in the pool, and the exchange rates with it:

  • Amount of HUB: 90
  • Amount of USDC: 5500
  • Current HUB exchange rate: 61.11 USDC

The liquidity providers received a profit according to their share: the first provider got 3.5 USDC (70%), the second provider got 1.5 USDC (30%).

Impermanent loss

Impermanent loss — partial loss of profit.

Example

Input data:

Pool HUB-USDC

1 HUB = 100 USDC

Leon provided liquidity for the pool: 1 HUB and 100 USDC. There’s 10 HUB and 1 000 USDC total in the pool. Leon’s share is 10%.

After some time, users, completing trades, resulting in which they added USDC to the pool, taking HUB for it, the price of HUB increased to 400 USDC. Now there’s 5 HUB and 2 000 USDC in the pool.

Leon decided to take his money back from the pool. Since his share was 10%, he extracted 0.5 HUB and 200 USDC. Translated into dollars, Leon should have $400 now, right?

But, if Leon, instead of providing liquidity for the pool, held the tokens on his wallet (1 HUB and 100 USDC), he would have $500 (1 HUB x 400 USDC + 100 USDC). There’s a difference of $100, this is called impermanent loss.

Here are some impermanent loss examples on token price fluctuation:

  • 25% price change (1.25x) = 0.6% impermanent loss
  • 50% price change (1.5x) = 2%
  • 75% price change (1.75x) = 3.8%
  • 100% price change (2x) = 5.7%
  • 200% price change (3x) = 13.4%
  • 300% price change (4x) = 20%
  • 400% price change (5x) = 25.5%

Always keep this factor in mind when accounting for the profitability of providing. This loss may be compensated with fees that the provider receives for providing liquidity, as well as farming.

Farming

Farming in a system for bonuses from the project for providing liquidity. For example in the HUB-USDT pool the bonuses (farming) are provided by the Minter team, who will reward providers for supporting the liquidity of one of the project’s tokens (in this case the coin of the Minter Hub sidechain).

This way, thanks to the profitability of fees and farming, liquidity providers can make dozens, sometimes hundreds in profit percentages yearly.

Liquidity pools with HUB

HUB liquidity pool on PancakeSwap (BSC)
HUB liquidity pool on PancakeSwap (BSC)

⬅️ Previous section

© 2021 BTC.Secure Inc.