code wiki / _hdl_build / nx_batt_finmodel.nx

nx_batt_finmodel.nx

buildroot/runtime/_hdl_build/nx_batt_finmodel.nx

8560 B114 linesdepth 4pulls 5 transitivereach 0 importersview sourcekind tooltopic batt
docsdependenciesstructsconstsfunctions

about

nx_batt_finmodel.nx -- the nishi finance member's GROUNDED financial workup for the Li-ion reclamation business (HYBRID model, the planner's pick). Answers the operator: INITIAL INVESTMENT + PAYOFF + ADVERSARIAL stress, with REAL numbers. Every figure is tagged [VERIFIED] (adversarially-verified market data, traces to knowledge/research/2026-06-23-battery-reclaim-cost-basis.md) or [assumption] (not yet sourced -> labeled honestly). The economic CORE lives in nx_batt_econ (shared with the written plan nx_batt_bizplan = DRY #15, no drift). The gate asserts the itemized capex/opex sums == the shared constants, so presentation can't diverge from the math. Build: _offc/nx_sov_build_run.elf nx_batt_finmodel license_tier: ORIGINAL

dependencies 2 imports · 0 importers

nx_debt_payoff.nx nx_batt_econ.nx nx_batt_finmodel.nx

imports: nx_debt_payoff.nxnx_batt_econ.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main gp capline gp ↻ gd mny_format mny_wdec sys_mmap gd ↻ be_gross_base be_base_net be_scenario_net be_base_net ↻ be_payoff_months gn be_scenario_net ↻ sline gp ↻ gd ↻ gn ↻ be_payoff_months ↻ have

structs

none

consts

none

functions

11func gp(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 }
called by 3: caplineslinemain
12func gn(v0: i64) -> i64 { var v: i64=v0; if v<0{sys_write(1,"-" as *u8,1);v=0-v} let b: *u8=sys_mmap(24); var k: i64=0; if v==0{b[0]=48 as u8;k=1} while v>0{b[k]=(48+(v%10)) as u8;v=v/10;k=k+1} let o: *u8=sys_mmap(24); var j: i64=0; while j<k{o[j]=b[k-1-j];j=j+1} sys_write(1,o,k); return 0 }
called by 2: slinemain
13func gd(c: i64) -> i64
called by 3: caplineslinemain calls 1: mny_format
18func have(p: *u8) -> i64 { let fd: i64=sys_openat_rd(p); if fd<0 { return 0 } sys_close(fd); return 1 }
called by 1: main
19func capline(name: *u8, c: i64, verified: i64) -> i64
called by 1: main calls 2: gpgd
24func sline(name: *u8, net: i64, capex: i64) -> i64
called by 1: main calls 4: gpgdgnbe_payoff_months
31func main() -> i64