Pieces Protocol

First Flight #32
Beginner FriendlyFoundrySolidityNFT
100 EXP
View results
Submission Details
Severity: high
Invalid

Reentrancy vulnerability

Summary

TokenDivider:: claimNft Reentrancy vulnerability

Vulnerability Details

State updates occur after external calls, leaving the contract vulnerable to reentrancy attacks.

Impact

Reentrancy exploits can result in significant financial losses, as attackers may drain all the fraction of nft and claim it or tokens held in the vulnerable claimNft.

Tools Used

Manual review

Recommendations

Update state variables before making external calls.
Alternatively, use a reentrancy guard.

+ // Example: Using OpenZeppelin's ReentrancyGuard
contract TokenDivider is ReentrancyGuard {
function claimNft(address nftAddress) external nonReentrant {
// Logic here
}
}
Updates

Lead Judging Commences

fishy Lead Judge 7 months ago
Submission Judgement Published
Validated
Assigned finding tags:

Reentrancy

Appeal created

fishy Lead Judge 7 months ago
Submission Judgement Published
Invalidated
Reason: Incorrect statement

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.