DatingDapp

First Flight #33
Beginner FriendlyFoundrySolidityNFT
100 EXP
View results
Submission Details
Severity: medium
Valid

Centralization Risk Leading to Loss of User Fund's via Arbitrary Profile Blocking

Summary

The SoulboundProfileNFT contract allows the contract owner to block any user's profile, burning their NFT. However, blocking a user does not refund their ETH locked in the LikeRegistry, leading to potential loss of user funds.

Vulnerability Details

When a user's profile is blocked via blockProfile, their NFT is burned, but any ETH they sent via likeUser remains in userBalances. Since userBalances are only cleared upon a match, blocked users lose access to their locked ETH, which becomes irretrievable.

POC

  1. User A mints a profile and sends 1 ETH to like User B.

  2. Owner blocks User A's profile, burning their NFT.

  3. User A's userBalances still hold 1 ETH but cannot trigger a match or withdraw.

  4. The 1 ETH is permanently stuck in the contract.

Impact

Malicious or compromised owners can arbitrarily block users, causing irreversible loss of ETH used for likes. This undermines trust in the platform's fund security.

Tools Used

Manual code review, Slither static analysis.

Recommendations

  • Remove the blockProfile function entirely and implement a decentralized governance system for profile moderation

  • Add a fund recovery mechanism that allows users to withdraw their locked ETH if their profile is blocked

  • Implement a timelock on profile blocking to allow users to withdraw funds

  • Add a dispute resolution mechanism for blocked profiles

Updates

Appeal created

n0kto Lead Judge 7 months ago
Submission Judgement Published
Validated
Assigned finding tags:

finding_blocking_or_burning_no_refund_balances_or_multisig

Likelihood: Low, burning with money in it would be a user mistake, and being blocked is Low. Impact: High, loss of funds

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.