Solution For Omnistake
Step 1: Route Generation and Selection
User selects a vault, funding token, and deposit amount.
Routes are requested from the
Allspark API
.A route is selected by the user.
If necessary, the user approves the
permit
contract for the funding token.
Step 2: Bridging Liquidity and Message
User initiates a cross-chain deposit by calling the
otherXChainVaultDeposit
function.Tokens may be swapped if needed, either before or after the bridge.
AllsparkRouter bridges the tokens via the selected route.
AllsparkRouter generates a payload and proof, then dispatches them via the specified AMBs.
The cross-chain payment is sent to the
allsparkPay
contract on the source chain.
Step 3: Receiving Liquidity and Data
Payload, payload proof, and tokens are received by
blastStateRegistry
on the destination chain.Liquidity/tokens are processed by
blastStateRegistry
orblastAggSwapper
if necessary.Updater message finalizes the amount of tokens received before deposit processing.
Step 4: Depositing and Sending Acknowledgment to Source
Processor triggers the deposit into the target vault by calling processPayload.
Tokens are deposited into the target vault via the target vault’s contract.
Vault shares are minted to the target vault.
Destination
blastStateRegistry
generates an acknowledgment payload and proof, then dispatches them back to the source chain via the same AMBs used in the initial request.The exact amount of vault shares minted is sent back to the source chain, allowing for the equivalent amount of certificates to be minted to the depositing user.
Last updated