Direct calls

Redeem lvlUSD for USDC:

  • First, call initiateRedeem() with the following variables:

    • asset (address): the collateral asset to redeem for. Use USDC's Ethereum Mainnet address (0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48)

    • lvlUsdAmount (uint256): the amount of lvlUSD to redeem. lvlUSD is an 18-decimal token

    • minAssetAmount (uint256): the minimum amount of collateral to receive back, to the collateral's precision. For example, to receive back $1 in USDC, input 1e6

  • Two seconds later, call completeRedeem() with the following variables:

    • asset (address): the desired collateral asset. Must be the same address you inputted when calling initiateRedeem().

    • beneficiary (address): the address to receive the collateral asset

  • Note: if you call initiateRedeem() twice, you will restart the cooldown period

Last updated