The withdraw, unqueueTokens, and claimLSDTokens functions utilize a verification algorithm based on the Merkle tree.
However, the MerkleProofUpgradeable.verify(_merkleProof, merkleRoot, node) function is a pure function, meaning it does not make any state changes.
Moreover, after verification, there are no state values to prove that this merkleProof and node have been used already.
Therefore, users can continue to use the same merkleProof with the same parameters.
This can be done continuously until the merkleRoot is updated through the updateDistribution function call. The claimLSDTokens function, by its nature, cannot use the merkleProof multiple times.
However, it is possible to use it multiple times in the unqueueTokens and withdraw functions.
Although there is no loss of funds, using the Merkle tree to call the withdraw and unqueueTokens functions faces an issue that contradicts the protocol design intended to limit the size of _amountToUnqueue.
It would be beneficial to introduce a nonce to prevent the reuse of already used merkleProof.
Additionally, adding the byte4 code of the function being called to the node would also be a good idea.
It does concern different variables. But using the same merkle inside 3 different functions is not a good practice. Nonces, separators and safety.
It does concern different variables. But using the same merkle inside 3 different functions is not a good practice. Nonces, separators and safety.
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.