Assessment reports>Prisma Finance>Threat Models>getCurrentICR

Function: getCurrentICR(address _borrower, uint256 _price)

Return the current collateral ratio (ICR) of a given trove.

Inputs

  • _borrower

    • Control: Fully controlled.

    • Constraints: No constraints.

    • Impact: The address of the trove owner.

  • _price

    • Control: Fully controlled.

    • Constraints: No constraints.

    • Impact: Current price of collateral.

Branches and code coverage (including function calls)

Intended branches

  • Calculates the cuurent ICR of the trove using PrismaMath._computeCR.

  • Return the maximal value for uint256 if the trove has a debt of zero. Represents "infinite" CR.

Zellic © 2025Back to top ↑