Cross-Chain Transfers & Accounting
Configuring a Bridge
Adapters and composers are the operational plumbing that make omnichain transfers and accounting work.
Adapters (e.g.,
LzAdapter) handle message transmission across chains.Composers (e.g.,
MoreVaultsComposer) handle local user deposits and refunds.
Curators verify their configuration before accepting deposits.
Verify Trusted OFTs
Each OFT of available assets including shares of another vault that you wish to bridge to another chain must be trusted by the local adapter.
LzAdapter.isTrustedOFT(oftAddress)If false, contact protocol ops to whitelist. Only the core team can administer the list of verified OFTs.
LzAdapter.setTrustedOFTs(address[] ofts, bool[] trusted)Verify Composer Linkage
Ensure each vault has an assigned composer:
VaultsFactory.getVaultComposer(vaultAddress)Confirm LayerZero Parameters
LzAdapter.setGasLimit(uint256 newLimit);
LzAdapter.setSlippage(uint256 newSlippageBps);Use conservative values early on. Slippage should reflect your strategy’s tolerance.
Executing Cross‑Chain Transfers
Curators initiate these transfers to rebalance liquidity or fulfill cross‑chain allocations.
Quote the Fee
This determines the native fee required for the LayerZero message.
Execute the Transfer
adapter: address of theLzAdapter.token: asset to transfer.amount: amount in asset units.bridgeSpecificParams: the same encoded blob from fee quoting.
msg.value: must equal or exceed the quoted fee.
Behind the scenes:
The adapter packages and sends an OFT message.
The destination chain receives the message, performs checks and finalizes the token transfer.
If the transfer fails, the composer triggers a refund to
refundAddress.
Confirm Execution
Monitor BridgeExecuted (source) event. When successful, the destination vault’s balance and accounting increase.
Running Cross‑Chain Accounting and NAV Updates
Cross‑chain accounting keeps the hub’s NAV accurate. Deposits and withdrawals triggers a read cycle. Spokes calculate their total assets and report back to the hub.
Quote Accounting Fee
extraOptions = executor settings (gas, refund address).
Initiate the Request
The call broadcasts a read request to all connected spokes.
Wait for Responses
Each spoke sends its USD‑valued totalAssets back via LayerZero read channel. The hub aggregates these responses into one composite view.
Finalize and Update NAV
For each deposit or withdrawal, this consolidates all values and emits AccountingInfoUpdated. The hub’s VaultFacet.totalAssetsUsd() now reflects the unified NAV for a particular user action. The user can then finalize the deposit or withdrawal request to complete the action.
Verify
This function returns info about if a deposit request was fulfilled and with which values such as totalNAV. Check for readSuccess = true to confirm a complete accounting cycle.
Operational Controls and Maintenance
Curators maintain vault stability by controlling adapter parameters, gas costs, and slippage, and by pausing operations if conditions degrade.
Pause/Resume per Chain
When a cross-chain transfer is initiated, the vault will be automatically paused and deposits will be paused. This ensures that share price manipulation cannot occur due to misreported NAV during the transfer. The curator must unpause the vault when the cross-chain transfer finalizes in order to reopen deposits.
Adjust Execution Settings
Tune gas based on current LayerZero relayer costs. Update slippage if your strategy changes risk tolerance.
Inspect Mesh Health
Ensure every spoke is connected and each OFT remains trusted.
Last updated