Open code423n4 opened 2 years ago
0x0x0x
At Product.sol#closeAll cache _position[account] to save gas.
Product.sol#closeAll
_position[account]
In the first line of the function _position[account] is used twice and gas can be saved by caching it.
Agree with the finding
Handle
0x0x0x
Vulnerability details
At
Product.sol#closeAll
cache_position[account]
to save gas.In the first line of the function
_position[account]
is used twice and gas can be saved by caching it.