Skip to content

Commit

Permalink
fix: revert delete function
Browse files Browse the repository at this point in the history
  • Loading branch information
0xrusowsky committed Aug 3, 2023
1 parent 946fb51 commit 0abdb8d
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/ClearingHouse.sol
Original file line number Diff line number Diff line change
Expand Up @@ -270,4 +270,11 @@ contract ClearingHouse is Policy, RolesConsumer, CoolerCallback {
uint256 interest = loan * interestPercent / 1e18;
return loan + interest;
}

/// @notice view function to compute the interest for a given debt amount.
/// @param debt_ amount of gOHM.
function interestFromDebt(uint256 debt_) public pure returns (uint256) {
uint256 interestPercent = (INTEREST_RATE * DURATION) / 365 days;
return debt_ * interestPercent / 1e18;
}
}

0 comments on commit 0abdb8d

Please sign in to comment.