Allspark
  • 👋Welcome to Allspark
  • 🌏Fundamental
    • Introduction
      • Blast Native Yield
      • Dapp
    • Omniyield Gateway
    • Glossary of Terms
      • Omniliquidity
      • Omniyield
  • 🎮Joyful Perp Trade
    • Duel Trade
      • Backgroup And Story
      • Trading Mechanism
      • FAQ
      • How to Use
    • Mantissa Mode
      • Trading Mechanism
      • ALP-Mantissa
      • FAQ
    • Degen Mode
  • 🏦Omniyield Perpetual DEX
    • ALP Liquidity
      • Buy / Sell ALP
      • ALP Staking
      • ALP Pool Portfolio
      • Target Ratio and Fees
      • Other
        • Slippage
        • Price Impact
    • Margin System
      • Collateral Framework
      • Liquidations
      • Oracles
    • Liquidation
    • Tutorials
      • Stake
      • Trade
    • Risk Stratification
    • Referral Program
    • Terms
  • 🔄Omniyield Platform
    • Overview
    • Methodology
      • Solution For Omnistake
      • Solution For Omniwithdraw
    • Vaults
  • 🎇New Universe Campaign
    • New Universe (PHASE 1)
Powered by GitBook
On this page
  • Step 1: Preparation and Route Selection
  • Step 2: Burning Allspark Vouchers and Sending Data
  • Step 3: Receiving Data and Token Withdrawal
  • Step 4: Receiving Tokens on the Target Chain
  1. Omniyield Platform
  2. Methodology

Solution For Omniwithdraw

Step 1: Preparation and Route Selection

  • The user selects Blast vaults to withdraw from, a target token, and the amount to withdraw from each vault.

  • Routes are requested from the Allspark API.

  • A route is selected by the user.

  • The user approves the Allspark voucher contract to burn selected vouchers if necessary.

Step 2: Burning Allspark Vouchers and Sending Data

  • The user calls the blastChainVaultWithdraw function to burn the designated amount of Allspark vouchers.

  • Allspark Router generates a payload and proof containing blastVaultSFData and calls dispatchPayload to send them via the specified AMBs.

  • The Allspark Router sends the cross-chain payment to the allsparkPay contract on the source chain.

Step 3: Receiving Data and Token Withdrawal

  • Payload and payload proof are received by the blastStateRegistry on the destination chain.

  • The processor keeper calls processPayload to trigger the withdrawal of underlying tokens from the target vault.

  • At this point, underlying tokens can be swapped into the target token if it's not the underlying token.

  • If the target token is on another chain, the tokens will be bridged to the target chain; otherwise, they'll be sent to the user's address on the Blast chain.

Step 4: Receiving Tokens on the Target Chain

  • If the target chain is different from the blast chain, tokens will be received by the user directly from the bridge contract after bridging completes.

PreviousSolution For OmnistakeNextVaults

Last updated 1 year ago

🔄