-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Extract coeff computation in curve
function
#59
Conversation
curve
function
c123cfd
to
a136b50
Compare
src/SpeedJumpIrm.sol
Outdated
@@ -163,11 +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) { | |||
uint256 steeringCoeff = err < 0 ? WAD - WAD.wDivDown(CURVE_STEEPNESS) : CURVE_STEEPNESS - WAD; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is not the steering coefficient but the steering coefficient divided by _rateAtTarget
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So what name do you suggest? just coeff
? coeffAdjusted
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest my proposal lol
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or we can divide by the denominator now
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes but it's not readable to me
a136b50
to
80e075e
Compare
done in #54 |
Based on this suggestion.