Skip to content

DestinationStewardReceiver

Destination‑chain contract that receives bridged updates from RiskStewardReceiver via LayerZero, enforces a fixed remote delay, and then executes the updates on the configured IRiskSteward contracts.

This page follows DestinationStewardReceiver.sol at v2.15.0. The stable tag contains destination receiver artifacts on Sepolia-family testnets, but not on the seven destination mainnets. Treat this as the stable staged-rollout API, not evidence that every production network already has this component.

The receiver uses LayerZero V2 OApp endpoint IDs (uint32) and peers, not the LayerZero V1 uint16 trusted-remote model used by Omnichain Governance.

Time before a bridged update is considered stale on the destination chain

uint256 REMOTE_UPDATE_EXPIRATION_TIME

Destination chain LayerZero endpoint ID

uint32 LAYER_ZERO_EID

Delay before a bridged update can be executed on the destination chain

uint256 remoteDelay

Mapping of supported risk configurations per update type (hashed updateType string)

mapping(bytes32 => struct IDestinationStewardReceiver.RiskParamConfig) riskParameterConfigs

Master storage of all bridged updates by update ID

mapping(uint256 => struct IDestinationStewardReceiver.DestinationUpdate) updates

Mapping from (updateType, market) to currently registered remote update ID

mapping(bytes32 => mapping(address => uint256)) lastRegisteredUpdateId

Track last executed update timestamp per (updateType, market)

mapping(bytes32 => mapping(address => uint256)) lastExecutedAt

Mapping from executor address to whitelist status

mapping(address => bool) whitelistedExecutors

Disables initializers and sets immutable values.

constructor(address endpoint_, uint32 layerZeroEid_) public
NameTypeDescription
endpoint_addressLocal LayerZero endpoint on this chain
layerZeroEid_uint32LayerZero endpoint ID for this destination chain

Initializes the contract with the Access Control Manager and owner.

function initialize(address accessControlManager_, address delegate_) external
NameTypeDescription
accessControlManager_addressThe address of the access control manager
delegate_addressThe owner (and LayerZero delegate) of this contract

Sets the risk parameter config for a given update type on the destination chain.

function setRiskParameterConfig(string updateType, address riskSteward, uint256 debounce) external
NameTypeDescription
updateTypestringThe type of update to configure (e.g., “supplyCap”, “borrowCap”)
riskStewardaddressThe address for the risk steward contract responsible for processing the update
debounceuint256The debounce period for updates of this type on the destination (anti‑DoS)
  • Emits RiskParameterConfigUpdated
  • Controlled by AccessControlManager
  • InvalidUpdateType if the update type string is empty
  • InvalidDebounce if the debounce is 0

Sets the active status of a risk parameter config

function setConfigActive(string updateType, bool active) external
NameTypeDescription
updateTypestringThe type of update to configure
activeboolThe active status to set
  • Emits ConfigActiveUpdated with the update type hash, update type, previous active status, and the active status
  • Controlled by AccessControlManager
  • Throws UnsupportedUpdateType if the update type is not supported
  • Throws ConfigStatusUnchanged if the active status is already set to the desired value

Sets the remote delay before bridged updates can be executed on the destination chain.

function setRemoteDelay(uint256 newRemoteDelay) external
NameTypeDescription
newRemoteDelayuint256The new remote delay in seconds
  • Emits RemoteDelaySet with the new remote delay value
  • Controlled by AccessControlManager
  • InvalidRemoteDelay if the delay is 0 or greater than or equal to the remote update expiration time
  • RemoteDelayUnchanged if the new delay is equal to the current delay

Sets the whitelist status of an executor on the destination chain.

function setWhitelistedExecutor(address executor, bool approved) external
NameTypeDescription
executoraddressThe address of the executor
approvedboolThe whitelist status to set (true to whitelist, false to remove)
  • Emits ExecutorStatusUpdated with the executor address, previous approval status, and new approval status
  • Controlled by AccessControlManager
  • Throws ZeroAddressNotAllowed if the executor address is zero
  • Throws ExecutorStatusUnchanged if the executor whitelist status is already set to the desired value

Executes a bridged update after its remote delay has passed.

function executeUpdate(uint256 updateId) external
NameTypeDescription
updateIduint256The bridged update ID to execute
  • Emits RemoteUpdateExecuted with the executed update ID
  • Only whitelisted executors can execute updates
  • NotAnExecutor if the caller is not a whitelisted executor
  • ConfigNotActive if the configuration for the update type is not active
  • UpdateNotFound if the update is not pending for the given (updateType, market)
  • UpdateNotUnlocked if the remote delay has not elapsed
  • UpdateIsExpired if the bridged update has expired on the destination
  • UpdateTooFrequent if the debounce period has not passed since the last execution

Rejects a registered remote update on the destination chain.

function rejectUpdate(uint256 updateId) external
NameTypeDescription
updateIduint256The oracle update ID of the update to reject
  • Emits UpdateRejected with the rejected update ID
  • Only whitelisted executors can reject updates
  • NotAnExecutor if the caller is not a whitelisted executor
  • UpdateNotFound if there is no pending update with the given ID

Returns executable updates for a given update type and comptroller.

function getExecutableUpdates(string updateType, address comptroller) external view returns (uint256[] executableUpdates)
NameTypeDescription
updateTypestringThe human‑readable identifier of the update type to filter by
comptrolleraddressThe address of the Isolated Pools Comptroller that manages the markets
NameTypeDescription
executableUpdatesuint256[]Array of update IDs that are ready to be executed

Returns the risk parameter configuration for a given update type

function getRiskParameterConfig(string updateType) external view returns (struct IDestinationStewardReceiver.RiskParamConfig)
NameTypeDescription
updateTypestringThe human-readable identifier of the update type
NameTypeDescription
[0]struct IDestinationStewardReceiver.RiskParamConfigThe risk parameter configuration

Returns the registered update for a given update type and market

function getRegisteredUpdate(string updateType, address market) external view returns (struct IDestinationStewardReceiver.DestinationUpdate)
NameTypeDescription
updateTypestringThe human-readable identifier of the update type
marketaddressThe address of the market
NameTypeDescription
[0]struct IDestinationStewardReceiver.DestinationUpdateThe registered update

Returns the last executed timestamp for a given update type and market

function getLastExecutedAt(string updateType, address market) external view returns (uint256)
NameTypeDescription
updateTypestringThe human-readable identifier of the update type
marketaddressThe address of the market
NameTypeDescription
[0]uint256The last executed timestamp

Starts the two-step ownership transfer used jointly by AccessControlledV8 and the LayerZero OApp base. The pending owner must call acceptOwnership.

function transferOwnership(address newOwner) public

Disables renounceOwnership function

function renounceOwnership() public pure
  • Throws RenounceOwnershipNotAllowed