Same-chain Withdrawal
Last updated
Last updated
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
User requests routes from the Superform API
User selects a route for each vault
User approves SuperPosition contract to burn selected SuperPositions (if needed)
Atomic Phase
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
directWithdrawFromVault
is called and vault shares are redeemed from the target vault for the underlying tokens
Underlying tokens may be swapped or bridged at this point into the target token if the target token is not the underlying token
Target token is sent to the user