The buyOutEstateNFT
function in InheritanceManager.sol
miscalculates the amount to be paid by the buyer. The function first removes the buyer’s share using a multiplier but still divides the final amount by the total number of beneficiaries (divisor
), causing underpayment to the remaining beneficiaries.
The function removes msg.sender
's share using multiplier = beneficiaries.length - 1
.
However, later in the function, finalAmount
is still divided by divisor
instead of multiplier
, reducing the payout to each beneficiary.
Underpayment of beneficiaries: Each remaining beneficiary receives less than their fair share.
Discrepancy in fund distribution: The contract does not distribute the expected total amount, leading to potential disputes.
Foundry tests (to verify discrepancies in expected balances)
console.log to monitor balance
Modify the final amount calculation to ensure it is divided by the correct multiplier
instead of divisor
:
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.