Router
Last updated
Last updated
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.
init
Initiates a deposit/redeem operation.
finish
Finishes a deposit/redeem operation.
depositStable
Deposits the specified amount of wrapped UST.
depositStable
Deposits the specified amount of wrapped UST. Returns resulting wrapped aUST to the specified address.
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
).
initDepositStable
Initiates a deposit request for the specified amount of wrapped UST.
initDepositStable
Initiates a deposit request for the specified amount of wrapped UST. Swaps resulting wrapped aUST to the specified token.
finishDepositStable
Finishes deposit operation for the specified Operation contract.
redeemStable
Redeems (withdraws) the specified amount of wrapped aUST.
redeemStable
Redeems the specified amount of wrapped aUST. Returns resulting wrapped UST to the specified address.
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
).
initRedeemStable
Initiates a redemption for the specified amount of wrapped aUST.
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
).
finishRedeemStable
Finishes a redeem operation for the specified Operation contract.
Name
Type
Description
_type
IOperation.Type
Operation type. Can be either of deposit or redeem (withdraw)
_operator
address
Address of operation requester
_amount
uint256
Amount of wrapped UST/aUST used in operation
_swapper
address
Swapper contract that defines logic for swapping tokens
_swapDest
address
Address of token to receive post-operation
_autoFinish
bool
Indicator to signal whether to have the corresponding finish operation automated
Name
Type
Description
_operation
address
Address of Operation contract to call finish
Name
Type
Description
_amount
uint256
Amount of wrapped UST to deposit
Name
Type
Description
_operator
address
Address to receive resulting wrapped aUST
_amount
uint256
Amount of wrapped UST to deposit
Name
Type
Description
_operator
address
Address to receive resulting tokens
_amount
uint256
Amount of wrapped UST to deposit
_swapper
address
Swapper contract that defines logic for swapping tokens
_swapDest
address
Address of token to receive post-deposit
Name
Type
Description
_amount
uint256
Amount of wrapped UST to deposit
Name
Type
Description
_amount
uint256
Amount to wrapped UST to deposit
_swapper
address
Swapper contract that defines logic for swapping tokens
_swapDest
address
Address of token to receive post-deposit
Name
Type
Description
_operation
address
Address of Operation contract to call finish
Name
Type
Description
_amount
uint256
Amount of wrapped aUST to redeem
Name
Type
Description
_operator
address
Address to receive resulting wrapped UST
_amount
uint256
Amount of wrapped aUST to redeem
Name
Type
Description
_operator
address
Address to receive resulting tokens
_amount
uint256
Amount of wrapped aUST to redeem
_swapper
address
Swapper contract that defines logic for swapping tokens
_swapDest
address
Address of token to receive post-redemption
Name
Type
Description
_amount
uint256
Amount of wrapped aUST to redeem
Name
Type
Description
_amount
uint256
Amount of aUST tokens to redeem
_swapper
address
Swapper contract that defines logic for swapping tokens
_swapDest
address
Address of token to receive post-redemption
Name
Type
Description
_operation
address
Address of Operation contract to call finish