StabilityFeeTreasury- this contract tries to keep an "optimum" amount of stability fees for itself in order to make sure it can provide funds to other contracts (or in some cases, people) that maintain the protocol's well-being. Anyone can periodically call a function to recalculate the optimum amount of funds to keep in the treasury. Any surplus above optimum values is transferred to the
FSMWrapper- this contract is meant to act as a funding source for FSM-like contracts as well as an interface that allows other contracts to read data from the FSM integrated with the wrapper.
IncreasingTreasuryReimbursement- this contract is meant to be inherited from and used as a way to offer an increasing stability fee reward (pulled from the SF treasury) to any address.
MandatoryFixedTreasuryReimbursement- this is a contract meant to be inherited from and used as a way to offer a fixed stability fee reward (pulled from the SF treasury) to any address.
IncreasingRewardRelayer- this is a contract meant to pull funds from the
StabilityFeeTreasuryand send them to a custom address. It inherits functionality from the
StabilityFeeTreasurywould potentially block other contracts from pulling funds or would incorrectly calculate the optimum amount of funds to keep in the contract (
SAFEEngine.coinBalance[stabilityFeeTreasury]). A bug could also prevent the treasury from sending extra unused resources to another address using
IncreasingTreasuryReimbursementcontract could block the execution of
rewardCaller()or it would make it impossible for someone to call
IncreasingTreasuryReimbursementcontract, a bug in
MandatoryFixedTreasuryReimbursementcould block the execution of
StabilityFeeTreasuryor could maliciously withdraw the permission of core contracts to pull funds. Governance could also allow malicious contracts to drain the treasury.
IncreasingTreasuryReimbursementand thus make
StabilityFeeTreasuryif two conditions are satisfied:
StabilityFeeTreasuryis part of the Level 2 Gov Minimization. That being said, governance should maintain control only over setting
totalallowances to their initial values for every address that's currently authorized to
pullFundsfrom the treasury.
FSMWrappermay need to have leftover governance (depending on how much governance wants to automate reward setting).
IncreasingRewardRelayercan have governance in the long run, depending on how much governance wants to remove themselves from the contract and also on what the contract is requesting rewards for.
MandatoryFixedTreasuryReimbursementare meant to be inherited by other contracts and so the contracts that inherit them will determine how much they can be governance minimized.