Assessment reports>Chainflip Backend>Threat Model>Pallet: cf-pools

Pallet: cf-pools

The cf-pools pallet is responsible for managing liquidity pools (allowing governance to create, enable/disable, and set fees) as well as managing range and limit orders. While the actual logic that computes swap amounts and updates pool state is in another crate implementing the AMM, this pallet does contain some glue code that calls the JIT AMM to accomplish a single leg of a swap (and also deposits an event that signals a swap has taken place).

Additionally, this pallet is also responsible for periodically buying and burning FLIP tokens using USDC fees collected from the swaps, applying deflationary pressure that increases the value of FLIP.

Zellic © 2024Back to top ↑