Repaying Loans

To repay your loan, click the "Close" button on your active position to open the repayment modal.

There are 2 methods to repay loans: WIth $BERA, and with existing collateral. The latter option is beneficial when:

  • You don't have sufficient BERA in your wallet to repay the loan

  • You want to exit your BREAD position entirely

  • You prefer the simplicity of a single transaction to close your position

  • The current exchange rate makes it economically beneficial to convert your BREAD to BERA

Repaying with $BERA

This option allows you to repay your loan using $BERA tokens from your wallet.

Repay with BERA

Step-by-Step Process:

  1. Open Repayment Modal

    • Click the "Close" button on your active position

    • The repayment modal will open with "Repay Bera" tab selected by default

  2. Verify Loan Details

    • At the top of the modal, you'll see your current borrowed amount and expiration date

  3. Enter Repayment Amount

    • In the "Amount" field, enter how much $BERA you wish to repay

    • You can choose to repay a partial amount or the full loan

    • Click the "FULL" button to automatically set the repayment to the entire borrowed amount

  4. Partial vs. Full Repayment

    • Partial Repayment: Reduces your loan balance but doesn't recover your collateral

    • Full Repayment: Completely closes your loan position and returns all collateral

  5. Execute Repayment

    • Click the "Repay" button at the bottom of the modal

    • Confirm the transaction in your wallet

    • Once processed, your loan balance will update (or position will close if fully repaid)

Repaying with Existing Collateral (Flash Burn)

This option allows you to repay your loan using your locked $BREAD collateral, without needing additional $BERA.

Repay with Collateral

Step-by-Step Process:

  1. Open Repayment Modal

    • Click the "Close" button on your active position

    • Switch to the "Existing Collateral" tab in the repayment modal

  2. Review Collateral Details

    • The interface displays your current collateral amount and its equivalent value in $BERA

  3. Understand the Flash Burn Mechanism

    • Your $BREAD collateral will be burned (converted to $BERA)

    • A burn fee (2.69%) is deducted from the conversion

    • The resulting $BERA is used to repay your loan

    • Any excess value is returned to you as $BERA

  4. Confirm Repayment

    • Click the "Repay" button at the bottom of the modal

    • Confirm the transaction in your wallet

    • Once processed, your loan will be closed and any excess value sent to your wallet

Flash Burn Example

        // Assume BREAD/BERA = 1.10
        // I own 90.90 BREAD = 100 BERA worth of BREAD
        // I max borrow against it for 1 year
        // Max borrow possible is 99 BERA
        // Interest fee = 99 * 6.9% APR
        // Thus, borrow amount = 99 BERA and bera received = 92.169 BERA
        // Collateral = 100 BERA (worth of) BREAD = 90.90 BREAD

        // Assume BREAD/BERA rises to 1.20, and now I want to close my position

        // Option 1: close the loan normally.
        // I flash borrow (elsewhere, assume for 0 cost) and pay back 99 BERA
        // I receive 90.90 BREAD
        // I burn the BREAD for 90.90 * 1.20 = 109.08 BERA - 2.69% burn fee
        // I receive 106.145 BERA and pay back by flash borrow, I netted 106.145 - 99 BERA = 7.145 BERA

        // Option 2: I call flashBurn()
        // My entire BREAD collateral (90.90 BREAD) is burned
        // My collateral was worth 90.90 * 1.20 = 109.08 BERA
        // The fee is 109.08 * burnFee = 109.08 * 2.69% = 2.93 BERA
        // Remaining collateral in BERA after fee = 109.08 - 2.934 = 106.145 BERA
        // 106.145 BERA must be worth more than the borrowed amount (99 BERA) -> which it is
        // I get back collateral value - borrowed - fee = 106.145 BERA - 99 BERA = 7.145 BERA
        // Note this is the exact same outcome as Option 1

Last updated