SuperformRouterPlus
Overview
The SuperformRouterPlus
contract is an extension of the SuperformRouter
contract, adding advanced functionalities for rebalancing between SuperPositions or entering the system with ERC4626 shares. This contract is part of the Superform ecosystem and builds on the core functionalities provided in the base SuperformRouter
.
Key Features
Extends the base router contract functionality.
Supports rebalancing of superPositions (same chain and cross chain, via SuperformRouterPlusAsync)
Allows users to enter into Superform with 4626 shares
Functions
rebalanceSinglePosition
rebalanceSinglePosition
Parameters:
Name | Description |
---|---|
| The uint256 ID of the position to rebalance. |
| The uint256 amount of shares to redeem from the position. |
| The expected uint256 amount of assets to be received after the rebalance. |
| The uint256 ETH amount sent to cover the rebalance from operation. |
| The uint256 ETH amount sent to cover the rebalance to operation. |
| The address of the interim asset used for the rebalance process. |
| The uint256 maximum allowable slippage for the rebalance. |
| The address of the receiver. This is the address to receive the rebalanced position. |
| The call data for the rebalance from function. |
| The call data for the rebalance to function. |
Description:
This function facilitates rebalancing a single SuperPosition synchronously, ensuring that interim assets and receiver addresses are properly handled.
rebalanceMultiPositions
rebalanceMultiPositions
Parameters:
Name | Description |
---|---|
| An array of position IDs to rebalance. |
| An array of share amounts to redeem for each position. |
| The total expected amount to be received after the rebalance. |
| The ETH amount sent for covering the rebalance from operation. |
| The ETH amount sent for covering the rebalance to operation. |
| The interim asset used in the rebalance process. |
| The allowable slippage for the rebalance. |
| The address to receive the rebalanced positions. |
| The call data for the rebalance from function. |
| The call data for the rebalance to function. |
Description:
This function rebalances multiple SuperPositions synchronously. It ensures the proper handling of interim assets, slippage, and receiver addresses across all positions.
startCrossChainRebalance
startCrossChainRebalance
Parameters:
Name | Description |
---|---|
| The ID of the position being rebalanced. |
| The number of shares to redeem. |
| The address to receive the rebalanced position. |
| The interim asset used during the cross-chain rebalance. |
| The slippage tolerance during the finalization step of the rebalance. |
| The expected amount of interim asset to receive. |
| The selector of the rebalance function to call on the destination chain. |
| The call data to pass along for the rebalance. |
| The array of AMB (Asynchronous Message Bus) IDs for the rebalance. |
| The destination chain IDs for cross-chain rebalances. |
| Additional data required for Superform functionality during the rebalance. |
Description:
This function initiates the cross-chain rebalance of a single position, transferring interim assets across chains and managing slippage tolerances and message passing.
startCrossChainRebalanceMulti
startCrossChainRebalanceMulti
Parameters:
| An array of position IDs to rebalance. |
| The number of shares to redeem for each position. |
| The address to receive the rebalanced positions. |
| The interim asset used during the cross-chain rebalance. |
| The slippage tolerance for finalization. |
| The expected amount of interim asset to receive. |
| The selector of the rebalance function to call on the destination chain. |
| The call data to pass for the rebalance. |
| The array of AMB (Asynchronous Message Bus) IDs. |
| The destination chain IDs. |
| Additional data for Superform-specific rebalances. |
Description:
This function starts the cross-chain rebalance of multiple positions, handling all details of cross-chain transfers, interim assets, and rebalancing logic across multiple positions.
deposit4626
deposit4626
Parameters:
Name | Description |
---|---|
| The address of the ERC4626 vault from which to redeem tokens. |
| The amount of tokens to deposit. |
| The expected output amount from the deposit. |
| The maximum allowable slippage for the deposit. |
| The address to receive the deposited tokens. |
| The call data to execute the deposit operation. |
Description:
This function deposits ERC4626 vault shares into Superform, handling slippage tolerances and receiver addresses, and facilitates interacting with the Superform ecosystem through ERC4626 shares.
Last updated