Normal behavior:
When an investor redeems, withdraw shares() computes their payout as shares_owned share_price and sends that ETH to the investor.
Specific issue:
The multiplication shares owned share price is performed without overflow checks. If shares_owned and/or share_price are large enough, the product can overflow the 256-bit unsigned integer and wrap around producing a much smaller payout than intended (or potentially zero). This allows an attacker (or accidental state) to cause incorrect, truncated payouts either stealing funds (if the wrap results permit other logic to misuse the value), or depriving investors of funds.
Likelihood:
requires either very large shares owned (close to TOTAL_SHARES) and/or an unexpectedly large share price (due to miscalculation, external manipulation, or precision scaling).
Attackers controlling a contract that manipulates share accounting or an owner who increases public shares cap / injects extreme values may increase likelihood.
Impact:
overflow leads to incorrect payout calculations:
Investors may receive much less ETH than they are owed (financial loss).
The contract accounting (company_balance) may be reduced by a wrong value and not match issued shares, causing insolvency bugs and downstream DoS.
In edge cases an overflow could produce a huge payout (if later logic interprets wrapped value as large) — causing fund drain.
Trust and legal/auditing consequences for mispaid redemptions.
Multiplying shares_owned * share_price without checks can overflow 256-bit arithmetic; for example 2**200 * 2**60 = 2**260 wraps modulo 2**256 and produces a tiny/wrong payout (e.g., 16), demonstrating payout truncation.
Explanation (brief)
Perform safe multiplication checks before using the product as a payout. Ensure that payout / share_price == shares_owned (when share_price > 0) or use explicit overflow-safe arithmetic utilities. Revert if overflow would occur. Additionally add sanity limits on share_price and shares_owned (e.g., ensure shares_owned <= TOTAL_SHARES and share_price cannot exceed sensible bounds).
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.