Jump to content
Onchain Report

Crypto news from every chain

Liquidity pools show how token swaps set prices

A crypto liquidity pool holds two tokens; traders swap against its reserves, a formula sets prices, and providers earn fees while taking price risk.

Onchain Report Newsroom#7a53fc3 min read

Liquidity pools show how token swaps set prices

A liquidity pool lets you swap tokens against reserves, while depositors earn a share of trading fees and take on price risk.

The common belief is that a pool matches buyers with sellers. In a two-token automated market maker, or AMM, traders instead swap against tokens held by a smart contract. A formula adjusts the reserves and sets the price.

Pool reserves set the price

Uniswap and SushiSwap are familiar exchanges that use liquidity pools. The shiba swap is also a decentralized exchange; its Dig feature lets users deposit SHIB and ETH into a pool and receive LP tokens that mark their share.

To start a pool position, a provider deposits both tokens in the pool’s required value ratio. The pool tracks each token’s reserve, often called x and y. In a Uniswap v2-style pool, their product stays roughly constant: x*y=k. The formula helps determine how much of one token a trader receives for the other.

Say a trader takes ETH from a SHIB-ETH pool and adds SHIB. The ETH reserve falls and the SHIB reserve rises. The changing reserve ratio makes ETH more expensive in SHIB terms, so larger trades against a pool tend to get a worse price. Trading fees are added to the pool’s value and shared among providers according to their share.

LP tokens represent that share. They are not a promise to get back the same number of SHIB and ETH deposited. As trades and market prices move, the pool rebalances: a provider’s share shifts toward the token whose price is falling relative to the other.

That shift creates impermanent loss: the difference between keeping the pool position and simply holding the original tokens. With no fees included, a twofold change in the price ratio in either direction produces about 5.7% less value than holding. A 2x rise and a 50% fall are equal-sized ratio changes in opposite directions, so the loss is about the same. Fees can offset some or all of it, but fee income varies with trading volume and the provider’s share of the pool. APR is an estimate based on changing activity, not a fixed rate.

Suppose ETH doubles in price against SHIB after a deposit. The pool’s ratio shifts toward SHIB, leaving the provider with a larger share of the falling token and less ETH than simply holding would. The price change’s direction changes which token dominates; the comparison with holding still depends on the size of the ratio change.

Related questions

What are LP tokens?

LP tokens record a provider’s proportional claim on a pool’s current reserves. Their value changes as reserves, token prices, and fees change.

How do you remove liquidity from a pool?

You return or redeem your LP tokens through the exchange’s interface. The pool pays out your share of its then-current reserves, including any fees reflected in the pool.

Questions to consider next

Which pools have the lowest impermanent loss?

Pools with token prices that tend to move closely together usually have smaller ratio changes, and therefore lower impermanent loss. That can also mean less trading activity or fee income; compare both.

How are liquidity pool earnings taxed?

Tax treatment depends on your jurisdiction and the transactions involved, including deposits, withdrawals, and fees. Keep records and check local tax rules or ask a tax professional.

What happens to a pool if one token goes to zero?

If a token becomes worthless, the pool can be left holding mostly that token as traders take the valuable one. Providers may lose most of their position’s value.