Skip to content

Commit

Permalink
Readable order of operations
Browse files Browse the repository at this point in the history
  • Loading branch information
grandizzy committed Jun 30, 2023
1 parent 0332f34 commit 495aec6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/libraries/external/PoolCommons.sol
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ library PoolCommons {
if (poolState_.debt != 0) {
// calculate meaningful actual utilization for interest rate update
mau = int256(_utilization(debtEma_, depositEma_));
mau102 = mau * PERCENT_102 / 1e18;
mau102 = (mau * PERCENT_102) / 1e18;
}

// calculate target utilization
Expand Down
2 changes: 1 addition & 1 deletion src/libraries/helpers/PoolHelper.sol
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,7 @@ import { Maths } from '../internal/Maths.sol';
uint256 collateral_,
uint256 momp_
) pure returns (uint256 bondFactor_, uint256 bondSize_) {
uint256 thresholdPrice = borrowerDebt_ * Maths.WAD / collateral_;
uint256 thresholdPrice = (borrowerDebt_ * Maths.WAD) / collateral_;

// bondFactor = min(30%, max(1%, (MOMP - thresholdPrice) / MOMP))
if (thresholdPrice >= momp_) {
Expand Down

0 comments on commit 495aec6

Please sign in to comment.