Skip to content

Commit

Permalink
Readable order of operations (#917)
Browse files Browse the repository at this point in the history
* Readable order of operations

* Remove extra space
  • Loading branch information
grandizzy committed Jun 30, 2023
1 parent 0332f34 commit 04adfed
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 04adfed

Please sign in to comment.