NextGen - Timenov's results

Advanced smart contracts for launching generative art projects on Ethereum.

General Information

Platform: Code4rena

Start Date: 30/10/2023

Pot Size: $49,250 USDC

Total HM: 14

Participants: 243

Period: 14 days

Judge: 0xsomeone

Id: 302

League: ETH

NextGen

Findings Distribution

Researcher Performance

Rank: 170/243

Findings: 1

Award: $0.47

🌟 Selected for report: 0

🚀 Solo Findings: 0

Lines of code

https://github.com/code-423n4/2023-10-nextgen/blob/8b518196629faa37eae39736837b24926fd3c07c/smart-contracts/AuctionDemo.sol#L104-L120

Vulnerability details

Impact

Lets imagine the following scenario. Alice enters the auction with 1 ether. After that Bob enters as well with 2 ether. Eve(a malicious user) decides to DoS the auction. To do that she creates a smart contract that does not implement the IERC721Receiver interface and has no onERC721Received() function, so the contract will not be able to receive any NFTs. Admin calls claimAuction(), but the function reverts because it can't send the NFT to Eve's contract. Therefore the other users(Alice and Bob) will not get their money back.

Proof of Concept

This is a well know DoS issue.

Tools Used

Manual Review

Refactor the claimAuction() function to only change the state of the current auction with the tokenId. And when the auction is in finalized state, allow the winner to get it through claimNFT() with WinnerOrAdminRequired modifier.

Assessed type

DoS

#0 - c4-pre-sort

2023-11-15T10:41:53Z

141345 marked the issue as duplicate of #843

#1 - c4-pre-sort

2023-11-16T13:35:14Z

141345 marked the issue as duplicate of #486

#2 - c4-judge

2023-12-05T22:19:22Z

alex-ppg marked the issue as not a duplicate

#3 - c4-judge

2023-12-05T22:19:40Z

alex-ppg marked the issue as duplicate of #739

#4 - c4-judge

2023-12-08T22:22:01Z

alex-ppg 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