Skip to content
DoS Audit finding Intermediate

FeeSplitter: Unbounded number of shareholders can cause DOS

The FeeSplitter contract allows an unlimited number of shareholders, so a large number of shareholders can cause the _sendFees() function to run out of gas when distributing fees. This results in a denial of service for all NestedFactory functions, particularly those that remove funds like withdraw() and destroy().

GreyArt Follow

Originally disclosed on Code4rena

Submitted by GreyArt

Impact

There is no limit to the number of shareholders. It is therefore possible to set a large number of shareholders such that _sendFees() will run out of gas when adding shares to each shareholder. This will cause denial of service to all NestedFactory functions, especially the ones that will remove funds like withdraw() and destroy().

Recommended Mitigation Steps

It would be best to set a sanity maximum number of shareholders that can be added.

adrien-supizet (Nested) acknowledged

The original report as published on Code4rena, by GreyArt. Images and videos are our own copies; raw HTML is shown as text. View it on Code4rena.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the contract lacks a maximum limit on the number of shareholders, so fee distribution loops over an unbounded array and exceeds the block gas limit.

Impact

An attacker could add a large number of shareholders, causing _sendFees() to run out of gas and blocking all NestedFactory functions, especially withdraw() and destroy(), resulting in a denial of service.

What the attacker needed

Ability to add shareholders

The fix

The contract should enforce a sanity maximum number of shareholders that can be added.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

A smart contract lets many people own a share of fees. If there are too many owners, the code that pays everyone runs out of gas (the limited computation a transaction can use) and fails. Then no one can use important functions like withdrawing funds.

What is DoS?

A request that exhausts resources or crashes a component. Many programs forbid testing it; reports usually show it from code, not by attacking.

More by GreyArt

View all

12 more disclosed reports, best first.

More from Nested Finance contest

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Denial of service

The lesson behind this report.

A request that exhausts resources or crashes a component. Many programs forbid testing it; reports usually show it from code, not by attacking.