Payroll: Salted Identities and Residue

A disbursement with a salted record owner and residue at both positions

The scenario

A payroll run disburses 8,642.31 USD net pay to an employee. The employer's identity and the employee's are salted; the gross-to-net computation is declared through the formula block.

How FORAY models it

The record owner (F3) is carried in its salted form — the reserved sha256: prefix followed by exactly 64 lowercase hex characters; the same digest appears as the employer party's name. The salted forms prove nothing by themselves: with the salt, the holder can demonstrate what they commit to; without it, nothing leaks from the record.

Residue appears at both of its two legal positions — the transaction's F25 (carrying a user-supplied compliance flag as a recorded assertion, and payroll-run context) and element-level F25 — and nowhere else, because nowhere else is legal.

What to observe in the record

  • F3’s two forms are exclusive: cleartext, or the reserved-prefix salted digest — never both, and no second field.
  • The allocation targets the gross-to-net Accrual directly: allocations may reference any component type.
  • The withholding inputs are named formula inputs (F19); the formula itself never appears on the wire.

Wire 4.2 record

This record is a teaching example, emitted by the FORAY generator (template residue-and-salted-owner) — not hand-written. No blockchain anchoring has occurred or is implied; anchor-related fields are placeholders. Parties, amounts, and dates are illustrative. Wire keys are catalog codes (F-codes); the readable names used in the prose above are the implementer register, which never appears in hashed bytes.

{
  "F1": "PAYROLL_2026_07_RUN_22",
  "F2": "PAYROLL_2026_07_RUN_22",
  "F3": "sha256:7d4a1c9e2f8b60539a7c1e4f0b8d2a6c5e9f3b7d1a0c8e6f4b2d0a9c7e5f3b1d",
  "F7": 8642.31,
  "F8": "USD",
  "F25": {
    "compliance_flags": [
      "SOX_404"
    ],
    "payroll_system": "run 22, semi-monthly cycle"
  },
  "F26": "payroll_disbursement",
  "schema_version": "4.2",
  "timestamp": "2026-07-24T14:05:00Z",
  "arrangements": [
    {
      "F4": "employment_agreement",
      "F5": [
        {
          "jurisdiction": "US-FL",
          "name": "sha256:7d4a1c9e2f8b60539a7c1e4f0b8d2a6c5e9f3b7d1a0c8e6f4b2d0a9c7e5f3b1d",
          "role": "Employer"
        },
        {
          "jurisdiction": "US-FL",
          "name": "hash_e0042a7c1b9f3d5e8062a4c6e8f0b2d4",
          "role": "Employee"
        }
      ],
      "F11": "2025-03-01T00:00:00Z",
      "F25": {
        "pay_basis": "salaried, semi-monthly"
      },
      "F29": [],
      "id": "ARR_EMPLOYMENT_E0042"
    }
  ],
  "accruals": [
    {
      "F4": "net_pay_computation",
      "F7": 8642.31,
      "F13": "2026-07-01T00:00:00Z",
      "F14": "2026-07-15T23:59:59Z",
      "F17": "Calculated",
      "F18": "hash_5a8c1e4f7b0d3692a5c8e1f4b7d0a3c6",
      "F19": {
        "benefits": 845.19,
        "federal_withholding": 2012.5,
        "gross": 11500,
        "state_withholding": 0
      },
      "F20": 8642.31,
      "F22": [
        "ARR_EMPLOYMENT_E0042"
      ],
      "id": "ACC_GROSS_TO_NET_E0042"
    }
  ],
  "anticipations": [],
  "actions": [
    {
      "F4": "salary_disbursement",
      "F6": "hash_e0042a7c1b9f3d5e8062a4c6e8f0b2d4",
      "F9": 8642.31,
      "F12": "2026-07-15T09:00:00Z",
      "F15": "completed",
      "F16": "direct_deposit",
      "F21": [
        {
          "amount": 8642.31,
          "currency": "USD",
          "ref": "ACC_GROSS_TO_NET_E0042",
          "ref_type": "accrual"
        }
      ],
      "F22": [
        "ARR_EMPLOYMENT_E0042"
      ],
      "F23": [
        "ACC_GROSS_TO_NET_E0042"
      ],
      "F24": [],
      "id": "ACT_NET_PAY_E0042"
    }
  ],
  "component_hashes": {
    "accruals": "sha256:PLACEHOLDER",
    "actions": "sha256:PLACEHOLDER",
    "arrangements": "sha256:PLACEHOLDER"
  },
  "merkle_root": "sha256:PLACEHOLDER",
  "blockchain_anchor": {
    "anchored_at": null,
    "block_height": null,
    "confirmation_time_ms": null,
    "kaspa_tx_id": null
  }
}

