StabilityFeeCollector

https://github.com/Into-the-Fathom/fathom-stablecoin-smart-contracts/blob/master/contracts/main/stablecoin-core/StabilityFeeCollector.sol

The StabilityFeeCollector is a contract responsible for collecting stability fees from various collateral pools within a FXD system. These fees are used to manage the stability of FXD by compensating for volatility in the collateral's value and ensuring the system's solvency. The contract provides functionality to calculate and accrue stability fees over time, ensuring they are consistently applied and collected.

Storage Variables

  • bookKeeper: Reference to the IBookKeeper contract, managing the accounting of collateral and debts within the system.

  • systemDebtEngine: Address of the contract responsible for handling system debts and stability fees accumulation.

Functions

  • pause(): Pauses fee collection, preventing new fees from being accumulated.

  • unpause(): Resumes fee collection, allowing fees to be accumulated again.

  • setSystemDebtEngine(address _systemDebtEngine): Updates the address of the system debt engine used for fee collection.

  • collect(bytes32 _collateralPool): Public function that anyone can call to trigger the collection of stability fees for a specific collateral pool. It updates the accumulated rate of fees for the pool.

  • _collect(bytes32 _collateralPoolId): Internal function that performs the actual calculation and collection of fees, updating the necessary state in the bookKeeper and collateral pool configuration.

Events

  • LogSetSystemDebtEngine(address indexed _caller, address _data): Emitted when the system debt engine address is updated.

Last updated

Copyright© Fathom App 2024.