The loop in the buyOutEstateNFT
function is inefficient and contains incorrect transfer logic. The return
statement inside the loop prevents the remaining beneficiaries from receiving their funds.
The loop:
If msg.sender
is a beneficiary, the function exits immediately (return
), preventing the remaining beneficiaries from receiving their funds.
This is inefficient and incorrect, as all beneficiaries (except the buyer) should receive their share.
Incomplete Fund Distribution: Only some beneficiaries receive their funds, while others are excluded.
Inefficient Logic: The loop exits prematurely, wasting gas and leaving the function incomplete.
Manual code review
Remove the return
statement and ensure all beneficiaries (except the buyer) receive their funds:
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.