The likeUser function checks profileNFT.profileToToken(liked) != 0 to verify the target user has a profile. However, if the target user burns their profile or gets blocked between the time the liker sees their profile and the time the likeUser transaction is mined, the check will fail and the transaction reverts.
More importantly, the check only validates at the time of the like. Consider this scenario:
Alice likes Bob (both have profiles, check passes).
Bob burns his profile.
Carol likes Alice (Alice still has a profile).
Alice's accumulated balance (if H-01 were fixed) could include ETH from her like of Bob — but Bob no longer exists on the platform.
The likes mapping retains stale entries for burned profiles. If a burned user re-mints (see H-03), the old likes[burned_user][target] entries persist, creating ghost state. A user could:
Like someone, paying 1 ETH.
Burn their profile.
Re-mint.
The old like mapping is still true, so they can't re-like the same person (or can exploit state mismatches).
Likelihood:
This occurs whenever a user burns or gets blocked and has existing likes or matches in the LikeRegistry.
Impact:
Stale like/match state persists, creating inconsistencies between the NFT profile state and the LikeRegistry state.
Ghost matches with non-existent profiles pollute the matches array.
This test shows Alice liking Bob, then Bob burning his profile. The likes[alice][bob] mapping remains true even after the burn. When Bob re-mints a new profile, Alice cannot re-like him because the stale "Already liked" check blocks her, creating permanent ghost state.
Add a callback mechanism or require re-validation of both profiles at match time. Consider allowing users to withdraw ETH from unmatched likes if the target profile is burned.
The contest is live. Earn rewards by submitting a finding.
Submissions are being reviewed by our AI judge. Results will be available in a few minutes.
View all submissionsThe contest is complete and the rewards are being distributed.