The contract attempts to guard operations based on solvency:
_is_bankrupt() returns True when company_balance < holding_debt.
produce(amount) asserts not self._is_bankrupt() before allowing production.
fund_investor() asserts (self.company_balance > self.holding_debt) before allowing public investment.
Intuitively, one would expect a single, consistent solvency condition to gate all state-changing operations (production and investment).
The conditions are inconsistent at the equality boundary:
_is_bankrupt() considers strictly less (<) as bankrupt.
fund_investor() requires strictly greater (>) to allow investment.
produce() only checks “not bankrupt” (thus allows company_balance == holding_debt) while fund_investor() disallows investment at equality.
This creates states where production is allowed but investment is blocked (when company_balance == holding_debt). The asymmetry can strand the company in awkward economies: inventory can be created (increasing future holding costs) but fresh capital from investors is prevented though the company is not “bankrupt” by its own definition.
Likelihood: Low
Occurs whenever the system enters a balance state where company_balance == holding_debt. This is common after holding-cost accrual or debt repayment events that exactly match the current company_balance.
Occurs whenever operational sequences move through the solvency boundary (e.g., owner pays holding debt to exactly match company_balance, or _apply_holding_cost() reduces company_balance to parity with holding_debt).
Impact: Low
Operational inconsistency / UX confusion — Owner can produce while investors are blocked from funding under the same economic state (equality), leading to hard‑to‑explain behavior for users and front‑ends.
Economic fragility — Allowing production at equality can increase holding costs and push the firm into true insolvency, while simultaneously preventing new capital from investors, increasing the chance of DoS‑like conditions (e.g., stuck operations due to rising debt and blocked funding).
Adopt one unified solvency definition and apply it consistently in all guards. Treat equality as insolvent (conservative).
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.