Description: In InheritanceManager:addBeneficiery, there is no check for adding duplicate beneficiaries. the same beneficiary can be added multiple times.
Impact: This could lead to confusion and potential issues when distributing assets to beneficiaries. like buyOutEstateNFT and withdrawInheritedFunds
if the same beneficiary is added multiple times, if 2 times, when buying out the estate, the beneficiary only need to pay 1/2 of the total value.
Proof of Concept: Add the following test and run it
Recommended Mitigation:
should check if the beneficiary is already in the array before adding it. better use mapping instead of looping through 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.