The blockProfile
function in the SoulboundProfileNFT
contract is intended to block a user’s profile. However, its current implementation only removes the user’s existing profile without preventing them from minting a new one. Additionally, the function name suggests that a user should be fully blocked, not just have their profile removed.
The blockProfile
function burns the user’s NFT and deletes their profile data but does not record the blocked address. Consequently, the mintProfile
function, which only checks if a user already has a profile (profileToToken[msg.sender] == 0
), allows previously blocked users to remint new profiles.
Following, the current blockProfile Implementation.
src/SoulboundProfileNFT.sol#L56-L66
Since profileToToken[msg.sender]
is reset to 0
, blocked users can simply call mintProfile
again and create a new profile.
The lack of a persistent blocklist means that blocked users can repeatedly mint new profiles. This undermines moderation efforts and compromises platform integrity.
Implement a Blocklist
Introduce a mapping to track blocked addresses and modify blockProfile to update it:
Restrict Blocked Users in mintProfile
Modify mintProfile
to check the blocklist:
Likelihood: Low, any blocked users. Impact: High, not really blocked.
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.