Commercial Agreement Settlement Technology

Both parties sign the payment before money moves.

CAST is a bilateral coordination protocol. Before any commercial payment settles, payer and counterparty co-author one cryptographically bound record. That record is the authorization — and it travels through your ERP, audit, lenders, and insurers as tamper-evident proof.

POST /v1/work-orders/wo_8fa2/confirm
# Vendor confirms via passkey — the bilateral pivot
{
  "event":        "bilateral.confirmed",
  "work_order":   "wo_8fa2c1",
  "payload_hash": "3a9f…e21b",
  "signature": {
    "method": "webauthn-p256",
    "bound_to": "payload_hash",
    "signer": "agent_riverdale"
  },
  "policy_version": "POL-v4.2",
  "lineage_hash": "7c0d…b48a"
}
→ Posting blocked until signature verifies.
→ Posting carries lineage to this event. Forever.
The unilateral model costs
$2.9B
Annual U.S. BEC losses
3 days → 30 min
Reconciliation, post-deployment
1 of 2
Parties confirm terms today
0
Proofs the output is real
The root cause

Every commercial payment today is authorized unilaterally.

The payer approves an invoice internally. The vendor learns of the transaction only when — or if — money arrives. Digital tools removed checks, branches, and paper, but left the trust model untouched. A payment process where only one of two parties confirms terms before value moves is not bilateral authorization. It is a unilateral instruction with hope attached.

The bilateral loop

One party proposes. Both parties confirm. Policy governs what happens next.

The AP instantiation — Confirm & Pay — walks one invoice through the loop. Steps 1–5 are the entire prototype. The cryptographic chain is the product; the screens are its packaging.

01 · PROPOSE

Invoice arrives

Trigger conditions evaluate. First payment, bank change, threshold breach. A Proposed Event is written with policy version pinned.

writes events · proposed
02 · SEND

Trade Message sent

Counterparty receives a browser link: amount, date, bank last 4, three buttons. No app. No account. State advances to sent → viewed.

appends events · transition
03 · CONFIRM

Counterparty signs

A passkey assertion is verified and bound to the Work Order hash. The Bilateral Event is written. Lineage hash computed from the prior chain.

The pivot
writes events · bilateral
04 · POST

Policy clears, posting derives

Seven auto-approve conditions evaluate against the pinned policy. The Posting is generated as a derived output — with a non-nullable FK to the bilateral event.

writes postings · lineage-bound
Five primitives

Everything else is a projection of these five objects.

Append-only by construction. A Posting cannot exist without a bilateral co-authorship. This is enforced at the database layer — not by the UI.

primitive.event

Event

An immutable record of something that happened. Proposed events are unilateral; bilateral events are co-authored by both parties.

Constraint: Append-only. No updates. No deletes. Ever.
primitive.policy

Policy Version

A versioned, immutable rule set. Pinned to every event at processing time. Governs triggers, auto-approve conditions, and escalation.

Constraint: No retroactive modification. Prior events stay pinned.
primitive.work_order

Work Order

The execution context for human and agent decisions. Three parallel state tracks: Bilateral, Control, Settlement — never collapsed.

Constraint: Every internal decision is an immutable record.
primitive.posting

Posting

A journal-ready ledger entry, generated as the output of a completed Work Order. Carries full lineage back to the originating event.

Constraint: Non-nullable FK to the bilateral event.
primitive.case

Case

A governed exception — dispute, non-response, budget breach, policy gap. Appends resolution events; never unwrites prior ones.

Constraint: The record of the exception is permanent.
lineage()

The proof is the asset

event → work order decisions → policy version → posting. Verification cost drops to near zero because checking a hash is structurally cheaper than reconstructing a decision chain.

The subscription fee is the cost of producing it.
Attack surface

Unilateral fraud becomes structurally impossible.

CAST eliminates the class of fraud that depends on one party acting without the other's knowledge. Collusion isn't eliminated — but it becomes documented and detectable rather than invisible.

  • Email is not the confirmation channel. Owning the inbox does not produce a bilateral event — the passkey device does.
  • Bank change is a hard-coded trigger. Not policy-configurable. Confirmation required via passkey.
  • No verbal instruction has a pathway in. Payment requires a bilateral event. No exceptions.
  • Rush payments increase scrutiny. Override needs dual approval and a constrained reason code.
Attack vector
Before
After
Fake invoice — external
Undefended
Eliminated
BEC — bank-change fraud
Undefended
Eliminated
Compromised vendor email
Undefended
Eliminated
Verbal social engineering
Fully effective
Eliminated
Duplicate invoice
Partially caught
Structural
Rush-payment bypass
Common failure
No path
Interactive walk-through

One signed chain, three lenses.

