The withdraw
function in the PriorityPool
contract does not adequately verify the sender's inclusion in the Merkle tree when the _merkleproof.length ==0
. This could allow unauthorized withdrawals by an account that is outside the Merkle tree by setting the _merkleproof to zero. Although this is of low severity, it is worth considering
Consider the code snippet below:
In the PriorityPool
contract, the withdraw
function is responsible for allowing users to withdraw their tokens. The function includes a validation step to verify the sender's inclusion in the Merkle tree using a Merkle proof. However, if the _merkleProof
is empty, the function only checks if accountIndexes[account] < merkleTreeSize
. This check might not be sufficient to ensure that the sender is included in the Merkle tree. A sender outside the Merkle tree can bypass the validation by setting _merkleProof array
to zero
Insufficient validation could allow unauthorized withdrawals if the accountIndexes
mapping is not correctly updated. However, the impact is considered low severity because it relies on the improper maintenance of accountIndexes
, which is not likely
Manual code review
Allow this adjustment in the 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.