Risk Engine Spec

Credit Limits & Risk Governance

Conventional financial platforms require upfront cash deposits or third-party bank lines before any exchange can occur. NodeHash operates on a decentralized mutual credit ledger where purchasing power is created at the exact moment of trade. Because balances fluctuate dynamically around zero, the protocol uses mathematical risk tiers, performance-based headroom scaling, and sponsor lineage damping to prevent contagion while maintaining network liquidity.

⚖️
Why Balances Swing Around Zero

In a pure mutual credit network, money is an accounting tool rather than a speculative asset. Across the entire system, the sum of all participant balances always equals zero:

∑ B_i(t) = 0

When you complete work for a peer, your balance rises into positive territory (+C). When you receive work, your balance moves negative (-C). A negative balance is not delinquency. It represents an interest-free working capital commitment backed by your productive skills and future availability.

The Dynamic Credit Line as Trade Headroom

Your credit limit sets the maximum negative balance your wallet can sustain. Instead of an arbitrary credit score issued by a central bureau, your limit represents dynamic trade headroom calculated directly from verified protocol history.

When your balance is zero, your available spending capacity equals your full credit limit. As you receive services without delivering reciprocal work, your negative balance consumes this headroom. If your negative balance approaches your limit, new demand proposals pause until you provide services to other peers.

🎮
Interactive Risk Simulator

Want to test balance swings and sponsor liability in real time? Visit our Dynamic Credit Gauge & Headroom Calculator to simulate multi-tier risk boundaries, test trades, and observe automated sponsor damping alerts.

Balance Utilization & Risk Tiers

The risk engine evaluates wallet health through the balance utilization metric. For accounts in deficit ($B_i < 0$), utilization measures how much authorized headroom has been spent:

\text{Utilization} = \frac{|B_i|}{\text{CreditLimit}_i} \times 100\%

For accounts with zero or positive balances ($B_i \ge 0$), utilization sits safely at 0%. Based on this ratio, accounts fall into four distinct operational tiers:

Credit Headroom & Utilization Tier Architecture

Visual spectrum showing operational states, matching permissions, and safety thresholds across wallet utilization levels.

SAFE (0% to 50%) ELEVATED (50% to 80%) CRITICAL (80% to 100%) >100% BREACH Full trading permissions Unrestricted cycle matching Soft rebalancing alerts Encourages supply trades Demand proposals throttled Prioritizes incoming credit 0% (Balance ≥ 0) 50% Threshold 80% Threshold 100% Authorized Limit
Risk Tier Utilization Range Wallet Status Protocol Enforcement & Constraints
Safe 0% to 50% Normal Unrestricted candidate cycle matching. Peers can initiate new proposals and bid on open requests freely.
Elevated 50% to 80% Warning The client displays advisory notices recommending supply-side trades. Proposals that increase debt trigger confirmation dialogs.
Critical 80% to 100% Throttled Outbound demand trades are temporarily blocked. The matching engine routes incoming supply candidates with priority to restore equilibrium.
Breach / Default > 100% Frozen All trade creation is halted. The account enters a 14-day grace period to fulfill commitments before sponsor liability triggers.

Dynamic Headroom Scaling & Credit Expansion

Credit limits are not static. When a user first enters NodeHash with an invitation from their sponsor, the protocol grants a conservative initial limit, typically 250 credits. As the peer establishes a proven history of punctual, high-quality fulfillment, their available headroom expands automatically.

The Headroom Expansion Formula

Dynamic credit allowances compute through a composite multi-factor algorithm:

\text{CreditLimit}_i = \text{BaseLimit} \times \left(1 + \ln(1 + N_{\text{trades}})\right) \times S_{\text{punctual}} \times T_{\text{lineage}}

The formula incorporates four core variables:

  • Base Starter Limit: A baseline allocation (250 credits) assigned to newcomers upon passkey and sponsor verification.
  • Trade Volume Factor: A sub-linear logarithmic scale based on completed exchanges ($N_{\text{trades}}$). Logarithmic scaling prevents runaway credit expansion, requiring sustained effort for higher tiers.
  • Punctual Delivery Score ($S_{\text{punctual}}$): Measures on-time milestone submissions and low dispute ratios. Ranging from 0.60 to 1.25, it acts as an accelerator or brake.
  • Lineage Trust Multiplier ($T_{\text{lineage}}$): Reflects the average reputation of the peer's sponsor tree (depths 1 to 3). Accounts backed by seasoned sponsors enjoy up to 1.30x headroom.

Positive Balance Holding Caps

Mutual credit systems suffer when participants hoard large positive balances without recirculating value back into the community. Hoarding withdraws productive capacity from circulation and starves the candidate pool.

