Pieces Protocol

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

Inconsistent Event Emissions in `TokenDivider::claimNft`

Summary

The NftClaimed event in the TokenDivider::claimNft function does not emit the tokenId or the recipient of the NFT.

Vulnerability Details

The NftClaimed event in the TokenDivider::claimNft function does not emit the tokenId or the recipient of the NFT. This makes it difficult to track the complete flow of NFT ownership

function claimNft(address nftAddress) external {
...
balances[msg.sender][tokenInfo.erc20Address] = 0;
erc20ToMintedAmount[tokenInfo.erc20Address] = 0;
@> emit NftClaimed(nftAddress);
IERC721(nftAddress).safeTransferFrom(address(this), msg.sender, tokenInfo.tokenId);
}

Impact

  • It reduces traceability for off-chain monitoring tools.

  • Makes event logs less informative for users and developers.

Tools Used

Manual review

Recommendations

The event should include the tokenId and the address that received the NFT and indexing them.

Updates

Lead Judging Commences

fishy Lead Judge 7 months ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity

Support

FAQs

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