burnProfile() deletes profileToToken[msg.sender] and burns the NFT but does not clear any entries in LikeRegistry's likes mapping. Outgoing likes (likes[burner][*]) and incoming likes (likes[*][burner]) remain set to true indefinitely.
This creates a permanent lock on ETH: if Alice liked Bob before burning her profile, likes[alice][bob] remains true. Bob can no longer like Alice (the profileToToken(alice) != 0 check fails), so a match can never be triggered and Alice's like ETH is permanently unreachable — even if Alice remints.
Likelihood:
Any user who burns their profile after sending a like permanently loses access to that ETH, even if they remint immediately.
Impact:
ETH locked via likeUser becomes unrecoverable after profile burn because the stale likes entry prevents re-liking, and the counterparty cannot like the reminted profile due to profileToToken reset. The lock is permanent.
Alice likes Bob (1 ETH), then burns her profile. After the burn, likes[alice][bob] is still true. Alice remints and attempts to re-like Bob — the "Already liked" revert blocks her. The test ends with 1 ETH still in the contract and no path to recover it, confirming the stale mapping permanently locks the funds.
burnProfile cannot directly clear LikeRegistry entries without a cross-contract call, but LikeRegistry should expose a clearLikes function, or the burn logic should route through a registry-aware function:
For full cleanup, consider iterating stored like arrays or using a generation counter to invalidate stale like entries without on-chain iteration.
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.