Asset Bridge
The asset bridge module is responsible for handling canonical and wrapped token transfers between Solana and Solayer. It exposes two core entry points:- bridgeAssetSourceChain: This instruction is invoked on the origin chain (e.g., Solana). It deducts the bridged token amount from the user, splitting it into a fee (transferred to the handler fee vault) and a locked portion (stored in the bridge vault). A nonce is auto-incremented and a PDA is derived from the tuple (sender, recipient, mint, amount, nonce, txId) and stored as a cryptographic proof of the request.
- bridgeAssetTargetChain: This instruction is executed on the destination chain (e.g., Solayer) after guardians validate the original transaction and submit their aggregated signatures. The program verifies the multi-sig using Solana’s precompiled ed25519_program, checks the bridge proof PDA for existence on destination chain (to prevent double-processing), and then transfers the bridged asset to the recipient. If the asset is not natively available on the destination chain, a wrapped token is minted under the authority of brdige handler.
Cross-Chain Call
The cross-chain call module enables authenticated, cross-chain execution of pre-authorized instructions on the destination chain. This mechanism is particularly useful for multi-chain transactions with specific order requirements.- source chain: On the source chain, the user serializes a transaction for the destination chain and encodes it into base58 format. This payload is then submitted as payload during invocation of the crossChainCall method on thethod on the source chain.
- target chain: The Off-chain leader guardian then decodes the base58 transaction, simulates it, and then directly dispatches it to the destination chain. After successful execution, the leader guardian invokes the bridge program to create a bridge proof PDA derived from the tuple (sender, calldata, nonce, sourceTxId) to mark completion.