Router
The Router contract routes deposit/redeem requests by assigning operation contracts.
Note that the Router contract only supports wrapped UST and wrapped aUST for deposits and redemptions. For operations that involve non-UST stablecoins, interactions should be made via the ConversionPool contracts.
Functions
init
init
Initiates a deposit/redeem operation.
Name | Type | Description |
| IOperation.Type | Operation type. Can be either of deposit or redeem (withdraw) |
| address | Address of operation requester |
| uint256 | Amount of wrapped UST/aUST used in operation |
| address | Swapper contract that defines logic for swapping tokens |
| address | Address of token to receive post-operation |
| bool | Indicator to signal whether to have the corresponding finish operation automated |
finish
finish
Finishes a deposit/redeem operation.
Name | Type | Description |
| address | Address of Operation contract to call finish |
depositStable
depositStable
Deposits the specified amount of wrapped UST.
Name | Type | Description |
| uint256 | Amount of wrapped UST to deposit |
depositStable
depositStable
Deposits the specified amount of wrapped UST. Returns resulting wrapped aUST to the specified address.
Name | Type | Description |
| address | Address to receive resulting wrapped aUST |
| uint256 | Amount of wrapped UST to deposit |
depositStable
depositStable
Deposits the specified amount of wrapped UST. Swaps resulting wrapped aUST to the specified token (_swapDest
) using logic defined in the specified swapper contract (_swapper
), and returns tokens to the specified address (_operator
).
Name | Type | Description |
| address | Address to receive resulting tokens |
| uint256 | Amount of wrapped UST to deposit |
| address | Swapper contract that defines logic for swapping tokens |
| address | Address of token to receive post-deposit |
initDepositStable
initDepositStable
Initiates a deposit request for the specified amount of wrapped UST.
Name | Type | Description |
| uint256 | Amount of wrapped UST to deposit |
initDepositStable
initDepositStable
Initiates a deposit request for the specified amount of wrapped UST. Swaps resulting wrapped aUST to the specified token.
Name | Type | Description |
| uint256 | Amount to wrapped UST to deposit |
| address | Swapper contract that defines logic for swapping tokens |
| address | Address of token to receive post-deposit |
finishDepositStable
finishDepositStable
Finishes deposit operation for the specified Operation contract.
Name | Type | Description |
| address | Address of Operation contract to call finish |
redeemStable
redeemStable
Redeems (withdraws) the specified amount of wrapped aUST.
Name | Type | Description |
| uint256 | Amount of wrapped aUST to redeem |
redeemStable
redeemStable
Redeems the specified amount of wrapped aUST. Returns resulting wrapped UST to the specified address.
Name | Type | Description |
| address | Address to receive resulting wrapped UST |
| uint256 | Amount of wrapped aUST to redeem |
redeemStable
redeemStable
Redeems the specified amount of wrapped aUST. Swaps resulting wrapped UST to the specified token (_swapDest
) using logic defined in the specified swapper contract (_swapper
), and returns tokens to the specified address (_operator
).
Name | Type | Description |
| address | Address to receive resulting tokens |
| uint256 | Amount of wrapped aUST to redeem |
| address | Swapper contract that defines logic for swapping tokens |
| address | Address of token to receive post-redemption |
initRedeemStable
initRedeemStable
Initiates a redemption for the specified amount of wrapped aUST.
Name | Type | Description |
| uint256 | Amount of wrapped aUST to redeem |
initRedeemStable
initRedeemStable
Initiates a stablecoin redemption. Swaps resulting wrapped UST to the specified token (_swapDest
) using logic defined in the specified swapper contract (_swapper
), and returns tokens to the specified address (_operator
).
Name | Type | Description |
| uint256 | Amount of aUST tokens to redeem |
| address | Swapper contract that defines logic for swapping tokens |
| address | Address of token to receive post-redemption |
finishRedeemStable
finishRedeemStable
Finishes a redeem operation for the specified Operation contract.
Name | Type | Description |
| address | Address of Operation contract to call finish |
Last updated