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: Route Generation and Selection
  • Step 2: Bridging Liquidity and Message
  • Step 3: Receiving Liquidity and Data
  • Step 4: Depositing and Sending Acknowledgment to Source
  1. Omniyield Platform
  2. Methodology

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 or blastAggSwapper 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.

PreviousMethodologyNextSolution For Omniwithdraw

Last updated 1 year ago

🔄