code wiki / (root) / nx_market_rt.nx

nx_market_rt.nx

buildroot/runtime/nx_market_rt.nx

3868 B89 linesdepth 3pulls 3 transitivereach 0 importersview sourcekind orphan librarytopic market
docsdependenciesstructsconstsfunctions

about

nx_market.nx -- GO-TO-MARKET / UNIT ECONOMICS. Engineering-ready + buildable + provable is not the same as SELLABLE. This closes the business side: the bench prototype's BOM cost -> production cost at volume (Wright's-law learning curve) -> price for a target margin -> gross margin -> break-even volume, and the customer's PAYBACK vs the alternative (for a water system, vs buying bottled water). Composes nx_bom. INTEGER-EXACT, money in cents. Wright's law: unit cost falls by a fixed fraction per DOUBLING of cumulative volume (learning_pct=85 -> 15% cheape each doubling, a standard electronics-assembly rate). Inputs are planning estimates grounded in standard benchmarks (refine with real quotes later); the framework is exact. THE exceed: the go-to-market decision is COMPUTED -- margin, break-even, and customer ROI from the real BOM -- not guessed. A product is viable only if it clears a healthy margin AND pays the customer back within a year. grounded: wrights_law_experience_curve + gross_margin + break_even_analysis + unit_economics genealogy_id: unit_economics_go_to_market + nishi_market

dependencies 2 imports · 0 importers

nx_syscalls.nx nx_bom_rt.nx nx_market_rt.nx

imports: nx_syscalls.nxnx_bom_rt.nx

imported by: nobody (leaf or entry point)

structs

none

consts

25const MK_MIN_MARGIN_PCT: i64 = 40 // healthy hardware gross margin
26const MK_MAX_PAYBACK_DAYS: i64 = 365 // customer ROI within a yea

functions

30func mk_production_unit_cost(prototype_cents: i64, prod_fraction_pct: i64) -> i64
35func mk_learning_cost(unit1_cents: i64, learning_pct: i64, doublings: i64) -> i64
46func mk_price_for_margin(cogs_cents: i64, margin_pct: i64) -> i64
52func mk_gross_margin_pct(price_cents: i64, cogs_cents: i64) -> i64
58func mk_break_even_units(fixed_cents: i64, price_cents: i64, variable_cents: i64) -> i64
65func mk_daily_savings_cents(consumption_l: i64, alt_per_l_cents: i64, our_per_l_cents: i64) -> i64
72func mk_payback_days(unit_price_cents: i64, daily_savings_cents: i64) -> i64
78func mk_viable(margin_pct: i64, payback_days: i64) -> i64
86func mk_water_production_cost(prod_fraction_pct: i64) -> i64