Blur Exchange contest - datapunk's results

An NFT exchange.

General Information

Platform: Code4rena

Start Date: 11/11/2022

Pot Size: $36,500 USDC

Total HM: 5

Participants: 62

Period: 3 days

Judge: berndartmueller

Id: 181

League: ETH

Blur Exchange

Findings Distribution

Researcher Performance

Rank: 28/62

Findings: 1

Award: $306.21

🌟 Selected for report: 0

🚀 Solo Findings: 0

Findings Information

🌟 Selected for report: 0xdeadbeef0x

Also found by: KingNFT, Koolex, Lambda, Trust, V_B, adriro, bin2chen, datapunk, hihen, philogy, rotcivegaf, wait

Labels

bug
3 (High Risk)
partial-50
upgraded by judge
duplicate-96

Awards

306.2138 USDC - $306.21

External Links

Lines of code

https://github.com/code-423n4/2022-11-non-fungible/blob/323b7cbf607425dd81da96c0777c8b12e800305d/contracts/Exchange.sol#L219

Vulnerability details

Impact

_returnDust instead of returning the rightful remainingETH amount, it returns selfbalance(). If eth gets into the contract somehow, it can be swept by anyone, who passes in some eth through bulkExecute, even with empty executions parameter.

Proof of Concept

let callStatus := call( gas(), caller(), selfbalance(), 0, 0, 0, 0 )

Tools Used

Change it to

let callStatus := call( gas(), caller(), _remainingETH, 0, 0, 0, 0 )

Also if leftover ETH is a concert, add an onwerOnly function for the owner to sweep remaining ETH.

#0 - c4-judge

2022-11-17T10:32:44Z

berndartmueller marked the issue as duplicate of #96

#1 - c4-judge

2022-11-17T10:32:49Z

berndartmueller changed the severity to 3 (High Risk)

#2 - berndartmueller

2022-11-17T10:33:56Z

Applying partial credits (50%) due to missing a detailed proof of concept.

#3 - c4-judge

2022-11-17T10:34:06Z

berndartmueller marked the issue as partial-50

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