AssayAssay · Verifiable covenant workflow

Covenant review,
with receipts.

AI-assisted covenant monitoring for credit teams. The model interprets. Code calculates. Cryptography proves. A human approves.

  • Deterministic
  • TEE-attested
  • ZK-proven
  • Human-approved

Synthetic borrower records only. Invite-only staff access for analysts, credit managers, and auditors.

BOR-018 · Run #1 · Attested & Approved
ATTESTATION VERIFIED
Assay analysis run detail page showing verified NEAR AI Intel TDX and NVIDIA NRAS attestation, confirmed financial inputs, and approved compliance status

Baseline leverage

3.07x ≤ 3.50x

ZK predicate

Signals 1 · 35000

Audit chain

Ed25519 VALID

End-to-end covenant pipeline

01 Upload → 02 Redact → 03 Extract → 04 Calculate → 05 Prove → 06 Approve → 07 Audit

  1. 01

    Upload

    PDF or UTF-8 text validated and sealed with AES-256-GCM before storage.

  2. 02

    Redact

    Reduced-profile Presidio tokenizes identifiers; an analyst confirms every page.

  3. 03

    Extract

    NEAR AI Cloud extracts terms with fresh Intel TDX and NVIDIA NRAS attestation.

  4. 04

    Calculate

    Decimal.js and an independent BigInt verifier compute baseline and stress ratios.

  5. 05

    Prove

    Fixed Groth16 circuit proves the leverage inequality without exposing raw figures.

  6. 06

    Approve

    A credit manager reviews the restricted summary and records one row-locked decision.

  7. 07

    Audit

    Every event is SHA-256 hash-chained and Ed25519-signed per borrower.

The status quo

Covenant review is still manual.

Every quarter, credit teams pull leverage covenants out of hundred-page agreements, copy figures into ad-hoc models, and route approvals over chat and email. Pasting a credit agreement into a generic chatbot is worse: it leaks borrower data, hallucinates arithmetic, and leaves nothing an auditor can verify.

01

Fragmented process

The agreement lives in a PDF, the figures live in a spreadsheet, and the decision lives in an email thread. Nothing binds the final ratio back to the exact covenant clause or the attested financial inputs.

02

Inconsistent interpretation

Two analysts can read the same Adjusted EBITDA definition and permitted add-back caps differently. Unchecked model summaries blur definitions instead of enforcing source-quoted terms.

03

No audit trail

When a compliance decision is questioned weeks later, there is no machine-readable record of how the terms were extracted, how caps were applied, or which snapshot the manager approved.

No deterministic engine. No proof. No tamper-evident record.

The Assay architecture

One workflow. Every step verifiable.

Assay composes local PII redaction, TEE-attested extraction, deterministic integer arithmetic, zero-knowledge compliance proofs, and an Ed25519-signed audit chain into a single state machine. Each stage produces a cryptographic or deterministic artifact before the next stage can unlock.

Deterministic calculation

Integer minor-unit arithmetic and permitted add-back caps run in deterministic application code with an independent BigInt reference verifier — never inside a language model.

TEE-attested inference

Sensitive extraction routes only redacted text to NEAR AI Cloud and verifies fresh Intel TDX and NVIDIA NRAS evidence, nonce binding, and the ECDSA response signature on every call.

ZK compliance proof

A fixed Circom Groth16 circuit proves that total debt and adjusted EBITDA satisfy the confirmed threshold so a manager can verify compliance without seeing the borrower's raw figures.

Step-by-step execution

Six moves. No hand-waving.

Every state transition is enforced server-side in Fastify and Neon Postgres. No step can be skipped, and every artifact is bound to the exact snapshot version.

01Step 01AES-256-GCM · HKDF HMAC

Upload: encrypted before storage

Assay checks magic bytes, 10 MiB size and 40-page limits, rejects scanned or password-protected PDFs, and encrypts the document under a per-borrower AES-256-GCM data key before writing ciphertext to private storage.

Runtime state artifact
Validation
PDF/TXT magic bytes · ≤ 10 MiB · ≤ 40 pages · text layer required
Key hierarchy
Per-borrower DEK wrapped by server-held KEK
Object store
Ciphertext only · private S3-compatible bucket
02Step 02REDUCED_PII_MODE · MANDATORY GATE

Redact: Presidio + analyst review before any model call

Presidio runs in a deliberately reduced profile with custom financial recognizers. The analyst inspects and confirms the tokenized pages before any external inference request can be queued.

Runtime state artifact
Tokenized spans
[ORGANIZATION_8F12A9C0] · [ASSAY_REFERENCE_44C1E8B2] · [ASSAY_ACCOUNT_9D02F11A]
Preserved clause
Section 7.01 Maximum Consolidated Total Debt to Consolidated Adjusted EBITDA ≤ 3.50 to 1.00
Token map
Sealed under borrower DEK · never leaves backend storage
03Step 03TDX UpToDate · NRAS true

