Same-chain Withdrawal

Phase 0: Route Generation and Selection

  1. User selects vaults to withdraw from (SuperPositions must all be on the same chain), a target token, and the amount to withdraw from each vault

  2. User requests routes from the Superform API

  3. User selects a route for each vault

  4. User approves SuperPosition contract to burn selected SuperPositions (if needed)

Phase 1: Withdrawing from Vaults and Swapping to Target Token

Atomic Phase

  1. User calls singleDirectSingleVaultWithdraw. The function burns the user designated amount of SuperPositions. The function parameters are complex; therefore, using the Superform API to generate valid function parameters is encouraged

  2. directWithdrawFromVault is called and vault shares are redeemed from the target vault for the underlying tokens

  3. Underlying tokens may be swapped or bridged at this point into the target token if the target token is not the underlying token

  4. Target token is sent to the user

Last updated