# Pools

Here you will learn about the liquidity pools, their types on DeDust, how they work, how to deposit and withdraw the liquidity to/from pools. And how to earn on providing liquidity.

## What is a Liquidity pool

<details>

<summary>Very simplified, liquidity pool is a 'trading pair' of two cryptocurrencies on a decentrilized exchange (DEX), serving to allow users to swap one crypto for another, i.e. TON to USDT.</summary>

If more complicated, liquidity pool is:

* a kind of vault, a storage, containing a combination (usually a pair) of cryptocurrency tokens (usually in 50/50 proportion), allowing users to buy from (or sell to) that pool one token for another,&#x20;

and on the other hand,

* a smart contract deployed in the blockchain — a program code with a set of strict rules, defining how a specific liquidity pool operates and executes the swaps, initiated by users.

{% hint style="info" %}
Once a pair of assets (tokens) is placed to the liquidity pool, users can start trading those assets. Then, putting certain amount of one token to a pool ('selling' it to the pool) user gets in return some amount of another token from that pool ('buying' it from the pool), according to its exchange rate.
{% endhint %}

{% hint style="info" %}
Only the proportion (amounts) of two assets in a pool defines one's 'price' expressed in another, and defines their exchange rate **in that specific pool**. And the more liquidity[^1] (or assets, in total) the pool contains, the less will be the [price impact](https://help.dedust.io/en/ru/trade/advanced/price_impact) (exchange rate deviation) with every swap in it.
{% endhint %}

</details>

For every exchange in a pool it withholds a fee, called [*Trading fee*](https://help.dedust.io/en/ru/protocol/fees#fee-for-swaps-or-trading-fee) — from a user performing the swap.

## How it works on DeDust

* The trading fees might vary in different pools.
* 80% of trading fees is distributed between all pool's liqidity providers, according to their share in it.
* Another 20% of fees is used to buyback [$DUST tokens](https://help.dedust.io/en/ru/protocol/dust) from market and reward holders for staking.
* The fee may be deducted either from trader's amount of tokens that he spends, or from amount of tokens he gets after swap. Depending on pool's properties and swap direction.
* All fees are withheld from traders and distributed between liquidity providers instantly, at the moment of swap.
* The trading fee is only withheld if a swap was successful.
* With every swap each liquidity provider's portion of trading fee earnings is:
  * auto-compounded to the total amount of provider's tokens in the pool (added to his position), in case of [Classic](https://help.dedust.io/en/ru/liquidity/types#classic-pool-cpmm-v1) and [Stable-swap](https://help.dedust.io/en/ru/liquidity/types#stable-swap-pool) pools, or
  * accumulated on a separate ballance and available for claim anytime, in case of [CPMM v2](https://help.dedust.io/en/ru/liquidity/types#claimable-fees-pool-cpmm-v2) pools.

## Filters on Pools page

Switch between **All pools** and **My pools** tabs to see details only on pools you're providing liquidity to.\
Use filters to find relevant pools for more specific cases:

* **Pool type** — choose between different volatile pool types and stable-swap pools
* **Coins filter** — view only pools with selected tokens
* **Boosted** — pools with additional [boost rewards](https://help.dedust.io/en/ru/liquidity/boosts)

<figure><img src="https://content.gitbook.com/content/SBFL2enjS0C3zTK97y9H/blobs/3kXO9187k7Hz2J7TeocU/IMG_3640.PNG" alt="" width="375"><figcaption></figcaption></figure>

{% hint style="warning" %}
Pools containing at least one [non-whitelisted token](https://help.dedust.io/en/ru/trade/swap/imported) will be shown on Pools page only after you [import the non-whitelisted token(s)](https://help.dedust.io/en/ru/launch/whitelist/non-whitelisted).
{% endhint %}

[^1]: The total liquidity in a pool, or the total value of both assets placed to that pool (usually expressed in USD), is one of key metrics called Total Value Locked (TVL).
