DatingDapp

First Flight #33
Beginner FriendlyFoundrySolidityNFT
100 EXP
View results
Submission Details
Severity: low
Invalid

Predictable Token ID Generation of `_nextTokenId` in `SoulboundProfileNFT::mintProfile()` function

Description: Incremental token ID generation allows potential front-running

Impact: Predictability in token minting sequence

Proof of Concept:

contract TokenIdFrontrunning {
function frontrunMinting() external {
// Predict next token ID and front-run minting
uint256 predictedTokenId = currentTokenId + 1;
// Rapid consecutive minting to manipulate sequence
soulboundNFT.mintProfile("Attacker1", 25, "uri1");
soulboundNFT.mintProfile("Attacker2", 25, "uri2");
}
}

Recommended Mitigation:

  • Use randomized token ID generation

  • Implement commit-reveal scheme

Updates

Appeal created

n0kto Lead Judge 6 months ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity
Assigned finding tags:

Informational or Gas

Please read the CodeHawks documentation to know which submissions are valid. If you disagree, provide a coded PoC and explain the real likelyhood and the detailed impact on the mainnet without any supposition (if, it could, etc) to prove your point.

Support

FAQs

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