Follow a single transaction — PO-2026-0142, Acme buying $47,000 of textiles from Riverdale — from issue to confirmation to independently replayable proof. Scroll through the buyer's books, the seller's mirror, and the verifier's evidence surface. Toggle dev notes for the v1.4 API and control-plane internals.

Buyer view · outbound PO lifecycle

What your team issues. What your books record.

Logged in as M. Chen · Acme Apparel · 20 April 2026

Every PO you send is tracked from draft, to vendor acceptance, to the accrual that hits your GL — supported by evidence your auditor can pull up in seconds. Your workflow unchanged, your controls strengthened.

01Outbound · Issue
Your outbound POs — issued, tracked, sealed.

Every PO your team issues flows through this board. The system stamps each PO the moment it's authorized — quantity, price, delivery date, terms — and watches for the vendor's confirmation. Nothing hits the GL until it's back.

Outbound Purchase Orders+ New PO
PO #VendorIssuedAmountState
PO-2026-0142Riverdale Textiles Ltd.20 Apr · 14:02$47,000.00Sent, awaiting
PO-2026-0141Pacific Packaging Inc.19 Apr · 11:30$8,250.00Confirmed
PO-2026-0140Kestrel Hardware Co.18 Apr · 09:15$14,800.00Posted to GL
PO-2026-0139Meridian Dye Works17 Apr · 16:40$23,100.00Draft
dev · buyer scene 01
Primary route
GET /v1/control-items?track=outbound
New PO flow
POST /v1/events → canonicalize → hash → Work Order draft
Row state
projected from control_item_view.bilateral_status
v1.4 · Compiled Control Plane: the board is control_item_view, a refreshable projection over Work Orders — not a source of truth. last_actor_mode and accountable_owner render per row.
02Outbound · Awaiting
Awaiting the vendor's confirmation. Your team's part is done.

The PO is sealed and sent. Until the vendor accepts, nothing moves on your GL. You can resend, edit, or cancel — but once they confirm, the accrual is supported and posting begins automatically.

Awaiting vendor confirmation · PO-2026-0142
Sent to Riverdale Textiles Ltd.
J. Okafor received the confirmation link 12 minutes ago. Average confirmation time for this vendor: 3 h 40 m over the last six POs.
Issued
14:02 UTC
Sent & waiting
14:04 UTC
Vendor confirms
Resend linkEdit & reissueCancel PO
dev · buyer scene 02
Route
GET /v1/control-items/{id} (SSE for sig arrival)
State check
no row in event_signatures → "awaiting" UI
Cancel path
invalidates token; no events row created
v1.4 · Decision view: allowed actions (resend / edit / cancel) come from decision_view with reason codes — not hardcoded in the UI.
03Outbound · Posted
The accrual posts — supported by a confirmed PO.

Riverdale's confirmation came in at 14:32. The system immediately posted the accrual: a debit to raw-materials inventory and a credit to your vendor payable. Every line traces back to PO-2026-0142.

Acme · General Ledger · AccrualJE-2026-04-0618
Accrual · PO-2026-0142 (Riverdale Textiles)
Posted 20 April 2026 14:32 UTC · Supported by vendor-confirmed PO
Dr/CrAccountDebitCreditSupport
Dracme.inventory.raw_materialsOrganic cotton + French terry inbound$47,000.00PO-0142
Cracme.vendor_payable.riverdaleNet-30 obligation$47,000.00PO-0142
● Posted to GL● Vendor-confirmedSupport: PO-2026-0142
What this accrual is supported by
Confirmed by Riverdale Textiles at 14:32 UTC today, using a verified device registered to J. Okafor. Full acceptance record retained for the life of the audit trail.
Your audit trail, end-to-end.

Month-end close, lender reporting, board pack — same five documents, always.

dev · buyer scene 03
Trigger
postings_require_signed_event
Txn
event + sig + postings in one commit
Invariant
NN2 + NN3 enforced at DB layer
v1.4 · Seven invariants: Posting→Bilateral FK, Bilateral→Confirmed WO, lineage chain integrity, single active policy, settlement requires approved control, hard-coded triggers non-suppressible, events append-only.
Seller view · inbound PO lifecycle

What your customers send. What your AR records.

Logged in as J. Okafor · Riverdale Textiles · 20 April 2026

When a buyer's PO arrives, you review the terms, confirm them, and your AR accrues against a document both sides agreed to in writing. A cleaner inbox and a better set of receivables.

01Inbound · Received
Your inbound POs — one waiting on you.

When a customer sends you a PO, you receive one link. You review the exact terms, then confirm. Your confirmation is the bell that makes the sale real — and the evidence your AR team, your auditor, and your customer's bank can all rely on.

