Open code423n4 opened 2 years ago
Consider saving the variable in memory.
It should be stack instead of memory. But the suggestion is still correct.
Implemented in https://github.com/code-423n4/2021-09-yaxis/pull/31
Sponsor mitigated
Quoting from #56 Warm SLOADs cost 100 gas and CALLs cost 2600 gas after Berlin upgrade. MLOADs cost only 3 gas units.
Handle
0xsanson
Vulnerability details
Impact
In
StablesConverter.convert
there are multiple storage reads oftokens[i]
that add up gas. Consider saving the variable in memory.Tools Used
editor
Recommended Mitigation Steps
Rewrite