Foundation contest - shenwilly's results

Building the new creative economy

General Information

Platform: Code4rena

Start Date: 24/02/2022

Pot Size: $75,000 USDC

Total HM: 21

Participants: 28

Period: 7 days

Judge: alcueca

Total Solo HM: 15

Id: 94

League: ETH

Foundation

Findings Distribution

Researcher Performance

Rank: 11/28

Findings: 1

Award: $1,479.11

🌟 Selected for report: 0

🚀 Solo Findings: 0

Findings Information

🌟 Selected for report: hyh

Also found by: WatchPug, leastwood, shenwilly

Labels

bug
duplicate
3 (High Risk)

Awards

1479.1136 USDC - $1,479.11

External Links

Lines of code

https://github.com/code-423n4/2022-02-foundation/blob/4d8c8931baffae31c7506872bf1100e1598f2754/contracts/mixins/NFTMarketReserveAuction.sol#L557-L560

Vulnerability details

Impact

FNDNFTMarket allows market offer to be made on auctioned NFTs that have not been finalised by the auction winner. Auction winner can call acceptOffer() to accept the offer and finalise the auction in a single call.

However, the current implementation has an incorrect logic where accepting the offer will transfer the NFT to the auction winner instead of the offerer, causing the offerer to lose fund but not receiving the NFT.

Proof of Concept

  1. Alice is the highest bidder on an auctioned NFT.
  2. Once the auction has ended (but not finalised), Bob makes a market offer on the NFT.
  3. Alice calls acceptOffer(). Bob's fund is distributed to Alice, but the NFT is still sent to Alice.

Tools Used

Manual code review

Modify the logic in NFTMarketReserveAuction._transferFromEscrow() so it properly transfer the NFT to the offerer.

Specifically, in L557-L560:

  1. Change _finalizeReserveAuction(auctionId, false) to _finalizeReserveAuction(auctionId, true).
  2. Remove the return statement so the code continues and transfers correctly.

#0 - HardlyDifficult

2022-03-02T16:45:31Z

Duplicate of https://github.com/code-423n4/2022-02-foundation-findings/issues/49

This is an excellent find and the report is very detailed & clear! We are implementing the recommended change.

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