Liquidity Pools

What Are Liquidity Pools?

Liquidity Pools are a place to pool tokens (otherwise known as liquidity) so that users can use them to make trades in a decentralized and permissionless way. These pools are created by users and decentralized apps (or Dapps, for short) who want to profit from their usage. To pool liquidity, the amounts a user supplies must be equally divided between two coins: the primary token (sometimes called the quote token) and the base token (usually SUI or a stable coin).
WispSwap's liquidity pools allow anyone to provide liquidity to them; when they do so, they will receive LP tokens (Liquidity Provider tokens). If a user deposited $WISP and $SUI into a pool, they would receive WISP-SUI LP tokens. These tokens represent a proportional share of the pooled assets, allowing a user to reclaim their funds at any point. Every time another user uses the pool to trade between $WISP and $SUI, a 0.3% fee is taken on the trade. 0.25% of that trade goes back to the LP pool in the form of a fee reward for liquidity providers.
The value of the LP tokens, which represent the shares of the total liquidity each pool, is updated with each trade to add their value relative to the tokens the pool uses to trade. If previously there were 100 LP tokens representing 100 $SUI and 100 $WISP, each token would be worth 1 $SUI & 1 $SUI (note in this example, $SUI and $WISP are the same relative value). If a user were then to trade 10 $SUI for 10 $WISP in that pool, and another user were to trade 10 $WISP for 10 $SUI, then there would now be 100.025 $SUI and 100.025 $WISP. This means each LP token would be worth 1.0025 $SUI and 1.00025 $WISP now when it is withdrawn.