code wiki / _hdl_build / nx_floorplan_credit.nx
nx_floorplan_credit.nx
buildroot/runtime/_hdl_build/nx_floorplan_credit.nx
about
nx_floorplan_credit.nx -- MANHEIM-BUILD-L4: FLOOR-PLAN FINANCING (NextGear Capital-class wholesale
inventory credit), the rent-bearing FLOAT-FINANCE node the analyst's cost-ledger names as a residual.
Sovereign (nx_cc->nxasm, no gcc), integer-exact + deterministic.
WHERE THE RENT HIDES: a floor-plan is quoted at a low NOMINAL rate (e.g. 8% APR) but loaded with fees
(curtailment, documentation, extension) that make the dealer's TRUE all-in cost far higher. The opaque
quote understates the real cost -- that gap is the float-finance RENT (analyst Case 002 residual).
ENGINE (every charge itemized + reproducible = auditable, vs an opaque proprietary statement):
fc_nominal_interest = principal * nominal_apr_bps * days / (10000 * 365)
all_in_cost = nominal_interest + curtailment_fee + doc_fee
fc_effective_apr = all_in_cost * 10000 * 365 / (principal * days) (the TRUE annualized cost, bps)
===== S-CLASS EXCEED, MEASURED (no-wave law) =====
main() is an EXCEED BENCH vs the opaque "trust the quoted rate" baseline -- it QUANTIFIES the hidden
rent the quote conceals (deterministic, exact, non-circular):
A (fees present): quoted nominal = 800 bps, TRUE effective = 2320 bps -> hidden_rent = 1520 bps
(15.2 points of float-finance rent the analyst NAMES, now MEASURED).
NEG-CONTROL B (no fees): effective == nominal (800 bps) -> hidden_rent = 0 (the detector does NOT
fabricate rent where none exists = a discriminating bench, Referee high-TNR).
HONEST SCOPE (no-overclaim): the exceed is exact, auditable cost-disclosure that reveals hidden rent in a
MODELED fee structure -- NOT a claim about any specific real NextGear contract's actual fees (those need
the real contract = operator-host). Evidence -> knowledge/status/floorplan_credit.log. license_tier: ORIGINAL
dependencies 1 imports · 0 importers
imports: nx_syscalls.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| 26 | const FC_MAGIC_10000: i64 = 10000 |
| 27 | const FC_MAGIC_1000000: i64 = 1000000 |
| 28 | const FC_MAGIC_20000: i64 = 20000 |
| 29 | const FC_MAGIC_5000: i64 = 5000 |
| 30 | const FC_MAGIC_13150: i64 = 13150 |
| 31 | const FC_MAGIC_38150: i64 = 38150 |
| 32 | const FC_MAGIC_2320: i64 = 2320 |
| 33 | const FC_MAGIC_1520: i64 = 1520 |
| 35 | const FC_LOG: *u8 = "knowledge/status/floorplan_credit.log" |
functions
| 37 | func fc_w(fd: i64, s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(fd, s, n); return 0 } |
| 38 | func fc_wn(fd: i64, v: i64) -> i64 { let bb: *u8 = sys_mmap(28); var m: i64=v; if m<0 {m=0-m; sys_write(fd,"-" as *u8,1)}; let t: *u8 = sys_mmap(28); var k: i64=0; if m==0 {t[0]=48;k=1}; while m>0 {t[k]=(48+(m%10)) as u8; m=m/10; k=k+1}; var i: i64=0; while i<k {bb[i]=t[k-1-i]; i=i+1}; sys_write(fd, bb, k); return 0 } |
| 41 | func fc_nominal_interest(principal: i64, apr_bps: i64, days: i64) -> i64 called by 1: main |
| 45 | func fc_effective_apr(all_in: i64, principal: i64, days: i64) -> i64 called by 1: main |
| 51 | func main() -> i64 |