MandatoryFixedTreasuryReimbursement
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.authorizedAccounts[usr: address]
- addAuthorization
/removeAuthorization
- auth mechanismsfixedReward
- the fixed reward sent by the treasury
to a fee receivertreasury
- stability fee treasury contracttreasuryAllowance() public view returns (uint256)
- return the amount of SF that the treasury can transfer in one transaction when called by the reimbursement contractgetCallerReward() public view returns (uint256 reward)
- get the actual reward that can be pulled from the SF treasury by taking the minimum value between the fixedReward
and the total amount that can be sent by the treasury
in one blockrewardCaller(proposedFeeReceiver: address) internal
- internal function to send a SF reward to a fee receiver by calling the treasury
isAuthorized
- checks whether an address is part of authorizedAddresses
(and thus can call authed functions)AddAuthorization
- emitted when a new address becomes authorized. Contains:account
- the new authorized accountRemoveAuthorization
- emitted when an address is de-authorized. Contains:account
- the address that was de-authorizedModifyParameters
- emitted when a parameter is updated.RewardCaller
- emitted when the contract rewards an address with SF coming from the treasury
. Contains:finalFeeReceiver
- the address that got the rewardfixedReward
- the reward that was sentrewardCaller
is the most important function in this contract. It takes care of pulling a fixed SF reward from the treasury and then sending it to a proposedFeeReceiver
.getCallerReward
can be used to retrieve the current SF fee that can be pulled from the treasury.