Single Spot Debt Ceiling Setter
Setter for a single collateral's debt ceiling
SingleSpotDebtCeilingSetteris meant to recompute the
debtCeilingfor a single collateral type inside the
SAFEEngine. The setter inherits functionality from the IncreasingTreasuryReimbursement.
removeManualSetter- auth mechanism for addresses that can call
maxCollateralCeiling- the max amount of system coins that can be generated using the collateral type with
minCollateralCeiling- the min amount of system coins that must be generated using the collateral type with
ceilingPercentageChange- premium on top of the current amount of debt (backed by the collateral type with
collateralName) minted. This is used to calculate a new ceiling
lastUpdateTime- when the debt ceiling was last updated
updateDelay- enforced time gap between calls
lastManualUpdateTime- last timestamp of a manual update
blockIncreaseWhenRevalue- flag that blocks an increase in the debt ceiling when the redemption rate is positive
blockDecreaseWhenDevalue- flag that blocks a decrease in the debt ceiling when the redemption rate is negative
collateralName- the targeted collateral's name
modifyParameters- modifies contract parameters
autoUpdateCeiling(feeReceiver: address) external- periodically updates the debt ceiling for the collateral type with
collateralName. Can be called by anyone
manualUpdateCeiling()- authed function that allows
manualSettersto update the debt ceiling whenever they want
getNextCollateralCeiling() public view returns (uint256)- view function meant to return the new and upcoming debt ceiling. It also checks for
getRawUpdatedCeiling() external view returns (uint256)- view function meant to return the new and upcoming debt ceiling. It does not perform checks for
updatedCeiling: uint256) public view returns (allowsIncrease: bool)- view function meant to return whether an increase in the debt ceiling is currently allowed
updatedCeiling: uint256) public view returns (allowsDecrease: bool)- view function meant to return whether a decrease in the debt ceiling is currently allowed
isManualSetter- checks whether an address is part of
AddManualSetter- emitted when a new manual setter is added. Contains:
account- new manual setter address
RemoveManualSetter- emitted when a manual setter address is removed/blacklisted. Contains:
account- the setter address that's removed
UpdateCeiling- emitted when a new ceiling is computed and set. Contains:
nextCeiling- the new ceiling
manualUpdateCeilingcan both be used to recompute the debt ceiling for the collateral type with
collateralName, although manualUpdateCeilingcan only be called by whitelisted
getNextCollateralCeilingto calculate the new ceiling.
getNextCollateralCeilingtakes into account
allowsDecreaseto determine whether it is allowed to computed a higher or a lower ceiling (compared to the current one).
allowsDecreaselook at the current
redemptionRateas well as at
blockDecreaseWhenDevalueto see whether they should allow or disallow an increase or decrease in the debt ceiling.
blockDecreaseWhenDevalueare by default set to zero so increases or decreases are always allowed, no matter what sign the redemption rate has.