Inbound Purchase Orders1 action · 2 confirmed · 8 YTD
From: Acme Apparel Co. · M. Chen · today 14:02
PO-2026-0142 — Supply agreement, spring production run
$47,000.00 · Net-30 · Delivery 15 Jun 2026
From: Beacon Outfitters · T. Alvarez · 18 Apr 09:10
PO-2026-BO-088 — Heavyweight fleece, Q2 draw
$31,200.00 · Net-45 · Confirmed 18 Apr 11:22
From: Northstar Uniforms · K. Lee · 15 Apr 15:30
PO-2026-NS-212 — Cotton twill, spring restock
$18,750.00 · Net-30 · Posted against 16 Apr shipment
dev · seller scene 01
Route
GET /v1/control-items — filtered by counterparty_agent_id
Action item
PO-0142 has no event_signatures row → confirm enabled
v1 delivery
email/SMS confirmation URL; channel from vendor signer record
v1.4 · Actor attribution: the confirm action records performed_by_mode = counterparty; the Work Order's accountable_owner_id stays an internal human.
02Inbound · Confirm
Please review and confirm. Your acceptance seals the agreement.

Confirming binds you, on behalf of Riverdale Textiles, to exactly these terms — and only these. If the buyer later changes any field, your acceptance no longer applies.

Confirmation requestedRef: cnf_8f3k9p
Confirm PO-2026-0142 from Acme Apparel Co.
Supply agreement, spring production run
Confirming on behalf of Riverdale Textiles Ltd. · J. Okafor, authorized rep
PO number
PO-2026-0142
Buyer
Acme Apparel Co.
Total amount
$47,000.00
Terms
Net-30
Delivery date
15 June 2026
Inspection window
5 business days
Your acceptance will be sealed against a fingerprint of every field above. If the buyer changes any field — one dollar, one yard, one day — the fingerprint won't match, and your acceptance no longer applies.
dev · seller scene 02
Begin
POST /confirm/:token/begin
Finish
POST /confirm/:token/finish — challenge = payload_hash
Atomic txn
verify sig → insert events + event_signatures → consume token
Guards (NN5)
reject fmt='none'; reject UV=false
v1.4 · Actor attribution: signature insert sets performed_by_mode = counterparty, performed_by_role = vendor signer; review_required is policy-driven.
03Inbound · Posted
The receivable posts — same event, mirror entry.

The moment you confirmed, your AR team saw the receivable post. Same bilateral event as Acme's accrual — your mirror image of the same agreement, on your side of the ledger.

Riverdale · General Ledger · ReceivableJE-2026-04-0391
Receivable · PO-2026-0142 (Acme Apparel)
Posted 20 April 2026 14:32 UTC · Supported by customer-confirmed PO
Dr/CrAccountDebitCreditSupport
Drriverdale.ar.acmeNet-30 receivable from Acme Apparel$47,000.00PO-0142
Crriverdale.revenue.deferredSpring production run · delivery 15 Jun$47,000.00PO-0142
● Posted to GL● You confirmed · 14:32 UTCCustomer: Acme Apparel
What this receivable is supported by
Your own confirmation of PO-2026-0142, made by J. Okafor at 14:32 UTC using a device registered to Riverdale. When your bank or auditor asks why this receivable exists, the answer is this PO.
Your AR, supported to the bank's satisfaction.

Every open receivable traces to a customer-confirmed PO. Cleaner aging, fewer disputes, stronger credit package.

dev · seller scene 03
Mirror entries
seller-side postings ×2: Dr AR, Cr Revenue — same event_id
Architectural point
one bilateral event authorizes postings on both sides — same FK, used twice
v1.4: both postings project into each tenant's state_snapshot_view — current vs. expected value, unexplained variance surfaced automatically.
Verifier view · evidence, independently replayable

What any third party can independently reconstruct.

Credentials: External Auditor · read-only · 20 April 2026

Given only the database rows, the committed source code, and a standard cryptographic library, any external party can reproduce the signed content byte-for-byte, verify the signature, and walk the attestation chain back to a manufacturer certificate authority.

01Document · Sealed
The sealed document — exhibit A.

This is the purchase order as sealed evidence. A verifier in 2031 can recompute this fingerprint from the raw JSON and the pinned source code, and confirm the bytes have not changed.

