The InheritanceManager::buyOutEstateNFT()
function returns prematurely when msg.sender == beneficiaries[i])
even before it loops through the entire array.
TheInheritanceManager::buyOutEstateNFT()
function enables one beneficiary to buy out the others by distributing the value of the NFT to the others and burning the underlying NFT.
This is done by looping through the array of beneficiaries and sending them their shares one by one. If the current index of he beneficiaries' array points to the user's address buying out the others, then it should skip sending them this share since the user buying out the others should not receive a share.
However, in the current implementation, the function will return prematurely when this condition is met, thereby skipping all subsequent beneficiaries that come after the msg.sender
in the array.
Incomplete distribution of assets.
Failure to burn the underlying NFT.
Manual review.
Modify the code to use continue
instead of return
Conditionally send when assets when the current address isn't the msg.sender
:
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.