Redeem
Redeeming
This page explains the process of redeeming a Branded Stablecoin for a desired asset within the vault. Redemptions will burn the previously minted Branded Stablecoin from the caller's balance and in return transfer an equivalent value of the selected underlying asset to the redeemer.
Transaction Flow
Wallet
A
has some balance of theBoringVault
token.Call
Teller.bulkWithdraw(...)
The
bulkWithdraw
function will atomically burn yourBoringVault
token and transfertokenA
back to WalletA
.
Functions
bulkWithdraw
bulkWithdraw
Allows the caller to withdraw from this contract by burning the vault token and receiving assets back.
function bulkWithdraw(
ERC20 withdrawAsset,
uint256 shareAmount,
uint256 minimumAssets,
address to
)
external
requiresAuth
returns (uint256 assetsOut);
withdrawAsset
The asset that you will receive as a result of redeeming your vault tokens.
shareAmount
The amount of
BoringVault
tokens you will burn. In theBroingVault
vault token decimals.
minimumAssets
The minimum amount of the
withdrawAsset
that you want to receive.
to
The address that will receive the
withdrawAsset
as a result of the redemption.
See Example Code
Last updated