Canonical form — the hashed bytes

The canonical byte form is a single line: F-coded members in ascending numeric order, envelope members in their ruled enumeration, one legal spelling per number. The hash below is computed over exactly the bytes shown — copy the line into any SHA-256 tool to reproduce it.

{"F1":"PAYROLL_2026_07_RUN_22","F2":"PAYROLL_2026_07_RUN_22","F3":"sha256:7d4a1c9e2f8b60539a7c1e4f0b8d2a6c5e9f3b7d1a0c8e6f4b2d0a9c7e5f3b1d","F7":8642.31,"F8":"USD","F25":{"compliance_flags":["SOX_404"],"payroll_system":"run 22, semi-monthly cycle"},"F26":"payroll_disbursement","schema_version":"4.2","timestamp":"2026-07-24T14:05:00Z","arrangements":[{"F4":"employment_agreement","F5":[{"jurisdiction":"US-FL","name":"sha256:7d4a1c9e2f8b60539a7c1e4f0b8d2a6c5e9f3b7d1a0c8e6f4b2d0a9c7e5f3b1d","role":"Employer"},{"jurisdiction":"US-FL","name":"hash_e0042a7c1b9f3d5e8062a4c6e8f0b2d4","role":"Employee"}],"F11":"2025-03-01T00:00:00Z","F25":{"pay_basis":"salaried, semi-monthly"},"F29":[],"id":"ARR_EMPLOYMENT_E0042"}],"accruals":[{"F4":"net_pay_computation","F7":8642.31,"F13":"2026-07-01T00:00:00Z","F14":"2026-07-15T23:59:59Z","F17":"Calculated","F18":"hash_5a8c1e4f7b0d3692a5c8e1f4b7d0a3c6","F19":{"benefits":845.19,"federal_withholding":2012.5,"gross":11500,"state_withholding":0},"F20":8642.31,"F22":["ARR_EMPLOYMENT_E0042"],"id":"ACC_GROSS_TO_NET_E0042"}],"anticipations":[],"actions":[{"F4":"salary_disbursement","F6":"hash_e0042a7c1b9f3d5e8062a4c6e8f0b2d4","F9":8642.31,"F12":"2026-07-15T09:00:00Z","F15":"completed","F16":"direct_deposit","F21":[{"amount":8642.31,"currency":"USD","ref":"ACC_GROSS_TO_NET_E0042","ref_type":"accrual"}],"F22":["ARR_EMPLOYMENT_E0042"],"F23":["ACC_GROSS_TO_NET_E0042"],"F24":[],"id":"ACT_NET_PAY_E0042"}],"component_hashes":{"accruals":"sha256:PLACEHOLDER","actions":"sha256:PLACEHOLDER","arrangements":"sha256:PLACEHOLDER"},"merkle_root":"sha256:PLACEHOLDER","blockchain_anchor":{"anchored_at":null,"block_height":null,"confirmation_time_ms":null,"kaspa_tx_id":null}}

Canonical-bytes SHA-256: 283ca72a7673fcdaf1b8605368e3d832a55e50ebba6592edfd745e1193155cee

Validated against the live validator (POST /api/validate-foray): 0 errors, 0 warnings.