Assessment reports>Chainflip Backend>Threat Model>Function: `set_pool_fees`

Function: set_pool_fees

The set_pool_fees function can be used by governance to set the percentage taken as fee.

The function ensures that the origin of the call is governance, validates the provided fee to ensure it is capped to a maximum amount, and updates the pool state to set the new fee. Updating fees requires collecting current fees before updating the fee parameter. Collected fees are credited to the liquidity providers. Finally, the function deposits an event to signal the update to the pool state.

Zellic © 2024Back to top ↑