Component: CrossChainRelayUpgradeable
Description
The CrossChainRelayUpgradeable contract is responsible for sending and receiving cross-chain messages between the chain with the ledger and the chain with the vault. It inherits from the LayerZero V1 LzApp. It does not handle any business logic; it only calls receiveMessage
in VaultCrossChainManager or LedgerCrossChainManager.
Invariants
Authorization
Only approved callers can send cross-chain messages.
Only approved source chains can send messages to this contract.
Message processing
When receiving a message, it calls
receiveMessage
in the_managerAddress
. Each CrossChainRelay contract has either VaultCrossChainManager or LedgerCrossChainManager as its_managerAddress
.
Attack surface
Cross-chain--message integrity
This contract inherits from LayerZero V1 LzApp, so it only accepts messages from the LayerZero Endpoint.
The attacker cannot manipulate messages from either the Protocol Vault Ledger or the Protocol Vault contract.