Extract: NEAR AI TEE-attested inference on tokenized text

NEAR AI Cloud extracts one maximum leverage covenant with verbatim page quotes. Assay verifies Intel TDX and NVIDIA NRAS attestation bound to a fresh 32-byte nonce, then gates routing through SERV Reasoning.

Runtime state artifact
Model & gate
z-ai/glm-5.3-flash (verifiable + attestationSupported) · SERV branch SUPPORTED_CLEAR
Evidence check
6 verbatim quotes matched character-for-character against parsed pages
Failure policy
Missing or invalid attestation aborts extraction and leaves a visible FAILED state
04Step 04DECIMAL.JS + BIGINT VERIFIED

Calculate: deterministic engine + independent BigInt verifier

Analyst-attested figures are sealed in minor units. Decimal.js computes baseline leverage and two sensitivity scenarios (-10% EBITDA, +10% Debt), while an independent BigInt evaluator verifies every number.

Runtime state artifact
Baseline ratio
3.0660x (3.07x display) vs ≤ 3.50x threshold · COMPLIANT · headroom 12.40%
Stress scenarios
EBITDA -10%: 3.4067x (COMPLIANT) · Debt +10%: 3.3726x (COMPLIANT)
SERV coherence
Structured non-identifying check CONFIRMED before proof stage unlocks
05Step 05CIRCOM GROTH16 · LEVERAGE-V1

Prove: Groth16 proof of the covenant predicate

A one-shot worker generates a Groth16 proof over the fixed leverage-v1 circuit (`debt * 10000 <= adjustedEbitda * thresholdBps`). The private witness is passed over stdin and never persisted to disk.

Runtime state artifact
Public signals
["1", "35000"] — compliant outcome (1) bound to 35,000 bps (3.50x) threshold
Verification key
f0314fb2c221bf88c8c0204ef51962721b54f448e9183e36667c92a4981690fb
Server check
Verified at generation and re-verified from storage inside the approval transaction
06Step 06MAKER-CHECKER · ED25519 SIGNED

Approve: maker-checker, row-locked, proof-bound, with a signed audit event

The credit manager sees only the restricted summary, scenario bands, and proof status. Approving locks the analysis row, re-verifies the stored proof, enforces stress-breach acknowledgement, and appends an Ed25519-signed audit event.

Runtime state artifact
Role boundary
Raw debt, EBITDA, borrower alias, agreement text, and token map excluded from manager DTO
Concurrency
Row-level FOR UPDATE lock + analysisVersion check prevents conflicting approvals
Audit event
ANALYSIS_APPROVED chained via SHA-256 and signed with server Ed25519 key

System guarantees

Built like infrastructure.

Designed around strict operational boundaries: typed Zod contracts, row-locked Postgres transactions, idempotent mutations, and role-shaped response DTOs.

Non-custodial calculation

The language model never calculates the ratio. Deterministic code converts inputs to integer minor units, enforces add-back caps, and cross-checks results with an independent BigInt verifier.

Audit-chain verification

Every borrower owns a sequential SHA-256 hash chain signed with Ed25519. Auditors verify the entire chain and every signature without decrypting sealed payloads.

Crypto-shredding

Deleting a borrower's wrapped DEK renders its encrypted documents, financial snapshots, and sealed audit payloads unreadable through the key store while keeping the hash chain verifiable.

Role-scoped views

Analysts inspect source evidence and financial figures; credit managers see only threshold, compliance status, proof state, and stress bands; auditors verify cryptographic provenance.

Maker-checker approval

Self-approval is blocked, stressed breaches require explicit risk acknowledgement and rationale, and row-level locking ensures concurrent manager requests cannot race.

Reppo feedback loop

Analyst corrections can be submitted as de-identified, field-level traces after a 50 KB preflight check for independent multi-evaluator scoring on Reppo.

Five defense-in-depth privacy layers

The model interprets. Code calculates. Cryptography proves. A human approves.

Sensitive inference is routed to NEAR AI Cloud's TEE-attested gateway. Each request can be verified against Intel TDX and NVIDIA NRAS attestation evidence. OpenRouter receives only structured, already-extracted data for SERV judgement and generation — never raw documents or token maps.

  • Layer 01

    Redaction before any model sees the document

    Documents are parsed locally and tokenized by a reduced-model Presidio service (`REDUCED_PII_MODE`) plus deterministic financial recognizers. Mandatory analyst review blocks any model call until redaction is confirmed.

  • Layer 02

    TEE-attested inference for sensitive extraction

    Sensitive inference is routed to NEAR AI Cloud's TEE-attested gateway. Each request is verified against fresh Intel TDX and NVIDIA NRAS attestation evidence bound to a client nonce and a signed response.

  • Layer 03

    ZK proof of compliance without exposing the numbers

    The Groth16 proof proves that the private witness satisfies the fixed leverage inequality for the confirmed threshold. It allows manager verification without exposing raw debt or EBITDA.

  • Layer 04

    Encrypted, hash-chained, crypto-shreddable audit trail

    Sensitive payloads are sealed under a per-borrower AES-256-GCM key while canonical envelope metadata and ciphertext digests are chained with SHA-256 and signed with Ed25519.

  • Layer 05

    Human approval that cannot be bypassed

    No model or external evaluator can approve a covenant, override a baseline breach, or alter policy. A human manager records the decision against a server-verified proof and immutable snapshot version.

