The protocol lacks proper fund management mechanisms to handle the unpredictable nature of random reward amounts. Since rewards are randomly assigned (100-500 APT), the owner cannot accurately predict total funding requirements, leading to two problematic scenarios: under-funding results in legitimate users being unable to claim their allocated rewards, while over-funding results in permanent fund lock for the owner with no recovery mechanism.
The combination of random reward amounts (100-500 APT) and lack of fund recovery mechanisms creates an impossible funding calculation for the owner. The protocol has no mechanism to handle insufficient funds or recover leftover tokens.
Key issues:
Random rewards make funding requirements unpredictable
No mechanism to handle insufficient balance scenarios
No function to withdraw/recover leftover funds
Users with valid registrations cannot claim if funds are insufficient
Likelihood: High - Happens when owner under/over-funds relative to unpredictable random reward distribution
Impact: Medium - Under-funding locks user rewards, over-funding locks owner funds permanently
Medium severity because:
User fund denial: Legitimate registered users cannot access their allocated rewards
Permanent fund lock: No recovery mechanism for stuck tokens in contract
Unpredictable requirements: Owner cannot calculate exact funding needs due to randomness
Protocol functionality failure: Core claiming mechanism becomes inoperable
Demonstrated scenario where insufficient funding locks user rewards:
Fund calculation impossibility:
Note: The current project tests demonstrate that the owner intends to fund the contract before calling register_pizza_lover
. An alternative solution could have been to register users first to know their exact reward amounts, then fund the contract accordingly. However, this is not what the current test implementation showcases - the owner must fund upfront without knowing the total required amount.
And we ll still have an issue with unclaimed funds that won't be withdraw by the owner
Add proper fund management and recovery mechanisms:
Benefits:
Fund recovery: Owner can withdraw leftover funds after distribution
Graceful degradation: Users get partial payments instead of complete failure
Emergency handling: Owner can manage unexpected funding scenarios
Protocol sustainability: Prevents permanent fund locks
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.