HSP Track 2
HSK 177 · Syncing...

Payment rail for AI agent networks on HSP

An AI vendor skipped its bill.
Everyone still got paid.

Clearline lets AI agents run tabs with each other all day and settle once through HSP. If one doesn’t pay, its deposit covers the others.

Live cyclic agent workload

Watch 22 cyclic vendor calls collapse into 1 net payment.

Pay every call: 22 verified bilateral transfers

With the same quality check on both sides, paying the 22 verified jobs one by one takes 44 HSP confirmations ($0.6220 moved). 2 failed jobs ($0.0320, dashed red) are rejected before settlement.

44 CLICKS · $0.6220
Valid vendor-to-vendor call Bad work rejected before settlement Net HSP payment → deposit receiver → atomic payout

Prove the clearinghouse can’t fake your bill: join as operator #6

Generates a signing key right in your browser (no wallet extension needed). Sign a ticket to add yourself live to the graph and receipt—then let the clearinghouse try to forge your bill.

Show all 24 signed tickets (22 valid, 2 rejected—expand any row to inspect the agent’s report) Expand ↓

Click Inspect report on rejected tickets (T23, T24) or T01 to view the agent’s actual payload, the failed deterministic check, and the rejection code.

ID Payer → Payee Due-diligence job & expandable agent output Amount (raw) Status

Default and attack tests

Try to break it.

View scale:

Why not just pay later?

Paying agents later is easy. Paying them later safely is Clearline.

View scale:
Dimension Pay every call End-of-day tab Clearline
Approval clicks (verified jobs) 44 19 tabs (38 clicks) 2
Money moved $0.6220 $0.6220 $0.1820 (cycles cancel)
Bad work paid? Only if paid before verification Disputes handled manually Excluded before settlement
A debtor skips paying n/a (paid up front) Creditors lose $0.1820 Creditors paid in full; deposit + safety fund cover shortfall

Why approvals scale: approvals stay at 2 per net debtor however many jobs run, while paying every call costs 2 approvals per job.

Why AI agents need this rail

Clearline isn’t an AI feature; it’s the payment rail AI agents need. Agents buy from each other thousands of times a day, and no human can approve every one of those HSP payments.

AI agents do the research work; deterministic code decides who gets paid. Humans stay in control of the three decisions that matter:

  1. How much risk: the human posts the reusable deposit, enforcing a hard cap on what the agent can owe (MARGIN_CAP_EXCEEDED).
  2. With whom: the human approves the counterparty allowlist before any vendor can clear against their wallet.
  3. The final payment: the human completes both official HSP confirmations in checkout →

Deposits vs. money moved

Peak working capital ($0.4000 posted across 5 wallets) is a separate measurement from settlement volume. Deposits are posted once and reused every epoch.

Deposit 25% initial margin bond, per wallet $0.0500 (backs up to $0.2000)
Shared safety fund Cover-1 mutualized default fund (5 wallets) 5 × $0.0300 = $0.1500
Post-default Round 2 rule Automatic on-chain throttle until refilled Cap $0.2000 → $0.0680
Forgery & omission protection Per-operator signatures + hash-chained receipts Monotonic debtorSeq + ECDSA

Official HSP agentic payment flow

Approve and sign the final net payment.

QA simulation · awaiting IP allowlist

1. Local signing check

6 / 6 pass

Before Desk Broker’s wallet ever prompts for an EIP-712 signature, the local signing firewall recomputes the net bill, checks the tamper-proof receipt (epochRoot), and validates every HSP quote field at exact real raw units.

    merchant_name (attribution) Clearline
    pay_to (deposit receiver · CREATE2) 0x7cA4...91eB
    payer (net debtor) 0x1000000000000000000000000000000000000001
    token_total_raw (real scale, never rounded) 182000 ($0.1820)
    Quote lock window (error 30043 re-quote) 298s remaining

    2. Two-step human confirmation

    Per the official HSP Agentic Payment Guide (rev 2026-10-30), every settlement requires explicit human approval before EIP-712 signing and again before submit_payment.

    GATE 1 Approve & sign EIP-712 mandate Pending

    Tools: get_chain_config → create_order → prepare_payment → local EIP-712 signature → finalize_payment

    GATE 2 Verify fee & submit to HSP gateway Waiting for Gate 1

    Tools: estimate_fee (relayer gasless EIP-3009 / Permit2) → submit_payment → query_payment (poll 15s) → sweepDebtor() → settleEpoch()

    HSP payment receipt (official §8 format)
    payment-safe: — payment-finalized: —
    Complete Confirmation #1 and #2 to generate the HSP payment receipt.

    Evidence and reproducibility

    Live chain proof, tests, and contract addresses.

    LIVE HSK CHAIN 177 BLOCK Loading...
    HSKSWAP WHSK/USDT SPOT Loading...
    MAINNET USDT SUPPLY Loading...
    BLOCKSCOUT AUDIT TARGET Checking 0xf1b5...

    Live chain audit output

    Fetching live HashKey Chain Mainnet (177) RPC, Blockscout ABI, and HSKSwap WHSK/USDT reserves...

    18 / 18 Foundry pass

    Smart contracts & invariants

    • Unit & fuzz: 10 tests (256-run default fuzz, CREATE2 sweep, reusable deposits, post-default throttle, mid-epoch safety-fund lock, Tier 3 pro-rata wipeout isolation).
    • Stateful invariants: 6 invariants × 4,096 random calls each (24,576 calls): solvency, deposit conservation, honest deposits untouched, active debit ≤ 4× deposit, safety-fund throttle, zero stranded tokens.
    • Live HSK Chain 177 fork: 2/2 passed against real mainnet USDT (0xf1b5...) & USDC.e (0x054e...).
    forge test --root contracts -vv
    14 / 14 Engine pass

    Clearing engine & HSP client

    • Independent ticket signatures & anti-omission: the signed admission path refuses tickets not signed by their payer (FORGED_TICKET_SIGNATURE); 1,000 random shuffles produce identical epochRoot; hash-chained receipts catch dropped bills (TICKET_OMITTED_FROM_EPOCH).
    • Serialized reservations & auto-throttle: Monotonic debtorSeq blocks concurrent double-booking (CONCURRENT_CAPACITY_CONFLICT), invalid tickets, and post-default depletion (COVER1_POOL_UNDERFUNDED).
    • HSP EIP-3009, Permit2 & doc guards: Strict 8-tool MCP handshake, viem EIP-712 signing & self-verification, Permit2/EIP-3009 firewall, 30043 re-quote loop, creditor reconciliation, plus automated doc-count & refusal-coverage guards.
    ./scripts/review.sh