The removeBeneficiary
function deletes an entry but does not adjust the array length, leaving a zero address and breaking fund distribution.
Using delete beneficiaries[indexToRemove]
sets the address to zero but retains the array length. Subsequent iterations (e.g., in withdrawInheritedFunds
) will include the zero address, causing failed ETH transfers or locked ERC20 tokens.
Funds may be permanently locked or transactions reverted, preventing beneficiaries from inheriting assets.
Manual review.
Replace the deletion with array element swapping and pop()
:
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.