Skip to content

Commit

Permalink
(demurrage): small possible gas optimisation
Browse files Browse the repository at this point in the history
  • Loading branch information
benjaminbollen committed Sep 30, 2024
1 parent 74a6435 commit 5a55b0c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/circles/Demurrage.sol
Original file line number Diff line number Diff line change
Expand Up @@ -256,9 +256,10 @@ contract Demurrage is ICirclesDemurrageErrors {
R[_dayDifference] = demurrageFactor;
}
return demurrageFactor;
} else {
return Math64x64.pow(GAMMA_64x64, _dayDifference);
}
// if the day difference is for older than 14 days, calculate the value
// and do not cache it
return Math64x64.pow(GAMMA_64x64, _dayDifference);
}

/**
Expand Down

0 comments on commit 5a55b0c

Please sign in to comment.