Users can freely burn their profile NFT at any time or be forcefully removed by the protocol owner, who has the authority to burn a user's NFT directly. However, if a user profile gets burnt after spending ETH to like other profiles, their ETH gets permanently stuck in the LikeRegistry
contract.
This happens because there is no function to withdraw the ETH, and once the profile is burned, the user is unable to get matched. The following check in LikeRegistry::likeUser
will always revert:
This effectively locks the user's ETH in the contract with no way to retrieve it.
This also leads to another issue on the liker's end. If someone liked a user and the user then burns their profile, the liker's ETH is basically stuck in the contract unless they start liking again and find a match.
Users who burn their profiles lose access to their deposited ETH, leading to financial loss.
Since there's no withdrawal mechanism, the funds become completely unrecoverable.
Users who have already paid to like other profiles cannot get matched because their profile no longer exists.
This significantly affects user experience and trust in the protocol.
Manual Review
One effective way to prevent this issue is to combine the SoulboundProfileNFT and LikeRegistry contracts. Instead of deploying them independently, inherit LikeRegistry
inside SoulboundProfileNFT
and modify the functions to refund ETH before burning a profile.
Now to mitigate the second issue of the liker getting stuck due to have previously liked a now burnt profile, we can introduce a withdraw
function accessible only by the owner of this protocol to handle such cases and return the funds as required.
N.B. - This proposed solution is a suggested mitigation and may not cover all edge cases. The actual implementation may require additional modifications. A thorough review of the entire contract is recommended to ensure a comprehensive fix for this issue.
Likelihood: Low, burning with money in it would be a user mistake, and being blocked is Low. Impact: High, loss of funds
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.