-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
G (Gas Optimization)bugSomething isn't workingSomething isn't workingfixed-in-upstream-repoThis task has been implemented in the upstream repoThis task has been implemented in the upstream reposponsor confirmed
Description
Handle
pauliax
Vulnerability details
Impact
functions _mintNextPrice, _redeemNextPrice, _shiftPositionNextPrice could cache a result here and re-use it to avoid duplicate calculations of the same value:
marketUpdateIndex[marketIndex] + 1;
Also, you can extract duplicate storage access to a storage variable and update the state on it, e.g.: accumulativeFloatPerSyntheticTokenSnapshots[marketIndex][newIndex] is accessed 3 times in _setCurrentAccumulativeIssuancePerStakeStakedSynthSnapshot.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
G (Gas Optimization)bugSomething isn't workingSomething isn't workingfixed-in-upstream-repoThis task has been implemented in the upstream repoThis task has been implemented in the upstream reposponsor confirmed