Files

136 lines
8.7 KiB
Markdown

# THE COMMONS - Economic & Civic Accounting Model
This document states, precisely, what every "credit"/"budget"/"debt" in THE
COMMONS means, where it comes from, where it goes, and what the system does
and does NOT guarantee. The design rule is: **everything must be accounted
for, and nothing may claim to be something it is not.**
THE COMMONS runs **four separate accounting circuits**. They deliberately do
NOT share a unit or a balance; conflating them is the most common
misreading, so each is defined on its own below.
## 1. Commons Credit (the wallet) - a contribution-exchange time-bank
- **What it is:** a mutual-credit / LETS-style time-bank. One Commons Credit
is a claim on roughly one unit of community service or labor (a "favor"),
redeemable by transferring it to a resident who provides something.
- **Unit:** a favor-credit. It is NOT pegged to litres of water or kWh - those
are rationed directly by Fair Share (circuit 2), not bought with credit.
- **Issuance (sources), each tied to a real contribution or an explicit,
bounded grant:**
- *Welcome credit* (50): a one-time line of credit the commons extends to
every new resident so trade can start on day one (classic LETS seed). By
design, this is meant to be the ONLY deliberate net issuance, small and
bounded, and disclosed here - not hidden fiat. See the disclosed
limitation below: that design intent is not yet code-enforced against a
peer self-issuing an arbitrary amount.
- *Being housed* credits a resident ONCE, as a one-time settlement grant,
when an assignment cycle first places them in a slot - never again for
the same placement and never per re-run of the cycle (idempotent). It is
a bounded recognition that you are now housed, not a per-click mint.
- *Fair Draw* records the winner of an indivisible good; any credit there is
a recognition token for the contributed good, not a second allocation of
it.
- **Spend (sinks):** a resident-to-resident **transfer** pays another resident
for a service (e.g. a Mentor session, a borrowed tool, help with a task).
This is the wallet's reason to exist.
- **Conservation:** every transfer is zero-sum (one debit, one matched
credit). By design, the only INTENDED net issuance is the bounded welcome
credit, so at steady state Sigma(balances) = residents x welcome is meant
to be a stable invariant, not unbounded inflation - see the disclosed
limitation below: this is not yet code-enforced against a peer
self-issuing an arbitrary amount.
- **Credit limit:** the default per-account credit limit is 0, so a resident
cannot transfer below their own issued credit; an over-spend is REJECTED at
replay (LedgerState.rejected) and surfaced, never silently applied. This is
the bounded-negative-balance rule of mutual credit.
## 2. Fair Share "equal incomes" - a fair-division MODELING device (NOT money)
- Fair Share computes an envy-free division of the scarce resource pools
(power/water/food/cooling) using CEEI (Competitive Equilibrium from Equal
Incomes). The "equal income" is a **modeling construct**: every resident is
given an equal claim on the commons pool for the purpose of computing a fair
split. It is NOT wallet credit, it is never spent, and it has no "source" to
fund - it is how the fair split is calculated.
- **Preferences ARE collected:** each resident's reported need
(fairshare.need) is the linear utility weight CEEI divides against; a
resident who reports no need for a resource demands none of it. (Needs are
reported through the Fair Share screen and the admin seed.)
- **Supply** = admin-seeded baseline + additive contributions (e.g. a Farms
harvest). A Farms contribution is a **projection** (a forecast of food that
will mature), additive on top of the baseline so growing food can only raise
the pool, never overwrite/shrink it.
## 3. Assembly QV budget - a per-decision civic-voice allocation (NOT money)
- Quadratic voting spends a **voting-credit budget that is separate from the
wallet**. It is a fixed civic allowance per decision, carried on the signed
ballot itself (clamped to the per-proposal budget), so hoarding wallet
credit cannot buy extra votes and a forged CRDT credit value cannot inflate
a vote's weight. Voting credit is not transferable and does not touch
Commons Credit.
## 4. Housing fairness-debt - rotation bookkeeping (NOT currency)
- When a resident does not get their top-preferred slot, they accrue
fairness-debt that weights them toward a better slot next cycle. It is a
rotation-fairness record, denominated in fit-score shortfall, never
exchanged or spent, and never reconciled against Commons Credit.
## What this system does NOT guarantee (disclosed honestly)
- **Personhood / Sybil resistance:** one Ed25519 identity = one DEVICE, not
one person. A resident with two devices has two identities. A real
deployment needs a personhood layer (in-person roster attestation or a
web-of-trust); that is out of scope for a client-only PWA. The small,
bounded welcome credit limits the economic damage of a casual Sybil, but
does not prevent it.
- **Offline double-spend:** because a balance is a replay of the log a device
currently holds, a malicious holder can sign two transfers of the same credit
to two offline peers (each transfer is valid on its own). Once both land in
one log, `computeBalances` replays them in the single deterministic order
(`sortForReplay`: Lamport, then author pubkey, then signature) and REJECTS the
second as a credit-limit breach - it goes to `LedgerState.rejected` and never
applies, so no balance ever goes negative. That rejection runs on every
balance read, so the protection is always on: it is detection-plus-
deterministic-rejection at replay, not prevention at signing time (which would
need a trusted sequencer and break the local-first guarantee).
`ledgerConflicts.mergeReplicas` is an additional earlier-Lamport-wins replica
merger with explicit refund flagging, available for an offline merge tool but
NOT invoked by the live `sync.ts` pull - the live pull relies on the always-on
replay rejection above, which is the load-bearing mechanism.
- **Live authoritative alerts:** the relay is best-effort; the event-log
append/read/replay path never depends on it, so the app keeps working
offline. Safety signals (hazards, water alerts) propagate when devices sync,
which is not a guaranteed real-time warning service.
- **Unsigned-subject claims:** a signed `mentor.skillReview` or Assembly
delegation binds its AUTHOR but not its SUBJECT - the reviewed learner id /
delegate id is asserted by the signer, not co-signed by that party. A peer
could inject a review or delegation naming someone else (the same forgeable
class as Sybil above); it cannot forge the author or inflate a QV weight.
Co-signing the subject's consent onto the log would close it.
- **Synced health referrals:** a `healthpost.referral` carries the triage
RESULT (urgency + classification) and syncs to the shared relay as the
resident's deliberate, consent-bearing handoff to a clinician - health-
adjacent data on a shared store, sent on purpose. The passive symptom tally
(`healthpost.symptomReport`) and all other personal health inputs stay
strictly local; only the explicit referral handoff leaves the device.
- **Unauthenticated `wallet.issue` issuer:** `ledger.ts`'s `isIssuePayload`
accepts any signed entry shaped `{ type: "wallet.issue", account, amount }`
where `amount` is a non-negative finite number - it checks the payload's
shape, not who the signer is relative to `account`. Any peer can sign a
`wallet.issue` crediting their OWN account with an arbitrary amount, the
same way `fairdraw`/`housing` legitimately do; nothing authenticates
"issuer" identity the way `extractQvBallots` authenticates voter identity
against the signing key. So the "only the bounded welcome credit is net
issuance" invariant above is a design intent, not something the code
enforces today. This is disclosed as a known limitation, not fixed, per an
explicit scope decision for this build.
- **Unvalidated Housing `fairnessDebt` on sync:** `housing.ts`'s
`isHousingAssignmentPayload` checks that a `housing.assignment` event's
`fairnessDebt` is a non-null object, but never checks that its values are
finite numbers. A synced event from a malformed or malicious peer could
carry a `fairnessDebt` with a `NaN`, `Infinity`, or non-numeric value for
some resident; `computeFairnessDebtLedger` would fold that value straight
into the rotation ledger and `solveHousingAssignment`'s debt-weighted
objective would carry it into every future cycle. The blast radius is
bounded to the housing fairness rotation (it never touches Commons Credit
or any other circuit), but it is not validated at the replay boundary
today.