The pick function allows users to claim their pickable unripe tokens by verifying their eligibility using a Merkle proof and then transferring the corresponding amount of tokens to their specified account. This report highlights the importance of implementing balance checks before and after critical operations to ensure the correctness and security of the token distribution process.
The original implementation of the pick function does not include explicit balance checks before and after the critical operation of transferring tokens. This oversight can lead to potential discrepancies in token accounting, resulting in incorrect token transfers. Without verifying the balances, the function may not guarantee that the expected amounts are correctly processed, potentially causing a loss of funds or an inconsistent token state.
Incorrect Token Transfer:
If the transfer operation does not credit the correct amount of tokens to the user, it could result in a loss of funds for the user.
State Inconsistency:
Without verifying balances, the function might leave the contract in an inconsistent state, affecting the overall integrity of the token ecosystem.
Manual review
Implement Balance Checks:
Add explicit balance checks before and after the transfer operation to ensure that the correct amounts are processed.
Ensure Successful Transfer:
Verify that the user’s balance of the claimed tokens is increased by the correct amount after the transfer operation.
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.