{
  "fixedPoint": "18 decimals, truncating division (as AUFValuationLib.sol)",
  "vectors": [
    {
      "name": "net-equity",
      "method": "auf:method:net-equity@1",
      "inputs": {
        "denomination": "USD",
        "assets": [
          {
            "element": "cash",
            "quantity": "100",
            "price": "1"
          }
        ],
        "liabilities": [
          {
            "element": "payable due now",
            "quantity": "30",
            "price": "1"
          }
        ]
      },
      "fixedPoint": {
        "assetsWad": [
          "100000000000000000000"
        ],
        "liabilitiesWad": [
          "30000000000000000000"
        ]
      },
      "expected": {
        "kind": "monetary",
        "value": "70.00",
        "denomination": "USD",
        "valueWad": "70000000000000000000"
      }
    },
    {
      "name": "realized-net-cash-flow",
      "method": "auf:method:realized-net-cash-flow@1",
      "inputs": {
        "asset": "USD stable",
        "inflows": [
          "100"
        ],
        "outflows": [
          "30",
          "5"
        ],
        "note": "settled revenue 100, compute expense 30, external fees 5, no internal transfers"
      },
      "fixedPoint": {
        "inflowsWad": [
          "100000000000000000000"
        ],
        "outflowsWad": [
          "30000000000000000000",
          "5000000000000000000"
        ]
      },
      "expected": {
        "kind": "monetary",
        "value": "65.00",
        "denomination": "USD",
        "valueWad": "65000000000000000000"
      }
    },
    {
      "name": "finite-horizon-dcf",
      "method": "auf:method:finite-horizon-dcf@1",
      "inputs": {
        "denomination": "USD",
        "cashflows": [
          "65",
          "65"
        ],
        "rate": "0.1",
        "terminalValue": "0"
      },
      "fixedPoint": {
        "cashflowsWad": [
          "65000000000000000000",
          "65000000000000000000"
        ],
        "rateWad": "100000000000000000",
        "terminalValueWad": "0"
      },
      "expected": {
        "kind": "monetary",
        "value": "112.81",
        "denomination": "USD",
        "valueWad": "112809917355371900690",
        "exact": "65/1.1 + 65/1.21 = 112.80991735537190082644..."
      }
    },
    {
      "name": "conditional-payoff",
      "method": "auf:method:conditional-payoff@1",
      "inputs": {
        "denomination": "USD",
        "scenarios": [
          {
            "name": "success",
            "probability": "0.6",
            "payoff": "100"
          },
          {
            "name": "failure",
            "probability": "0.4",
            "payoff": "0"
          }
        ],
        "rate": "0.1",
        "periods": 1,
        "probabilityBasis": "declared",
        "costsIncluded": false
      },
      "fixedPoint": {
        "payoffsWad": [
          "100000000000000000000",
          "0"
        ],
        "probabilitiesWad": [
          "600000000000000000",
          "400000000000000000"
        ],
        "rateWad": "100000000000000000",
        "periods": 1
      },
      "expected": {
        "kind": "scenario",
        "value": "54.55",
        "denomination": "USD",
        "valueWad": "54545454545454545400",
        "exact": "(0.6 x 100 + 0.4 x 0) / 1.1 = 54.5454..."
      }
    },
    {
      "name": "conditional-payoff-obligation",
      "method": "auf:method:conditional-payoff@1",
      "inputs": {
        "denomination": "USD",
        "scenarios": [
          {
            "name": "task fails",
            "probability": "0.4",
            "payoff": "-100"
          },
          {
            "name": "task accepted",
            "probability": "0.6",
            "payoff": "0"
          }
        ],
        "rate": "0.1",
        "periods": 1,
        "probabilityBasis": "estimated",
        "costsIncluded": true
      },
      "fixedPoint": {
        "payoffsWad": [
          "-100000000000000000000",
          "0"
        ],
        "probabilitiesWad": [
          "400000000000000000",
          "600000000000000000"
        ],
        "rateWad": "100000000000000000",
        "periods": 1
      },
      "expected": {
        "kind": "scenario",
        "value": "-36.36",
        "denomination": "USD",
        "valueWad": "-36363636363636363600",
        "exact": "(0.4 x -100 + 0.6 x 0) / 1.1 = -36.3636..."
      }
    }
  ],
  "exceptions": [
    {
      "name": "missing-evidence",
      "rule": "A receipt whose inputs lack a price for a material position has result kind insufficient-evidence and lists the position under inputs.missing; it never values the position at zero.",
      "example": "examples/contingent-obligation-unit.valuation.insufficient-evidence.json"
    },
    {
      "name": "boundary-change",
      "rule": "A receipt recorded for version 1 of a Unit is not returned as a valuation of version 2; assertions are kept per (unitId, version) and assertionCount(unitId, 2) does not include it.",
      "test": "test/Vectors.t.sol#testBoundaryChangeSeparatesReceipts"
    },
    {
      "name": "internal-transfer",
      "rule": "A payment between two elements of the same Unit that crosses no port is not inflow or outflow of the Unit; the realized net cash flow attributable to it is 0.",
      "example": "examples/swarm-unit.json (relation exchanges between the two sub-units)"
    },
    {
      "name": "shared-right",
      "rule": "A skill included by two child Units with share 1/2 each is counted once at the parent level by the net-equity method.",
      "example": "examples/swarm-unit.valuation.net-equity.json"
    },
    {
      "name": "expired-or-revoked",
      "rule": "An assertion past validUntil, revoked or superseded is returned only when marked as such and is never presented as current.",
      "test": "test/AUFAssertionRegistry.t.sol#testRevoke, testSupersede"
    },
    {
      "name": "unsupported-extension",
      "rule": "A document with an extension member marked required whose identifier the consumer does not know is reported as unsupported.",
      "test": "tools/resolve.js (reports unsupported)"
    },
    {
      "name": "overlap-under-different-references",
      "rule": "Two positions with different element ids but the same underlying are one claim group only when a same-claim relation with a basis links them; then the net-equity method counts the entitlement once (45.12). Without a same-claim or distinct-claim declaration the overlap is unresolved and no point monetary value is admissible: the receipt is an interval (low 45.12 counted once, high 90.24 counted separately) or insufficient-evidence listing the pair under inputs.overlaps.",
      "example": "examples/revenue-holdings-declared.valuation.net-equity.json, examples/revenue-holdings-undeclared.valuation.net-equity.interval.json, examples/revenue-holdings-undeclared.valuation.net-equity.insufficient-evidence.json; tools/resolve.js --unit 11 (reports the unresolved overlap)"
    },
    {
      "name": "withdrawn-evidence",
      "rule": "O -> V -> revoke(O): observer X records observation O, evaluator Y records receipt V citing O (snapshot.observations, snapshot.hash), X revokes O. O is revoked and not current; V keeps status active (X cannot revoke or supersede V; the assertion count is unchanged); a resolver presents V with evidence status withdrawn, lists O as revoked, and does not present V as current. Contrast: receipt V2 cites observation O2 whose validity window ends after V2's as-of time; after the window ends, O2 is not current but V2's evidence status is supported and V2 is current. Had O2's window ended before the as-of time, the evidence status would be expired and V2 would still be returned as current.",
      "sequence": [
        {
          "step": 1,
          "actor": "observer X",
          "action": "assertStatement(kind observation) -> O",
          "status": {
            "O": "active"
          }
        },
        {
          "step": 2,
          "actor": "evaluator Y",
          "action": "assertStatement(kind valuation) -> V, content cites O in snapshot.observations and carries snapshot.hash = contentHash(O)",
          "status": {
            "O": "active",
            "V": "active"
          },
          "resolver": {
            "V": {
              "current": true,
              "evidence": "supported"
            }
          }
        },
        {
          "step": 3,
          "actor": "observer X",
          "action": "revoke(O)",
          "status": {
            "O": "revoked",
            "V": "active"
          },
          "assertionCount": "unchanged",
          "reverts": [
            "revoke(V) by X: AUF_NotAsserter",
            "an assertion by X with supersedes = V: AUF_SupersedeMismatch"
          ],
          "resolver": {
            "O": {
              "current": false
            },
            "V": {
              "current": false,
              "evidence": "withdrawn",
              "observations": [
                {
                  "id": "O",
                  "status": "revoked"
                }
              ]
            }
          }
        },
        {
          "step": 4,
          "actor": "evaluator Y",
          "action": "supersede(V) with a corrected receipt or one of kind insufficient-evidence (expected, not required)",
          "status": {
            "V": "superseded"
          }
        }
      ],
      "evidenceStatuses": [
        "not-cited",
        "withdrawn",
        "superseded",
        "unresolved",
        "expired",
        "supported"
      ],
      "test": "test/AUFAssertionRegistry.t.sol#testRevokedObservationLeavesDependentReceiptActive (registry); tools/test/resolve-evidence.test.js (resolver output)"
    },
    {
      "name": "additivity-must-be-established",
      "rule": "Two positions of different claim groups are additive only when a distinct-claim declaration with a basis covers the pair (or the evaluator states treatment distinct with a basis under inputs.overlaps). A missing underlying, two different underlying references, two URIs for what may be one entitlement, or simply the absence of a detected overlap never establish distinctness: the pair is unresolved and the net-equity receipt is an interval (45.12 counted once, 90.24 counted separately) or insufficient-evidence. With a distinct-claim declaration (two separate assignments of 40% each) the method counts the tranches separately (90.24); the resolver reports the declaration as claimed, and as confirmed only once an account that controls the underlying of the covered positions has endorsed the declaration's relationId on the declaring version.",
      "cases": [
        {
          "case": "silent",
          "definition": "examples/revenue-holdings-silent.json (no underlying on the token position; the assignment under a URL, with an underlying that names the fee stream under another URI; no declaration)",
          "expected": "unresolved pair, no overlap candidate; receipts examples/revenue-holdings-silent.valuation.net-equity.interval.json (45.12 to 90.24) and examples/revenue-holdings-silent.valuation.net-equity.insufficient-evidence.json; a point-valued receipt is reported as non-conforming"
        },
        {
          "case": "declared distinct",
          "definition": "examples/revenue-holdings-distinct.json (same underlying, distinct-claim set with the two agreements as basis)",
          "expected": "pair resolved as distinct (claimed); receipt examples/revenue-holdings-distinct.valuation.net-equity.json monetary 90.24 with treatment distinct and basis"
        },
        {
          "case": "evaluator-side evidence",
          "definition": "examples/revenue-holdings-silent.json",
          "expected": "a monetary receipt whose inputs.overlaps states treatment distinct with a basis for the pair is accepted; the pair stays unresolved at the definition level and is still reported"
        },
        {
          "case": "confirmation binds to the relation",
          "definition": "examples/revenue-holdings-distinct.json (relationId of its distinct-claim declaration listed in examples.json)",
          "expected": "a description-endorsement whose subject is the relationId, on version 1 of Unit 13, by the Definition Controller of Unit 1 (the underlying of both tranches) makes the declaration confirmed; an endorsement of the token position alone (on Unit 8 or on Unit 13), an endorsement of the relationId on another version, or one by an account that controls no covered position leaves it claimed; with different obligors (Unit 1), a pair is confirmed only when an account for each side has endorsed the declaration"
        }
      ],
      "test": "tools/test/resolve-claims.test.js"
    },
    {
      "name": "interval-over-liabilities",
      "rule": "The bounds of an interval forced by unresolved pairs are the minimum and maximum of the method's result over the admissible resolutions (each unresolved pair read as one claim or two, consistent with the declarations and with transitivity), never \"counted once\" for low and \"counted separately\" for high: for two liabilities the once reading is the upper bound. A held position and an owed position are never one claim, so a mixed boundary with one unresolved pair on each side has bounds that are the sums of the per-pair extremes. low MUST NOT exceed high; a resolver that can recompute the bounds from the receipt's inputs reports an interval that differs.",
      "cases": [
        {
          "case": "two debts, one obligor, two references",
          "definition": "examples/hosting-payables.json (no declaration)",
          "expected": "net equity interval [-200.00, -100.00] (examples/hosting-payables.valuation.net-equity.interval.json) or insufficient-evidence; [-100.00, -200.00] is rejected by the validator and the resolver"
        },
        {
          "case": "mixed boundary",
          "definition": "examples/revenue-and-payables-mixed.json (held revenue pair of vector 9, owed debt pair, no declaration)",
          "expected": "two unresolved pairs, four cross-side pairs distinct by construction; interval [-154.88, -9.76] = [45.12 - 200.00, 90.24 - 100.00] (examples/revenue-and-payables-mixed.valuation.net-equity.interval.json); an interval such as [-154.88, -54.88] is reported as differing from the extremes over the 4 admissible resolutions"
        },
        {
          "case": "chained pairs",
          "definition": "three debts A, B, C with A and C declared distinct and A?B, B?C unresolved",
          "expected": "admissible resolutions {A}{B}{C}, {AB}{C}, {A}{BC} -> [-300, -200]; {ABC} and {AC}{B} are not admissible"
        }
      ],
      "test": "tools/test/resolve-intervals.test.js"
    }
  ]
}
