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

  1. Wallet A has some balance of the BoringVault token.

  2. Call Teller.bulkWithdraw(...)

  3. The bulkWithdrawfunction will atomically burn your BoringVault token and transfer tokenA back to Wallet A.

Functions

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 the BroingVault 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