Liquidity Pools > Introduction

Liquidity Pools

Each Dexter contract holds two liquidity (asset) pools. One for XTZ, the xtz pool, and one for FA1.2, the token pool. Ownership of these liquidity pools are represented by pool tokens. When you add liquidity to a Dexter contract, it gives you pool tokens which represent your contribution to the pool. Pool tokens are non-transferable, but can be redeemed for an equivalent value of XTZ and FA1.2.

The value of the pool tokens are determined by the amount in the liquidity pools. Whenever you redeem X pool tokens, you will receive X * xtz pool / total pool tokens of XTZ and X * token pool / total pool tokens of FA1.2 tokens.

The total pool tokens and number of pool tokens you own can only be incremented through add liquidity and decremented with redeem pool tokens. When other users trade one token for another, it does not affect the total amount of pool tokens you own. However, it changes the amounts of the liquidity pools.

When a trader performs XTZ to FA1.2 tokens, it increments the amount of XTZ liquidity pool and decreases the amount of the token pool. This causes redeeming pool tokens to return more XTZ and less FA1.2 tokens. It also causes the XTZ to FA1.2 token exchange rate to decrease.

When a trader performs FA1.2 tokens to XTZ, it increments the amount of token liquidity pool and decreases the amount of the XTZ pool. This causes redeeming pool tokens to return more FA1.2 tokens and less XTZ. It also causes the XTZ to FA1.2 token exchange rate to increase.

Previous:
Trading