Beginner FriendlySolidity
100 EXP
View results
Submission Details
Severity: high
Valid

Unintended Truncation in buyOutEstateNFT Function

Summary:
The loop in InheritanceManager::buyOutEstateNFT incorrectly exits (truncates execution) when the caller is found before reaching the last index, preventing the full execution of intended logic.

Vulnerability Details:
The early return within the loop causes incomplete processing if the caller is not the last element in the beneficiaries array.

Test & Code Example
if (msg.sender == beneficiaries[i]) {
return;
}

Impact:
Medium – Leads to incomplete execution, affecting asset buyout logic.

Tools Used:
slither, aderyn, foundry

Recommendations:
Replace the return statement with continue so that the loop can iterate over all beneficiaries.

Diff Recommendation
if (msg.sender == beneficiaries[i]) {
- return;
+ continue;
}
Updates

Lead Judging Commences

0xtimefliez Lead Judge 10 months ago
Submission Judgement Published
Validated
Assigned finding tags:

buyOutNFT has return instead of continue

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.

Give us feedback!