triggerThresholdprotocol tokens are deposited in the contract and subsequently burned.
isAuthorized- auth mechanisms
protocolToken- address of the token that must be deposited in the
ESMin order to settle the system
globalSettlement- address of the global settlement contract
thresholdSetter- address (different from
authorizedAccounts) that is able to set the
tokenBurner- contract that will receive all deposited protocol tokens and will then burn them
triggerThreshold- minimum amount of tokens that need to be deposited in order to shut down the system
settled- flag that indicates whether global settlement has already been trigerred
isAuthorized- checks whether an address is part of
authorizedAddresses(and thus can call authed functions).
modifyParameters- change the
triggerThresholdas well as the
triggerThresholdprotocol tokens and triggers settlement
ESMis meant to be used in order to prevent an attacker from exploiting a vulnerability in the system (e.g stealing all the collateral) or to mitigate malicious governance.
triggerThresholdprotocol tokens and then automatically trigger settlement. Both actions are executed using
shutdown()which can be called by anyone.
GlobalSettlement.shutdownSystem()which in turn starts the settlement procedure.
triggerThresholdcan be changed using
modifyParameterseither by governance or by
thresholdSetterwhich can be an autonomous smart contract. This ensures that the threshold is always set to a specific percentage of the outstanding supply of protocol tokens.