Component: VaultCrossChainManager
Description
The VaultCrossChainManager contract is responsible for sending and receiving cross-chain messages between the EVM and Orderly chains. It inherits from the LayerZero V2 OApp. It handles six types of cross-chain messages:
Liquidity Provider Deposit
Liquidity Provider Withdraw
Strategy Provider Deposit
Strategy Provider Withdraw
Distribute Assets
Update Claimable Amount
Invariants
Deposit and withdraw processing
When receiving deposit or withdraw messages on the Orderly chain, it calls
handleOpFromVault
in the Protocol Vault Ledger contract to process the deposit or withdraw operation.
Distribute assets
When receiving distribute-assets messages on the EVM chain, it calls
depositToStrategy
in the Protocol Vault contract to transfer assets to the DEX vault.
Update claimable amount
When receiving update-claimable-amount messages on the EVM chain, it calls
updateUnClaimed
in the Protocol Vault contract so providers can claim their assets.
Attack surface
Cross-chain--message integrity
This contract inherits from LayerZero V2 OApp, 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.