The addBeneficiery
function in InheritanceManager.sol
does not check for duplicate entries before adding a beneficiary. This allows the same address to be added multiple times, leading to an unfair distribution of inherited funds.
The InheritanceManager.sol::withdrawInheritedFunds
function distributes funds equally among all beneficiaries by dividing the total balance by the number of entries in the beneficiaries
array. If a single address appears multiple times, it will receive multiple shares, allowing one beneficiary to claim a disproportionate amount of funds.
Unfair fund distribution: A beneficiary listed multiple times receives a larger share than intended. receives.
Foundry Test
To prevent duplicate entries, use a mapping to track added beneficiaries
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.