Skip to content

MarketCapsRiskSteward

Contract that can update supply and borrow caps updates received from RiskStewardReceiver.

This page follows MarketCapsRiskSteward.sol at v2.15.0. On BNB mainnet at block 118369568, proxy 0x816FfD00A274EDE0091421F77817ca260Db3a3E3 used implementation 0x6c4538b7e85b073099BFf08B43F7273E4792Bb43, matching the tagged artifact. Destination-mainnet deployment must be verified separately; the stable tag contains destination instances on testnets.

The update type for supply caps

string SUPPLY_CAP

The update type key for supply caps (keccak256 hash of SUPPLY_CAP)

bytes32 SUPPLY_CAP_KEY

The update type for borrow caps

string BORROW_CAP

The update type key for borrow caps (keccak256 hash of BORROW_CAP)

bytes32 BORROW_CAP_KEY

Address of the RiskStewardReceiver used to validate incoming updates

contract IRiskStewardReceiver RISK_STEWARD_RECEIVER

Sets the immutable RiskStewardReceiver address and disables initializers

constructor(address riskStewardReceiver_) public
NameTypeDescription
riskStewardReceiver_addressThe address of the RiskStewardReceiver
  • Throws ZeroAddressNotAllowed if the RiskStewardReceiver address is zero

Initializes the contract as ownable and access controlled.

function initialize(address accessControlManager_) external
NameTypeDescription
accessControlManager_addressThe address of the access control manager

Sets the safe delta bps

function setSafeDeltaBps(uint256 safeDeltaBps_) external
NameTypeDescription
safeDeltaBps_uint256The new safe delta bps
  • Emits SafeDeltaBpsUpdated with the old and new safe delta bps
  • Controlled by AccessControlManager
  • Throws InvalidSafeDeltaBps if the safe delta bps is greater than MAX_BPS
  • Throws RedundantValue if the new safe delta bps is equal to the current value

Checks if an update is safe for direct execution (no timelock required)

function isSafeForDirectExecution(struct RiskParameterUpdate update) external view returns (bool)
NameTypeDescription
updatestruct RiskParameterUpdateThe update to check
NameTypeDescription
[0]boolTrue if update is safe for direct execution, false if timelock is required
  • Throws UnsupportedUpdateType if the update type is not supported
  • Throws RedundantValue if the new cap value is equal to the current cap value

Applies a market cap update from the RiskStewardReceiver. Directly updates the market supply or borrow cap on the market’s comptroller.

function applyUpdate(struct RiskParameterUpdate update) external
NameTypeDescription
updatestruct RiskParameterUpdateRiskParameterUpdate update to apply
  • Emits SupplyCapUpdated or BorrowCapUpdated depending on the update with the updateId, market and new cap
  • Only callable by the RiskStewardReceiver
  • Throws OnlyRiskStewardReceiver if the sender is not the RiskStewardReceiver
  • Throws UnsupportedUpdateType if the update type is not supported