Repaying

The repayment process involves the return of the borrowed asset and the corresponding release of the collateral asset. The protocol checks the debt NFT associated with the debt and retrieves the following information:

  • ID: The unique identifier for the debt NFT

  • Collateral Size: The amount of collateral provided during borrowing.

  • Borrow Price: The price at which the asset was borrowed

  • Borrow Type: Indicates whether the borrowing occurred above or below the active market price.

Example 1: Repaying Debt Borrowed Below Market Price

  • The contract checks the debt NFT data which includes:

    • ID: 12345

    • Collateral Value: 1 NAD

    • Borrow Price: 1000 USDC

  • Repay Fee: 0.03% as an example

  • To Repay: 1000.3 USDC = (collateral size×borrow price)+repay fee(\text {collateral size} \times \text {borrow price})+\text{repay fee}

Example 2: Repaying Debt Borrowed Above the Market Price

  • The contract checks the debt NFT data which includes:

    • ID: 67890

    • Collateral size: 1000 USDC

    • Borrow Price: 2250 USDC

  • Repay Fee: 0.11% as an example

  • To Repay: 0.449 NAD =(collateral sizeborrow price)+repay fee(\dfrac {\text{collateral size}} {\text{borrow price}})+\text{repay fee}

REPAY ARCHITECTURE

Last updated