Skip to content

Commit

Permalink
docs: minor fix
Browse files Browse the repository at this point in the history
  • Loading branch information
MathisGD committed Nov 16, 2023
1 parent da8062f commit 8fbaffc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/SpeedJumpIrm.sol
Original file line number Diff line number Diff line change
Expand Up @@ -143,10 +143,10 @@ contract AdaptiveCurveIrm is IIrm {
// Riemann (a=0, b=N-1) is done when the rate goes up (err>0) and a right Riemann (a=1, b=N) is done when
// the rate goes down (err<0).
// avg ~= 1/T Σ_i=a^b curve(startRateAtTarget * exp(speed * T/N * i), err) * T / N
// ~= Σ_i=a^b curve(startRateAtTarget * exp(linearVariation/N * i), err) / N
// ~= Σ_i=a^b curve(startRateAtTarget * exp(linearAdaptation/N * i), err) / N
// curve is linear in startRateAtTarget, so:
// ~= curve(Σ_i=a^b startRateAtTarget * exp(linearVariation/N * i), err) / N
// ~= curve(Σ_i=a^b startRateAtTarget * exp(linearVariation/N * i) / N, err)
// ~= curve(Σ_i=a^b startRateAtTarget * exp(linearAdaptation/N * i), err) / N
// ~= curve(Σ_i=a^b startRateAtTarget * exp(linearAdaptation/N * i) / N, err)
int256 sumRateAtTarget;
int256 step = linearAdaptation / N_STEPS;
// Compute the terms 1 to N_STEPS - 1.
Expand Down

0 comments on commit 8fbaffc

Please sign in to comment.