When a beneficiary buys an estate NFT through function InheritanceManager::buyOutEstateNFT
, it's supposed to distribute the funds from the purchase evenly to the remaining beneficiaries. However, unless the beneficiary buying is the last one in the beneficiaries
array, some of the beneficiaries will not receive their fair share of the payment.
After calculating the amount to transfer from the buyer, the function loops through the beneficiaries
array to distribute to each their shares of the payment. In order to not send funds to the purchasing beneficiary, the loop exits when encountering the sender, thus skipping the remaining beneficiaries and leaving the funds in the contract. Additionally the NFT is never burned.
Because the owner is most likely not available, the only way for them to receive their funds is by calling InheritanceManager::withdrawInheritedFunds
which will evenly distribute the funds to all beneficiaries. Assuming they all act in good faith (as they are part of the same inheritance agreement), they'll need to coordinate with each other so those who did receive their share of the payment, send their withdrawn amount to those who didn't. If the beneficiary list is long enough that might be very difficult.
Beneficiaries do not receive their expected share of the NFT payment funds.
Manual review
Replace the early function exit to ensure all beneficiaries (except the sender) receives their share:
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.