Mandatory Fixed Treasury Reimbursement
Integration contract meant to offer a fixed reward pulled from the SF treasury
MandatoryFixedTreasuryReimbursementis 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.
removeAuthorization- auth mechanisms
fixedReward- the fixed reward sent by the
treasuryto a fee receiver
treasury- stability fee treasury contract
treasuryAllowance() public view returns (uint256)- return the amount of SF that the treasury can transfer in one transaction when called by the reimbursement contract
getCallerReward() public view returns (uint256 reward)- get the actual reward that can be pulled from the SF treasury by taking the minimum value between the
fixedRewardand the total amount that can be sent by the
treasuryin one block
rewardCaller(proposedFeeReceiver: address) internal- internal function to send a SF reward to a fee receiver by calling the
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 account
RemoveAuthorization- emitted when an address is de-authorized. Contains:
account- the address that was de-authorized
ModifyParameters- emitted when a parameter is updated.
RewardCaller- emitted when the contract rewards an address with SF coming from the
finalFeeReceiver- the address that got the reward
fixedReward- the reward that was sent
rewardCalleris 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
getCallerRewardcan be used to retrieve the current SF fee that can be pulled from the treasury.