Sealed evidencepayload_version 1
PO-2026-0142 · Supply agreement, spring production run
Issued by agt_cea5831f9712 · recorded 20 Apr 2026 14:02:11 UTC
Buyer
Acme Apparel Co. (agt_cea5831f9712)
Seller
Riverdale Textiles Ltd. (agt_2815bf2d3c4e)
Total obligation
$47,000.00 USD
Terms
Net-30, delivery 15 June 2026, 5-day inspection
Document fingerprint
0xa7c3e9f24b81d6a0f5e7c29b4d18a6f3e0c7b5d2a4f9e1c8b6d3a5f7e9c1b4d8
Canonicalizer
lib/canonicalize.ts @ v1.0.0 · sha256:44a9626a…85b6b81f2
What a verifier can prove from this record alone
Given the JSON payload and the pinned canonicalizer source, the fingerprint is byte-reproducible. Any change to any field — one dollar, one yard, one day — produces a different fingerprint and invalidates any signature referencing it.
dev · verifier scene 01
Source rows
events + schema_registry
Replay steps
1. checkout repo at canonicalizer_tag · 2. shasum, compare · 3. run hashPayloadV1 · 4. compare
No trust required
steps need no access to Acme, Riverdale, or CAST
v1.4 · Actor attribution: the issuing event carries actor_mode, actor_role, authority_context and accountable_owner_id — all replayable from the same row.
02Signature · Forensic
The signature record — exhibit B.

Every byte a verifier needs to prove, independently, that Riverdale Textiles agreed to PO-2026-0142's exact terms at a specific moment, using a hardware-attested credential registered to them.

Signature record● Replay valid
Signer
agt_2815bf2d3c4e (Riverdale Textiles)
Role
counterparty
Signed at
20 April 2026, 14:32:07.428 UTC
Attestation
packed · verified
User verification
TRUE · required
Algorithm
ES256 (ECDSA-P256-SHA256)
Signature (DER)
0x3045022100e8b4f2a7c9d15e3b8a6f4c2d9e7b1a5f3c8d6e2a4b9f7c5d1e8a3b6f4c2d902201a7f…
Bound payload
0xa7c3e9f24b81d6a0f5e7c29b4d18a6f3e0c7b5d2a4f9e1c8b6d3a5f7e9c1b4d8 (= PO-2026-0142)
dev · verifier scene 02
Source rows
event_signatures + webauthn_credentials + agents
Replay
recompute sha256(authData ‖ sha256(clientDataJSON)) → ECDSA-verify → confirm challenge = payload_hash
No libraries
SHA-256, ECDSA, X.509 — all standard
v1.4: the signature row joins history_view as a counterparty action — ordered alongside human, agent, and system actions for full attribution replay.
03Chain · Replay
The chain, end-to-end — fully replayable.

Given nothing but the database rows and the committed canonicalizer source, any verifier can walk this chain in five steps, with standard cryptographic primitives and no access to either counterparty or the platform operator.

What a 2031 verifier reconstructs — from raw bytes.

No trust required. No account at Acme, Riverdale, or CAST. Just SHA-256, ECDSA, and X.509.

What this chain underwrites

Why the verifier view matters, commercially.

For an auditor — every GL posting has cryptographic support that cannot have been fabricated after the fact. Support documentation is produced automatically, not reconstructed at year-end.

For a lender — a receivable on a borrower's balance sheet can be verified against a counterparty-confirmed PO, with hardware-attested identity. Borrowing-base diligence becomes a query, not a request.

For an insurer — the event chain is an underwritable fact pattern. Loss prevention, dispute defense, and fraud investigation all rest on the same rows.

dev · verifier scene 03
Source
all five tables + schema_registry
Primitives
SHA-256, ECDSA-P256, X.509 — no proprietary verifier
What Layer 2 sells
hosted replay API: pass/fail per event_id + tamper-evident timestamp
v1.4 · Control-plane endpoints: GET /v1/control-items/{id}/timeline, /invariants, /history expose the replay surface; POST /evaluate recompiles invariant results. Projections are replayable, never the source of truth.
Vertical-agnostic by design

AP proves the architecture. Every other vertical is configuration.

The four layers don't change between use cases. Only event types, policy rules, and Work Order structures do. CAST sits alongside your ERP — not in place of it — and produces posting-ready exports with the lineage hash in the memo field.

  • GPU compute financing — instrumentation co-authorship
  • Institutional grants — milestone confirmation as bilateral event
  • Intercompany transfers — shared event eliminates month-end recon
  • PO & trade finance — advance rate improves on a verified asset
verify.ts — independent replay
// Any third party, no counterparty contact
const ok = await replay(eventId);

// Standard libs only — no proprietary verifier
- SHA256(canonicalize(payload, v1))
- ECDSA-P256 signature check
- X.509 chain validation

return {
  valid: ok,
  proves: "both parties confirmed",
  at: "signed timestamp",
  unmodified_since: true
};

The proof is produced once, at transaction time.

It travels with the payment through every downstream system. That's what makes a transaction insurable, financeable, and survivable in audit.