Skip to content

Commit

Permalink
docs: move comment to the right place
Browse files Browse the repository at this point in the history
  • Loading branch information
MerlinEgalite committed Nov 6, 2023
1 parent 94753ff commit 3eb9580
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/SpeedJumpIrm.sol
Original file line number Diff line number Diff line change
Expand Up @@ -164,9 +164,9 @@ contract AdaptativeCurveIrm is IIrm {
/// r = ((1-1/C)*err + 1) * rateAtTarget if err < 0
/// ((C-1)*err + 1) * rateAtTarget else.
function _curve(uint256 _rateAtTarget, int256 err) private view returns (uint256) {
// Safe "unchecked" cast because err >= -1 (in WAD).
uint256 steeringCoeff = err < 0 ? WAD - WAD.wDivDown(CURVE_STEEPNESS) : CURVE_STEEPNESS - WAD;

// Safe "unchecked" cast because err >= -1 (in WAD).
return uint256(steeringCoeff.wMulDown(err) + WAD_INT).wMulDown(_rateAtTarget);
}
}

0 comments on commit 3eb9580

Please sign in to comment.