nx_entity_lib.nx
buildroot/runtime/nx_entity_lib.nx
about
nx_entity_lib.nx -- ENTITY MANAGEMENT: capitalisation table arithmetic and corporate-authority limits.
The Carta/Athennian-class category we had at zero. A cap table is not a spreadsheet, it is a set of
hard corporate-law constraints, and two of them are violated constantly.
u2605OVER-ISSUANCE IS VOID, NOT AN OVERDRAFT. A corporation may not issue more shares than its charter
AUTHORISES. Shares purportedly issued beyond that number are void -- not "issued pending an amendment",
not a rounding problem to fix at the next raise. A cap table that simply shows a larger issued figure
is asserting something the corporation had no power to do, so this refuses rather than reports.
u2605OWNERSHIP DEPENDS ENTIRELY ON THE BASIS, AND THE BASIS IS USUALLY UNSTATED. The same holder is a
different percentage on an OUTSTANDING basis than on a FULLY DILUTED basis (which counts the option
pool, warrants and convertibles). Founders hear the outstanding number, investors model the diluted
one, and the gap is where disputes live. Both are computed here, separately and explicitly named --
there is deliberately no single "ownership" function to call by accident.
Percentages are in PER MILLE (0..1000) to stay in integer arithmetic; a permille figure is exact where
a truncated percent would silently lose sub-1% holders.
u2605FAIL-CLOSED: a zero or negative denominator yields ENT_UNKNOWN, never zero percent. "0% owned"
and "we cannot compute this" are different answers.
STRUCTURE: pure decision core, zero I/O. license_tier: ORIGINAL LIB.
dependencies 1 imports · 0 importers
imports: nx_matter_lib.nx
imported by: nobody (leaf or entry point)
structs
| none |
consts
| 25 | const ENT_UNKNOWN: i64 = 0 - 1 |
| 26 | const ENT_VOID: i64 = 0 - 2 |
functions
| 28 | func ent_is1(v: i64) -> i64 |
| 34 | func ent_issue_ok_pure(authorized: i64, issued: i64) -> i64 |
| 43 | func ent_authorized_remaining_pure(authorized: i64, issued: i64) -> i64 calls 1: ent_issue_ok_pure |
| 49 | func ent_outstanding_pure(issued: i64, treasury: i64) -> i64 called by 1: ent_table_valid_pure |
| 58 | func ent_fully_diluted_pure(outstanding: i64, options_granted: i64, options_available: i64, warrants: i64, convertibles: i64) -> i64 |
| 69 | func ent_permille_pure(held: i64, denominator: i64) -> i64 |
| 75 | func ent_ownership_outstanding_pure(held: i64, outstanding: i64) -> i64 calls 1: ent_permille_pure |
| 79 | func ent_ownership_diluted_pure(held: i64, fully_diluted: i64) -> i64 calls 1: ent_permille_pure |
| 85 | func ent_dilution_consistent_pure(outstanding_permille: i64, diluted_permille: i64) -> i64 |
| 93 | func ent_pool_permille_pure(options_granted: i64, options_available: i64, fully_diluted: i64) -> i64 calls 1: ent_permille_pure |
| 101 | func ent_table_valid_pure(authorized: i64, issued: i64, treasury: i64, fully_diluted: i64) -> i64 |