Open code423n4 opened 2 years ago
GiveMeTestEther
The storage variable bondAmount is read twice in this function. Store it in a local variable and replace the occurrences with the local variable to save a SLOAD.
https://github.com/code-423n4/2021-12-defiprotocol/blob/205d3766044171e325df6a8bf2e79b37856eece1/contracts/contracts/Auction.sol#L121
Manual Analysis
Handle
GiveMeTestEther
Vulnerability details
Impact
The storage variable bondAmount is read twice in this function. Store it in a local variable and replace the occurrences with the local variable to save a SLOAD.
Proof of Concept
https://github.com/code-423n4/2021-12-defiprotocol/blob/205d3766044171e325df6a8bf2e79b37856eece1/contracts/contracts/Auction.sol#L121
Tools Used
Manual Analysis
Recommended Mitigation Steps