Normal behavior:
fund_investor() accepts ETH and mints new shares to investors based on the company’s current share_price.
It assumes that the company is solvent — meaning company_balance ≥ holding_debt — so that shares have non-zero underlying value.
Specific issue:
When the company’s debt grows larger than its balance (holding_debt > company_balance), the net_worth becomes zero (or negative, clamped to 0).
However, fund_investor() still allows new investments. Since get_share_price() then returns 0, a division by zero or an absurdly large share issuance can occur, granting infinite or free shares to the new investor.
Likelihood:
Likelihood
Medium : Occurs whenever debt accumulates beyond current balance, or after an external call reduces company_balance (e.g., withdrawals) without reducing debt proportionally.
Realistic in multi-party environments where debt fluctuates or accounting is delayed.
Impact:
High — Allows free minting of shares or a revert that halts all investments:
New investors obtain arbitrarily large share allocations at zero cost.
Old investors are permanently diluted or lose ownership.
Company valuation and accounting collapse, halting future redemptions.
Can lead to insolvency and loss of funds.
Explanation:
Once the company’s net_worth = 0, the computed share_price is 0.
Calling fund_investor() triggers msg.value / share_price → division-by-zero panic (0x12).
If rounding or unsafe math bypasses the check, it mints extreme amounts of shares for 1 wei.
Explanation (brief)
Add an explicit solvency check before accepting investments.
Reject new funding when company_balance ≤ holding_debt.
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.