If the user has no balance to refund (neither ERC20 nor Ether), the function might still execute and emit ther Refunded
event. This could confuse users or off-chain systems.
User Confusion:
Users might think they successfully refunded assets when, in reality, they had no refundable balance.
Thus can create a negative user experience and lead to misunderstanding.
Misleading Logs:
The Refunded
event will be emitted even when no assets are refunded. Off-chain systems or dApps relying on those logs might misinterpret them as valid refunds, causing inaccurate reporting.
Inefficient Gas Usage:
Even if no refunds occurs, the function will still execute and emit an event, leading to unnecessary gas consumption for users.
Manual review
Add a check to ensure the user has refundable assets
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.