Platform: Code4rena
Start Date: 04/11/2022
Pot Size: $42,500 USDC
Total HM: 9
Participants: 88
Period: 4 days
Judge: 0xean
Total Solo HM: 2
Id: 180
League: ETH
Rank: 51/88
Findings: 1
Award: $44.29
🌟 Selected for report: 0
🚀 Solo Findings: 0
🌟 Selected for report: 0x1f8b
Also found by: 0xSmartContract, 0xc0ffEE, Aymen0909, B2, Deivitto, Josiah, KingNFT, Rahoz, RaymondFam, RedOneN, ReyAdmirado, Trust, ajtra, aviggiano, brgltd, c7e7eff, cryptonue, ctf_sec, delfin454000, djxploit, lukris02, peanuts, rvierdiiev, shark, simon135, slowmoses, tnevler, trustindistrust
44.2869 USDC - $44.29
delete
to reset variablesThe reason why is because delete
keyword better communicates the intention of what you are trying to do.
For example:
File: SizeSealed.sol
Line 404
a.data.seller = address(0);
The above could use the delete
keyword like so:
delete a.data.seller; // resets to default value, for type address that would be address(0)
Here are the rest of the instances:
File: SizeSealed.sol
Line 347
File: SizeSealed.sol
Line 379
File: SizeSealed.sol
Line 432
File: SizeSealed.sol
Line 435
Conditional checks should appear as early as possible in a function. If a revert were to occur, it would avoid incurring extra gas on code coming after the checks.
The following lines of code can be executed before updating ebid
:
File: SizeSealed.sol
Line 155-159
File: SizeSealed.sol (Line 112, Line 211, Line 412, Line 431)
/// @audit Change "runnning" to "running" 112: /// @notice Bid on a runnning auction /// @audit To be consistent, only use one spelling of the word. /// @audit "Finalises" 211: /// @notice Finalises an auction by revealing all bids /// @audit "finalised" 412: /// @dev Transfers `quoteToken` back to bidder and prevents bid from being finalised /// @audit Change "futher" to "further" 431: // Prevent any futher access to this EncryptedBid
#0 - c4-judge
2022-11-10T02:36:15Z
0xean marked the issue as grade-b