Description: In InheritanceManager:buyOutEstateNFT, the payment made by the buyer should be evenly divided among the remaining beneficiaries.
Therefore, the correct distribution formula should be fullAmount / (beneficiaries.length - 1) instead of fullAmount / beneficiaries.length.
Currently, the function buyOutEstateNFT incorrectly includes the buyer in the divisor, leading to some ERC-20 tokens being left in the contract.
Impact: This issue result in other beneficiaries receiving less than the intended amount
Proof of Concept:
Add the following test and run it
Recommended Mitigation:
Change the divisor to beneficiaries.length - 1 to exclude the buyer from the distribution.
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.