To maintain dynamic equilibrium, NodeHash sets a positive balance accumulation cap via GET /api/v1/credits/cap/me. Once an account reaches this cap, subsequent trade earnings require the peer to either spend credits on incoming services or allow slight demurrage decay, encouraging continuous circulation.

Default Handling & Grace Periods

When an account breaches 100% utilization or fails to deliver an agreed milestone, the protocol initiates a structured default lifecycle:

Default Escalation Sequence
Deficit Breach                 14-Day Grace Period               Sponsor Absorption
     |                                  |                                  |
     |-- 1. Limit Exceeded ----------->|                                  |
     |      (Trade Creation Paused)     |                                  |
     |                                  |-- 2. Daily Reminders ---------->|
     |                                  |      (Fulfill Supply Offers)     |
     |                                  |                                  |
     |                                  |-- 3. Grace Period Expires ----->|
     |                                  |      (Deficit Unresolved)        |
     |                                  |                                  |
     |<-- 4. Account Defaulted ---------|-------------------------------->|
     |     (Key Banned / Frozen)        |     (Liability Ripples Backward) |
  1. Automatic Trade Pause: The moment utilization breaches 100%, the node freezes new outgoing demand proposals. In-flight milestones remain active so the user can deliver committed work.
  2. 14-Day Settlement Grace Window: The account receives 14 calendar days to restore balance. The user can fulfill pending supply milestones or settle obligations directly using POST /api/v1/credits/debt-records/me.
  3. Formal Default Declaration: If the 14-day window lapses without balance restoration, the protocol executes POST /api/v1/credits/process-defaults. The account is marked DEFAULTED, its cryptographic passkey credentials are revoked, and unpaid debt records pass to the sponsor lineage.

Sponsor Lineage Liability Damping

In traditional finance, defaulting on debt leads to external collection agencies or government court actions. In anonymous crypto networks, bad actors default without consequence, poisoning the system. NodeHash resolves this through graph-based sponsor accountability.

Every newcomer is vouched for by an existing member. When an account defaults, the unpaid obligation ripples backward through the sponsor endorsement chain according to a geometric damping function:

\text{dampingFactor}(d) = 0.5^{d-1} \quad \text{for } d \in \{1, 2, 3\}

Sponsor Hop Lineage Relationship Damping Exponent Absorption Factor Liability on 200 Credit Default
Hop 1 Direct Endorser (Inviter) 0.5^{1-1} = 0.5^0 1.00 (100%) 200 credits deducted or encumbered
Hop 2 Secondary Endorser (Inviter's Sponsor) 0.5^{2-1} = 0.5^1 0.50 (50%) 100 credits deducted or encumbered
Hop 3 Tertiary Endorser (Root Sponsor) 0.5^{3-1} = 0.5^2 0.25 (25%) 50 credits deducted or encumbered
Hop 4+ Distant Lineage d > 3 0.00 (0%) Decoupled: zero network-wide contagion
🛡️
Geometric Contagion Decoupling

Bounding liability damping at depth 3 is a vital architectural decision. Without a finite cutoff, defaults could cascade indefinitely across the entire graph. By capping liability at 3 hops, the protocol concentrates accountability near the bad actor while preserving macroeconomic stability for the wider network.

Why Sponsor Damping Preserves the Zero-Sum Invariant

When an account defaults and disappears, a naive mutual credit ledger would be left with an unbacked negative hole, causing systemic inflation. In NodeHash, the sponsor chain absorbs the deficit.

The direct sponsor and upstream lineage have their credit balances debited or their borrowing headroom encumbered until the shortfall is settled. Because the deficit is absorbed by the endorsers who vouched for the defaulter, total ledger balances remain strictly zero-sum:

\sum_{i \in \text{All}} B_i = 0

This creates a strong social incentive: members only invite trusted peers, run basic due diligence, and actively help their invitees complete trades successfully.

Credit Risk API Endpoints

Clients interact with the credit risk subsystem through standardized REST endpoints:

Method & Route Purpose Primary Payload / Response
GET /api/v1/credits/limits/me Fetch current dynamic limit and utilization tier { "limit": 1000, "balance": -420, "tier": "safe", "headroom": 580 }
POST /api/v1/credits/limits/recalculate Recalculate limit based on completed trade records { "previousLimit": 1000, "updatedLimit": 1150 }
POST /api/v1/credits/feasibility Verify whether proposed trade fits available headroom { "isFeasible": true, "maxAllowedCredit": 580 }
GET /api/v1/credits/debt-records/me Retrieve outstanding deficits and settlement schedules { "debts": [], "gracePeriodRemainingDays": null }
POST /api/v1/credits/process-defaults Trigger daemon evaluation of expired grace periods { "processed": 3, "lineageLiabilitiesTriggered": 1 }

Continue exploring the architecture directory to inspect the rest of the NodeHash specification suite.