Withdraw reading from storage twice #24
Labels
bug
Something isn't working
duplicate
This issue or pull request already exists
fixed-in-upstream-repo
This task has been implemented in the upstream repo
G (Gas Optimization)
resolved
sponsor confirmed
Handle
evertkors
Vulnerability details
Impact
On withdraw():948,
marketIndexOfToken[token]
is read from storage twice.Recommended Mitigation Steps
Reorder like this.
uint32 marketIndex = marketIndexOfToken[token];
ILongShort(longShort).updateSystemState(marketIndex);
The text was updated successfully, but these errors were encountered: