The SoulboundProfileNFT
contract allows users to mint profiles with unrealistic or invalid age values (e.g., age = 0
or age = 200
). This undermines the protocol’s credibility and could lead to misuse, as the platform is likely intended for adults. Without validation, attackers can create profiles with absurd ages, eroding user trust and violating potential legal requirements.
Contract: SoulboundProfileNFT.sol
Function: mintProfile
The mintProfile
function does not validate the age
parameter. Users can input any value within the uint8
range (0–255), including invalid ages like 0
or 255
.
Example attack: A user mints a profile with age = 5
, which is clearly unrealistic for a dating platform.
Credibility Risk: The protocol may be seen as unserious or unsafe if fake profiles with absurd ages proliferate.
Legal Risk: If the platform is intended for adults (18+), allowing underage profiles could violate regulations.
User Experience: Genuine users may avoid the platform if they encounter obviously fake profiles.
Enforce a minimum age requirement (e.g., 18) in the mintProfile
function:
Upper Bound Check:
Consider adding a reasonable upper limit (e.g., age <= 120
) to prevent unrealistic values:
Configurable Age Range:
Store minimum and maximum age values in mutable variables (e.g., controlled by governance) for flexibility.
Scamming/phishing is not the protocol problem, that's a user mistake. NFT are unique, even if someone does a copy of your profile (which is also possible in web2), I consider it informational. Injection is a problem for the web2 part of the protocol, not a bug here. For the age, it depends on the countries law and future medicine. Anyways, that's more an ethical/political problem, not a bug.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.