Verifiable stack

Built on.

Every external provider sits behind a strict adapter and health boundary. Provider failures surface visibly and are never masked with fabricated receipts.

SERV Reasoning

LIVE

Workflow orchestration and audit — gates extraction routing and confirms post-calculation scenario coherence.

NEAR AI

LIVE · ATTESTED

TEE-attested confidential inference — runs covenant extraction with per-request Intel TDX and NVIDIA NRAS verification.

Reppo

LIVE · 98/100

Independent evaluation of corrections — scores de-identified field-level feedback traces without raw borrower data.

Arc Mainnet x402

LIVE · 0.05 USDC

One verified LoneStar Oracle payment on Arc Mainnet — standard x402 exact, USDC EIP-3009, deterministic policy, provider receipt and onchain authorizationState. The separate Arc Testnet/Circle Gateway adapter is preserved.

SEC EDGAR

IMPLEMENTED · HOST 403

Free public XBRL provider — source-linked parsing, period validation, content hash and private-borrower limits are implemented; SEC returned HTTP 403 from both tested egresses, so no live result is claimed.

Neon

LIVE

Postgres, auth, object storage — canonical relational store, `FOR UPDATE SKIP LOCKED` job queue, managed Better Auth, and private ciphertext storage.

Buyer & auditor FAQ

Questions.

Direct answers on scope, cryptographic boundaries, provider failure handling, and how to test the deployed workspace.

Ready to inspect a live run?

Use the invited synthetic analyst, credit manager, or auditor credentials on the sign-in page to walk the full workflow.

Go to /login
Is this a production credit system?

No. Assay is a synthetic-data MVP built for credit covenant operations around one maximum Debt / Adjusted EBITDA covenant. It uses synthetic borrower records only and is not a production credit decision system.

Does the LLM calculate the ratio?

No. Language models never perform authoritative arithmetic in Assay. Total debt, reported EBITDA, and permitted add-backs are converted to integer minor units and calculated deterministically with Decimal.js, then cross-checked by an independent BigInt reference verifier.

What does the ZK proof actually prove?

The fixed Circom Groth16 circuit proves only that the supplied private witness (total debt and adjusted EBITDA in minor units) satisfies the inequality debt * 10000 <= adjustedEbitda * thresholdBps for the public covenant threshold. It does not prove the authenticity of the source PDF or the truth of the analyst-entered figures.

What happens if the model provider is down?

The analysis run fails visibly or pauses in an explicit pending state (`ATTESTATION_FAILED`, `PROVIDER_UNAVAILABLE`, or `CALCULATED_SERV_PENDING`). Assay never fabricates a provider response, attestation report, Reppo verdict, or payment receipt.

Can I try it?

Yes. Sign in at /login using the invited synthetic workspace accounts provided for evaluation: analyst@assay.test, manager@assay.test, or auditor@assay.test. Public sign-up is disabled at the auth service.

How does the Arc payment integration work?

Assay completed one real 0.05 USDC LoneStar Oracle purchase on Arc Mainnet using standard x402 exact and USDC EIP-3009. The transaction, provider receipt, authorization state, retrieved Apple fundamentals and VALID audit chain are recorded in the repository. The provider's actual 402 requirement is still evaluated by a deterministic policy that checks provider, exact endpoint, network, asset, recipient, per-payment cap, aggregate budget, expiry, idempotency and duplicate nonce. A rejection never reaches execution. A timeout becomes RECONCILIATION_REQUIRED and is looked up, not paid again. A separate Arc Testnet/Circle Gateway adapter is preserved; no live Testnet financial-data retrieval is claimed. SEC EDGAR is implemented but returned HTTP 403 from both tested egresses, so no live SEC result is claimed.

Why is Presidio labeled REDUCED_PII_MODE?

To run reliably within the 512 MB Render free-tier memory envelope, Assay pairs Presidio Analyzer (en_core_web_sm) with deterministic custom recognizers for borrower references, account numbers, and emails, and requires mandatory human analyst confirmation before any model call.

AssayAssay

The review is one workflow away.

Read the agreement. Confirm the terms. Verify the proof. Your authority stays yours.