SIZE contest - shark's results

An on-chain sealed bid auction protocol.

General Information

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

SIZE

Findings Distribution

Researcher Performance

Rank: 51/88

Findings: 1

Award: $44.29

QA:
grade-b

🌟 Selected for report: 0

🚀 Solo Findings: 0

Awards

44.2869 USDC - $44.29

Labels

bug
grade-b
QA (Quality Assurance)
Q-08

External Links

Use delete to reset variables

The 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

Revert as early as possible

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

Typos

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

AuditHub

A portfolio for auditors, a security profile for protocols, a hub for web3 security.

Built bymalatrax © 2024

Auditors

Browse

Contests

Browse

Get in touch

ContactTwitter