Open code423n4 opened 2 years ago
GiveMeTestEther
Cache "address(basket)" in a local variable to save a few SLOADs. It gets read in three different loops of the settleAuction() function and during the assignment of "basketAsERC20".
https://github.com/code-423n4/2021-12-defiprotocol/blob/205d3766044171e325df6a8bf2e79b37856eece1/contracts/contracts/Auction.sol#L74
Manual Analysis
Handle
GiveMeTestEther
Vulnerability details
Impact
Cache "address(basket)" in a local variable to save a few SLOADs. It gets read in three different loops of the settleAuction() function and during the assignment of "basketAsERC20".
Proof of Concept
https://github.com/code-423n4/2021-12-defiprotocol/blob/205d3766044171e325df6a8bf2e79b37856eece1/contracts/contracts/Auction.sol#L74
Tools Used
Manual Analysis
Recommended Mitigation Steps