The fund_investor logic calculates a share price from the contract net_worth divided by issued_shares. When net_worth == 0 the implementation allows a division-by-zero or produces a zero price which then leads to either a runtime revert or incorrect minting (e.g., infinite / zero-cost shares). The root cause is an unguarded integer division performed when no shares have been issued yet.
Likelihood: High
This is a likely state to be encountered in a freshly deployed contract: before any shares are issued, an investor may attempt to buy shares. Many real deployments begin with zero issued_shares, so this is easy to trigger during normal operation or tests.
Impact: High
DoS: the investor funding call can revert, blocking legitimate investor funding flows.
Funds loss or incorrect accounting: If zero-priced shares are minted (or a math error occurs), funds may be misallocated or shares incorrectly issued.
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.