The pick
function in the contract lacks validation to ensure that users cannot claim more unripe tokens than they are entitled to, potentially leading to unfair distribution and loss of tokens. Implementing additional checks to enforce entitlement limits based on specific conditions can prevent unauthorized token claims and maintain fairness in token distribution.
The vulnerability in the pick
function arises from the absence of explicit validation to ensure that the claimed amount of unripe tokens does not exceed the pickable amount, as determined by the Merkle proof. This lack of validation allows users to potentially exploit the system by claiming more tokens than they are entitled to, leading to an unfair distribution of tokens and potential loss of tokens meant for other users.
Here's a breakdown of the vulnerability:
The pick
function accepts parameters such as the token address, the claimed amount of tokens, and a valid Merkle proof. Upon receiving these parameters, the function verifies the validity of the provided token address and checks if the user has already claimed unripe tokens for the specified token.
The function proceeds to verify the provided Merkle proof to ensure that the claim is legitimate. It computes the leaf node from the user's address and the claimed amount of tokens and checks if the provided proof matches the Merkle root.
However, crucially, there's no explicit check to ensure that the claimed amount of tokens does not exceed the pickable amount based on certain conditions (e.g., time, user eligibility, etc.). This absence of validation allows users to potentially claim more tokens than they are entitled to, leading to an imbalance in token distribution and potential loss of tokens meant for other users.
The vulnerability exposes the contract to manipulation by allowing users to unfairly claim an excessive amount of tokens, disrupting the intended distribution mechanism and potentially causing financial loss or imbalance within the system.
Manual
Additional validation should be implemented within the pick function to ensure that the claimed amount of tokens does not exceed the pickable amount.
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.