The funding flow is intended to mint msg.value // share_price shares so every wei contributed by a public investor is exchanged for an equivalent stake.
Contributions smaller than the computed share_price round new_shares down to zero, but the function still increases company_balance and emits SharesIssued, leaving the depositor with no shares.
Likelihood:
Share price grows with each profitable cycle, so later investors often face valuations far above 1 wei and are likely to send dust tests or underpriced deposits.
Wallet UX frequently allows arbitrary amounts, including rounding errors from front-end conversions, making sub-price deposits common.
Impact:
Investors lose the entire contribution without receiving any shares.
The protocol accrues unbacked equity entries that damage trust and invite regulatory scrutiny.
Ensure the share price is greater than the intended deposit (e.g., share_price = 1e15).
Call fund_investor with a smaller value (e.g., msg.value = 5e11).
new_shares evaluates to zero, the deposit is still credited to company_balance, and the sender's shares balance remains unchanged.
Require msg.value >= share_price (or otherwise revert) so users must send at least enough to mint one share.
Alternatively, track each investor's remainder and only finalize the contribution once the accumulated value crosses the share price.
Immediately refund msg.value % share_price so callers automatically recover the excess portion of their payment.
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.
The contest is complete and the rewards are being distributed.