The contract iterates over a dynamic shareholders list to send payouts (dividends, rewards) in a single transaction so all shareholders are paid in one call.
The payout function uses an unbounded for loop over a mutable shareholders array and performs external calls inside the loop. The loop’s gas cost grows with the number of shareholders, allowing an attacker to force enough entries (or bloat the list) so that the payout transaction runs out of gas or becomes uncallable, denying payouts to everyone and effectively halting that part of the system.
Likelihood:
The condition occurs when the system allows new shareholders to be added (via registration, share transfers, or other flows) without any cap on array growth, making it trivial over normal operation for the list to become large.
The condition occurs when any module (e.g., onboarding, share grants) is used repeatedly (by bots or a malicious actor) to inflate the shareholders array prior to a scheduled payout.
Impact:
A single scheduled call to distributeDividends() will exceed the block gas limit and revert, preventing payouts from being executed.
The inability to execute payouts can cascade to other functionality (e.g., reputation updates or stake-dependent governance), effectively stalling critical parts of the Company Simulator.
• Use bloat() many times (or via many addresses) to inflate shareholders.length to a large number.
Call triggerPayout() or wait for the project owner to call distributeDividends(). The distributeDividends() transaction will run out of gas (or be uncallable due to gas limits), reverting and preventing payouts.
Replace push-based, single-tx payouts with a pull-payment pattern: record each shareholder’s claimable amount in storage and let each shareholder call claim() to withdraw their funds on-demand. This removes the need for an unbounded on-chain loop and external calls in a single transaction.
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.