In src/VestedAirdrop.vy
, the claimable_amount
function is responsible for calculating the amount a user can claim. However, the function does not verify the user's proof against the Merkle root, allowing any arbitrary user to query a claimable amount without validating their eligibility. This flaw could mislead users and external systems relying on the function's output.
In VestedAirdrop.vy#L176, the claimable_amount
function is implemented as follows:
The issue arises because the function does not verify whether the user is eligible to claim tokens via a Merkle proof. Without this check, unauthorized users can receive misleading claimable amounts, potentially causing errors in off-chain systems that trust this function's output. While the function cannot directly lead to unauthorized claims, it may cause confusion and incorrect estimations.
Misleading Information: Users without valid proofs can still query and receive non-zero claimable amounts.
Inaccurate Frontend Display: Frontend applications relying on this function may display inaccurate claimable amounts.
Integration Errors: External systems consuming this function's output could make incorrect assumptions, leading to potential errors in downstream logic.
Manual code review
Ensure the function validates the user's eligibility using a Merkle proof before calculating the claimable amount. Below is the revised function with the required proof verification:
Updated Code
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.