The owner of InheritanceManager
can make a mistake and add the same beneficiery address more than once.
There are no any checks that can prevent adding a duplicate addresses to the InheritanceManager::beneficieries
with InheritanceManage::addBeneficiery
.
Having the same address of a beneficiary more than once in the InheritanceManager::beneficiaries
array can cause huge issues for withdrawing assets. When InheritanceManager::withdrawInheritedFunds
is called, the function devides the assets by the length of beneficiaries[]. If there are duplicates, the same address will unfairly increase its inheritance at the expense of others.
I added a function to get the addresses of the beneficiaries in the InheritanceManager::beneficiaries
array to help me with the PoC. Place the function into InheritanceManager.sol
.
Place the following into InheritanceManagerTest.t.sol
.
-manual analysis
Update InheritanceManage::addBeneficiery
to check for duplicates in the array.
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.