Same-chain Deposit

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. User calls singleDirectSingleVaultDeposit. The function sends the funding tokens and data containing the desired swap route to the SuperformRouter. The function parameters are complex; therefore, using the Superform API to generate valid function parameters is suggested

  2. 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

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

  4. Vault shares are minted to target vault’s

  5. SuperPositions are minted to the user

Last updated