Closed code423n4 closed 2 years ago
neslinesli93
Save an SLOAD call when emitting these two types of events: since the value is already available as a local variable, using that when emitting saves gas
SLOAD
https://github.com/code-423n4/2021-12-defiprotocol/blob/main/contracts/contracts/Basket.sol#L166 https://github.com/code-423n4/2021-12-defiprotocol/blob/main/contracts/contracts/Basket.sol#L185
Duplicate of #162
Handle
neslinesli93
Vulnerability details
Impact
Save an
SLOAD
call when emitting these two types of events: since the value is already available as a local variable, using that when emitting saves gasProof of Concept
https://github.com/code-423n4/2021-12-defiprotocol/blob/main/contracts/contracts/Basket.sol#L166 https://github.com/code-423n4/2021-12-defiprotocol/blob/main/contracts/contracts/Basket.sol#L185