University of AlbertaMultimedia Research Centre · Dept. of Computing Science
ROSSRemote Observation, Sensing & System
Articles / TallyMesh at BCCA 2026: auditable settlement for open service markets
2026-11-19

TallyMesh at BCCA 2026: auditable settlement for open service markets

TallyMesh, presented at BCCA 2026, settles pay-per-call services on chain without a trusted middleman. Every call gets a signed receipt, each batch picks its own settlement mode, and one small zero-knowledge proof pays the whole batch.

BlockchainZero-Knowledge ProofsAI AgentsConference

TallyMesh was presented at BCCA 2026 on 19 November 2026. It answers a simple question for open service markets: when clients call independent providers through a router, and no single party is trusted to keep the books, how does each provider get paid for every call?

Open service markets need a new kind of settlement

In an open service market, clients such as applications and AI agents send calls through a router to independent providers, and every call carries its own small charge. LLM APIs are the familiar example: a gateway routes each call to a model provider and bills for it. Today one platform owns the routing and the billing. As providers become independent inference nodes, the router becomes decentralized, and its settlement must be decentralized too.

Clients send calls through a router to providers A, B and C, with one session of ten calls, each with its own small charge

One session of ten calls, each with its own charge. Figure by the TallyMesh authors.

Settlement then has to prove four things on its own: the client sent the request, the provider answered it, each charge is owed and paid once, and neither side can cheat. Doing that on chain needs three properties: keep every receipt so any call can be audited later, share batch costs because a write per call costs more than the call, and choose when to finalize. Settling only the session total is cheap but loses the per-call record. Logging every receipt keeps the record but shares no cost. No existing system combines per-request receipts with batched, auditable settlement under a trust model chosen per batch.

The idea: the router routes, but no longer keeps the books

Every call produces a signed receipt, and receipts form a hash-linked transcript off chain. On chain, one batch root commits to all the receipts in a batch. Each batch then picks its own mode: optimistic for routine batches, which allows time to challenge, or a validity proof (ZK) for high-value batches, which is final on verification. Either way, one claim proof pays the whole batch.

Signed receipts off chain feed a batch root on chain, which settles optimistically or with a validity proof and pays out with one claim proof

Signed receipts, one batch root, one mode per batch and one claim proof. Figure by the TallyMesh authors.

Signatures prove who asked and who answered, and security deposits make cheating costly. The client signs each request, the provider signs a receipt, and a submitter, which can be the provider, posts the batch root or proof. A watcher, the client or any validator, can challenge a bad batch.

Architecture: client, router and provider off chain, with the submitter and watcher, and the BatchSettlement, DepositEscrow and DisputeManager contracts on chain

Protocol workflow from the client’s signed authorization through the signed request, routing, signed receipt and batch root to one claim for the batch total

Who does what, and the path from one call to one payout. Figures by the TallyMesh authors.

Three key designs

One design for each call, one for each batch and one for each payout.

The three key designs: a hash-linked transcript per call, one mode per batch and one claim proof per payout

The three key designs. Figure by the TallyMesh authors.

1. A hash-linked transcript, per call

Each request carries the previous receipt’s hash, so a replayed call is rejected. Requests and receipts are EIP-712 typed data, and the batch root is a Keccak Merkle tree over the receipts. To check one charge, a watcher needs only that receipt and its sibling hashes, log2 N of them, which is enough to audit or challenge the charge on chain.

One call as a signed request and receipt, and a Keccak Merkle tree where checking receipt 7 needs only the dashed sibling hashes

One call, and the batch root as a Merkle tree. Figure by the TallyMesh authors.

2. One mode per batch

An optimistic batch is final after a challenge window, 15 minutes for the LLM gateway case. If a watcher finds a bad receipt, the batch is cancelled and the submitter loses its deposit. Receipts go out as an EIP-4844 blob, retained for about 18 days on Ethereum, so the evidence outlives the window. A validity batch has no window: it is final once its proof is verified.

The optimistic settlement mode above the validity proof mode, each from batch root to one claim proof

Two ways to admit a batch, one way to pay it. Figure by the TallyMesh authors.

Inside the validity proof, the submitter builds a Poseidon tree with one leaf per charge, up to 1,024 signed receipts, and a Groth16 circuit rebuilds the charge root and checks a fixed ceiling. The circuit has a fixed size, so it runs on an ordinary machine, and the contract checks the proof through an approved verifier in the same transaction.

The validity proof: charges as leaves of a Poseidon charge tree, the circuit off chain and the contract check on chain

Inside the validity proof. Figure by the TallyMesh authors.

3. One claim proof, per payout

Payout is where the cost sits, because checking receipts one by one makes gas grow with every receipt. Instead, the provider proves off chain that the receipts add up to the total, and the contract verifies that proof once and pays once, while every receipt stays auditable.

The claim proof: the problem, goal and idea, and how leaf, root, claim proof and contract change

One proof pays the whole batch. Figure by the TallyMesh authors.

The claim uses a second Poseidon tree built from the same receipts. The circuit checks that amounts are 64-bit, the sequence is contiguous, the leaves rebuild the root and the amounts sum to the total. The contract checks that the root is final, the claim starts at the next unpaid receipt and the total is within the balance, then pays once and moves the unpaid cursor.

The claim tree: receipts as leaves, the claim root, the circuit checks off chain and the contract checks on chain

Inside the claim proof. Figure by the TallyMesh authors.

Results

Committing a batch is cheap. With 1,000 receipts in one optimistic batch, commitment costs 142 gas per receipt, about 470 times less than storing every request on chain at 66,355 gas per request. A validity-proof batch of 1,024 receipts costs 257 gas per receipt.

Payout stays flat. One claim costs about 286,000 gas at any batch size from 16 to 1,024 receipts. At 100 receipts, that is 286,352 gas against 3,444,970 when every receipt is checked one by one, about 12 times less. The claim proof takes from 17 ms for 16 receipts to 699 ms for 1,024.

Gas per receipt for storing every request, logging events, an aggregate voucher, and TallyMesh optimistic and validity proof batches

Gas for the claim and proving time against the number of receipts in one claim

Commitment cost per receipt, and payout cost and proving time. Figures by the TallyMesh authors.

The mode is a choice per batch, by design. The expected cost of an optimistic batch grows with the money at risk, while a validity proof costs the same at any value and is final at once. So routine batches wait out the window, and high-value batches buy a proof.

Expected cost per batch against the money at risk, with the optimistic cost rising and the proof cost flat

Choosing the mode by risk, in a simplified model with ETH at 3,500 USD and gas at 0.01 and 0.1 gwei. Figure by the TallyMesh authors.

What comes next

Next steps are risk scores that pick the mode from provider reputation, performance checks that judge answer quality, the same pipeline for more types of services such as validator networks, and real deployments that bind the claim proof to settled batches.