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

Function: update_buy_interval

The update_buy_interval function can be used by governance to set the time interval that determines how often on_initialize swaps USDC (collected from fees) for FLIP, applying deflationary pressure.

The function ensures the origin is governance, sanity checks the new buy interval to ensure it is not zero, sets the new buy interval in storage, and emits a corresponding event.

Zellic © 2024Back to top ↑