Superform v1
  • Introduction
  • Components
    • Protocol
    • Keepers
    • API
    • App
  • E2E Flows
    • Same-chain Deposit
    • Cross-chain Deposit
    • Same-chain Withdrawal
    • Cross-chain Withdrawal
  • Periphery Contracts
    • SuperformRouter
      • SuperformRouterPlus
      • SuperformRouterPlusAsync
    • PayMaster
    • PaymentHelper
    • EmergencyQueue
    • SuperformFactory
    • Forms
      • ERC4626Form
      • ERC5115Form
      • ERC7540Form
    • SuperPositions
      • ERC1155A
    • RewardsDistributor
  • Core Contracts
    • State Registries
      • CoreStateRegistry
      • AsyncStateRegistry
      • PayloadHelper
    • AMB Implementations
      • LayerzeroImplementation
      • LayerzeroV2Implementation
      • WormholeARImplementation
      • HyperlaneImplementation
      • AxelarImplementation
    • Broadcasting
      • BroadcastRegistry
      • WormholeSRImplementation
    • Bridge Validators
      • LiFiValidator
      • SocketValidator
      • SocketOneInchValidator
      • DebridgeValidator (and forwarder)
      • OneInchValidator
    • DstSwapper
    • Settings
      • SuperRBAC
      • SuperRegistry
  • SuperVaults
    • SuperVaults
  • Resources
    • Deployment Addresses
    • Subgraphs
      • Protocol Level Entities
      • Form Related Entities
      • Deposits and Withdrawals
      • SuperPosition Events
      • External Entities
    • Infrastructure Integrations
    • Security & Audits
    • Protocol License
    • Glossary
    • Protocol Multisig
    • Superform Labs Socials
Powered by GitBook
On this page
  • Phase 0: Route Generation and Selection
  • Phase 1: Swapping and Depositing into Vault(s)

Was this helpful?

  1. E2E Flows

Same-chain Deposit

Last updated 11 months ago

Was this helpful?

Phase 0: Route Generation and Selection

  1. The user selects a vault to deposit into, a funding token, and the amount to deposit into the vault

  2. User requests routes from the Superform API

  3. User selects a route

  4. User approves permit2 contract for the funding token (if needed)

Phase 1: Swapping and Depositing into Vault(s)

Atomic phase

  1. Once the request is initiated, the tokens may be swapped to the target vault's underlying token if the funding token differs from the underlying

  2. directDepositIntoVault is called and tokens are deposited into the target vault via the target vault's Superform contract

  3. Vault shares are minted to target vault’s

User calls singleDirectSingleVaultDeposit. The function sends the funding tokens and data containing the desired swap route to the . The function parameters are complex; therefore, using the Superform API to generate valid function parameters is suggested

are minted to the user

SuperformRouter
SuperPositions