SIZE contest - yixxas'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: 85/88

Findings: 1

Award: $5.60

🌟 Selected for report: 0

🚀 Solo Findings: 0

Awards

5.604 USDC - $5.60

Labels

bug
2 (Med Risk)
satisfactory
duplicate-237

External Links

Lines of code

https://github.com/code-423n4/2022-11-size/blob/706a77e585d0852eae6ba0dca73dc73eb37f8fb6/src/SizeSealed.sol#L122

Vulnerability details

Impact

A malicious user can purchase up to the entire sale amount at the minimumBidQuote and at no additional cost since cancelBid() refunds the entire amount.

Proof of Concept

A user who has placed a bid() pushes an element into the bids[] array permanently and and there is no way to remove the element. Even when cancelBid() is called, bids[].length does not decrease. This means can an attacker can always place the minimum bid for x number of tokens that he wants to purchase and fill up the entire array such that no further bids can be placed by other users and get refund for the bids placed by cancelBid().

Tools Used

Manual Review

I recommend that cancelBid() be removed. It is a problematic function that can lead to a variety of issues as mentioned in my other report - griefing of the auction.

#0 - c4-judge

2022-11-09T19:19:29Z

0xean marked the issue as duplicate

#1 - c4-judge

2022-12-06T00:23:00Z

0xean marked the issue as satisfactory

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