SIM
← NIPS
NIP-0005

Cyclic Obligation Compression

STATUS
ACTIVE
TYPE
CORE
AUTHORS
NIL Research
CREATED
2023-09-14
VERSION
0.7.0

1. ABSTRACT

Specifies the cycle-detection and cancellation procedure applied to the obligation graph at each Netting Epoch, as explored analytically in NIL-R01.

2. MOTIVATION

Individually settling every Obligation Object requires capital movement proportional to gross obligation value. Where obligations form cycles across participants, that movement is avoidable without changing any participant's net position.

3. TERMINOLOGY

Directed obligation graph G = (V, E) — V is the set of Settlement Domains, E(i, j) is summed unresolved notional from i to j. Residual exposure — what remains once compression completes.

4. SPECIFICATION

At epoch close, the network constructs a directed graph G = (V, E) from all unresolved obligations, where V is the set of Settlement Domains and E(i, j) is the sum of obligation notional from i to j.

For each detected simple cycle, the minimum edge weight along the cycle is subtracted from every edge in that cycle. This repeats until no positive-weight cycle remains. Remaining edge weights constitute the epoch's residual exposure, subject to rebalancing under NIP-0008.

5. ALGORITHM

  1. Lock the current epoch's obligation graph snapshot.
  2. Run cycle detection (e.g. Johnson's algorithm) over G to enumerate simple cycles with positive minimum edge weight.
  3. For the detected cycle with the largest minimum edge weight, subtract that weight from every edge along it.
  4. Remove any edge whose weight reaches zero.
  5. Repeat from step 2 until no positive-weight cycle remains.
  6. Emit remaining edge weights as the epoch's residual exposure.

6. INVARIANTS

Compression MUST repeat until no positive-weight cycle remains in G. A cancelled amount MUST NOT exceed the minimum edge weight along its cycle.

7. FAILURE CONDITIONS

Cycle detection over a stale or partially updated graph produces incorrect compression; the graph snapshot MUST be locked before scanning begins (NIP-0021).

8. SECURITY CONSIDERATIONS

Cycle detection operates only on domain-level aggregates, not individual obligations, which limits the information any single participant can infer about others' obligation graphs from compression outcomes alone.

9. REFERENCE IMPLEMENTATION

The reference implementation is the NIL-0 simulation network. No production implementation of this proposal exists; behavior described here is normative for the simulation only.