What is a Liquidity Pool?

Description of Swift AI Liquidity Pools.

You can think of a liquidity pool like the backend of a swap pairing.

On the surface, you see a swap application that allows you to input one token, and receive your desired token.

But how does the swap actually work? This is where liquidity pools come in.

A liquidity pool is a canister smart contract that holds a balance of the two tokens that make up the top-level swap pair.

Users who want to make a swap are actually trading with the underlying liquidity pool. Liquidity pools price their assets based on the ratio of the underlying assets. Every trade made with a liquidity pool will alter the price that the pool assigns to the assets because the ratio to which they are held has changed from the swap.

For example, if 1 Token A is swapped for 10 Token B at a Token A - Token B liquidity pool, the price of Token A goes down because more of Token A and less of Token B exist in the liquidity pool. It could also be said that ratio (which represents the price of assets in a liquidity pool) of Token A to Token B has decreased.

Very large pools will have their price relatively unaffected by small swaps. Adding 1 Token A and losing 10 Token B has a negligible effect to the ratio if there already exists millions of Token A and Token B in the pool.

Since arbitrage is common among permissionless swap protocols, it’s a safe assumption that when you are making a swap with a large pool, the trade is made close to fair market price. Swap users are trading an equal value of Token A for an equal value of Token B with the liquidity pool (plus the 0.3% fee that incentives liquidity providing).

Anyone who owns Token A and Token B that make up the liquidity pool can become liquidity providers. Liquidity providers deposit both tokens into the liquidity pool and earn fees that are paid by a user for making a swap with the pool.

Last updated

Was this helpful?