If there were two leaf with on address then that address can't withdraw both of them. the logic in the claim() keeps track of which user withdrew his tokens instead it should keep track of which leaf has been used.
As you can see, when user shows proof for one leaf the code mark msg.sender in hasClaimed, so one address can't claim multiple times if his address is in multiple leaf.
Tools Used
VIM
Recommended Mitigation Steps
contract logic should mark leaf identity for withdraw events in hasClaimed instead of msg.address
Lines of code
https://github.com/code-423n4/2022-05-aura/blob/4989a2077546a5394e3650bf3c224669a0f7e690/contracts/AuraMerkleDrop.sol#L114-L143
Vulnerability details
Impact
If there were two leaf with on address then that address can't withdraw both of them. the logic in the
claim()
keeps track of which user withdrew his tokens instead it should keep track of which leaf has been used.Proof of Concept
This is
claim()
code inAuraMerkleDrop
:As you can see, when user shows proof for one leaf the code mark
msg.sender
inhasClaimed
, so one address can't claim multiple times if his address is in multiple leaf.Tools Used
VIM
Recommended Mitigation Steps
contract logic should mark
leaf
identity for withdraw events inhasClaimed
instead ofmsg.address