Description
The blockProfile()
function in SoulboundProfileNFT.sol
is intended to allow the contract owner to block malicious users. However, blocked users can simply create a new profile after being blocked, making the blocking mechanism ineffective.
This was demonstrated in the test test_user_blocked_can_come_back_and_create_new_account()
where a blocked user successfully creates a new profile.
Impact
This undermines the platform's ability to remove bad actors and protect users
Could lead to repeated harassment or abuse if malicious users keep creating new profiles
Wastes gas and effort of admins who try to block users
Reduces trust in the platform's safety mechanisms
To effectively prevent blocked users from creating new profiles, we need to implement persistent address blocking with proper access controls and events.
This improved implementation:
Adds proper NatSpec documentation for all new functions and state variables
Introduces an event to track blocking actions with reasons
The blocking mechanism is now:
Persistent (blocked addresses can't create new profiles)
Transparent (emits events with reasons)
Well-documented
Gas-efficient (uses single storage reads)
Properly access-controlled
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.