Liquidity Pools are part of the bitshares-core 5.0, which are providing a fully automated and autonomous onchain liquidity. Always holding an equal amount of value in both assets, at the current pool price
The exchange rate is defined by:
- constant product model:
k = amount_x * amount_y
- pool taker fee, contributed to the pool token holders
Both assets are needed in equal amounts at the current pool price. A deposit increases the amount of pool tokens.
Withdrawing funds from the pool, burns the pool token, which reduces the pool token supply. Withdraw fees are shared to the remaining pool token holders.
A new UIA needs to be created in the first place, which can be upgraded to the pool token. The asset ID A is by definiton smaller, than the asset ID B. After the inital pool deposit by the creator, the invariant
k is defined and the liquidity pool is active.