Same-chain Deposit
Phase 0: Route Generation and Selection
The user selects a vault to deposit into, a funding token, and the amount to deposit into the vault
User requests routes from the Superform API
User selects a route
User approves permit2 contract for the funding token (if needed)
Phase 1: Swapping and Depositing into Vault(s)
Atomic phase
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 suggestedOnce the request is initiated, the tokens may be swapped to the target vault's underlying token if the funding token differs from the underlying
directDepositIntoVault
is called and tokens are deposited into the target vault via the target vault'sSuperform
contractVault shares are minted to target vault’s
SuperPositions are minted to the user
Last updated