Foundation Drop contest - Ruhum's results

Foundation is a web3 destination.

General Information

Platform: Code4rena

Start Date: 11/08/2022

Pot Size: $40,000 USDC

Total HM: 8

Participants: 108

Period: 4 days

Judge: hickuphh3

Total Solo HM: 2

Id: 152

League: ETH

Foundation

Findings Distribution

Researcher Performance

Rank: 64/108

Findings: 1

Award: $45.08

🌟 Selected for report: 0

🚀 Solo Findings: 0

Lines of code

https://github.com/code-423n4/2022-08-foundation/blob/main/contracts/mixins/nftDropMarket/NFTDropMarketFixedPriceSale.sol#L173

Vulnerability details

Impact

The buyer can specify a buyReferrer when buying an NFT through the NFTDropMarket. The referrer is rewarded 1% of the sale price. It's taken from the protocol's cut. So the protocol only gets 4%.

Because the buyer can set the value themselves, there's no incentive to ever leave it out. They will set it to one of their other addresses to buy tokens at a discount.

Effectively, the protocol will lose 1% of its fees for nothing. There's no way of stopping people from abusing the system. Because of that and the direct loss of funds I'd rate this issue as HIGH.

Proof of Concept

  1. Alice calls mintFromFixedPriceSale() with the buyReferrer set to one of her other addresses
  2. Alice receives the referral reward through _distributeFunds(): https://github.com/code-423n4/2022-08-foundation/blob/main/contracts/mixins/shared/MarketFees.sol#L522-L529

Tools Used

none

Remove the referral feature altogether. I couldn't find a way to implement it that can't be abused by the buyer.

#1 - HardlyDifficult

2022-08-17T07:06:55Z

#2 - HickupHH3

2022-08-26T08:49:22Z

warden's primary QA

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