# Making Duplicate Reimbursement Unrepresentable: A Verified Ethereum E-Invoice System for Humans and AI Agents

Crypto.world

> Electronic invoices are files that can be printed or forwarded indefinitely, so the same invoice can be submitted for reimbursement at two employers, or twice at one employer through different…

**arXiv**: 2609.37819

**Published**: 2026-09-29

**Authors**: Jia Cai

## AI summary

## Overview

**Research area:** Blockchain systems and applied cryptography — specifically smart-contract design for tax/electronic-invoice administration (cs.CR), with a secondary thread on safety guarantees for autonomous AI agents operating on-chain.

**Technical level:** Advanced. The paper combines a guarded labeled transition system formalism, cryptographic security proofs (second-preimage resistance, EUF-CMA, consensus safety), and Solidity-level machine checking, alongside a full implementation and gas benchmarks. Readers without a formal-methods or smart-contract background will find Sections IV and VII dense, though the architectural argument in Sections I, V and VI is accessible.

**Scope (one sentence):** The paper designs, formally verifies, implements and benchmarks an Ethereum smart-contract e-invoice system in which each invoice is a non-tradable token, so that duplicate reimbursement is structurally unrepresentable rather than merely detectable — and shows the same guarantees extend to LLM-based reimbursement agents.

## What This Paper Is About

Electronic invoices are files that can be printed or forwarded indefinitely, so the same invoice can be submitted for reimbursement at two employers, or twice at one employer through different channels; today finance departments defend against this with manually maintained registers that do not work across organizations. At the same time, recipients cannot easily check authenticity, and all invoice data converges on a central tax-authority platform that is both a performance bottleneck and a single point of failure.

The paper's goal is to move the invoice lifecycle — from blank-invoice distribution, through issuance, red-flush correction, verification, tax declaration, to reimbursement — onto an Ethereum smart contract, so that the rules themselves enforce correctness rather than relying on a trusted operator or manual bookkeeping.

## Key Contributions

1. **A complete five-subsystem architecture derived from stakeholder requirements.** The authors analyze the needs of the tax bureau, seller, buyer and third-party verifier, and derive subsystems for (1) application and distribution, (2) issuance and circulation, (3) void and red-flush, (4) query and verification, and (5) declaration and reimbursement.
2. **A formal model of the invoice lifecycle.** The contract is modeled as a guarded labeled transition system over an explicit global state, with a six-state lifecycle automaton (None, Blank, Issued, Locked, Reimbursed, Reversed) and a table of transition rules transcribed directly from the contract's `require` clauses and state writes.
3. **Security proofs that are also machine-checked.** Theorems establishing reimbursement uniqueness, reimbursement authorization, face integrity from the keccak256 digest, and red-flush value conservation are proved by hand and independently encoded as `assert` statements and discharged by the Solidity SMTChecker's constrained-Horn-clause engine, which proves them inductively over all reachable transaction sequences.
4. **An open-source implementation, benchmark suite, and agentic case study.** A single 487-line Solidity 0.8.24 contract, a four-role React/ethers.js web application, a 23-case Hardhat test suite, and a hybrid deterministic/LLM reimbursement agent plus a ledger-audit agent, demonstrating that agent safety follows as a corollary of the proved theorems.

## Main Findings

- **Reimbursement uniqueness holds even across mutually distrusting organizations.** Theorem 1 shows `reimburse(·, n)` occurs at most once per invoice in any execution; Corollary 1 extends this to any number of distinct organizations or accounts, because the guarantee is a property of the single shared status slot rather than per-organization bookkeeping. In a race, the first `lock` sets the state to Locked and every later `lock` reverts.
- **The lock protocol makes duplication unrepresentable, not just detectable.** A two-phase protocol (`lockForReimbursement` → `reimburse`, with `unlockReimbursement` as the failure-recovery path) binds the invoice to a claim-document id, giving auditors a direct on-chain join between invoices and expense claims.
- **Face integrity reduces to second-preimage resistance.** Theorem 3: if an adversary produces a face that verifies yet differs from the recorded one, it has computed a second preimage of keccak256. Verification therefore requires no trust in the seller, buyer, or any central platform.
- **Red-flush correction conserves value.** Theorem 4: after a successful red-flush, the signed values of original and credit note sum to zero, the original is permanently Reversed, and the credit note is frozen — it can never be reimbursed or further red-flushed.
- **Machine checking succeeded with no counterexamples.** SMTChecker reported "CHC: 5 verification condition(s) proved safe!", covering reimbursement uniqueness, reimbursement authorization, the impossibility of reimbursing a credit or reversed invoice, and red-flush value conservation and monotonicity. As a non-vacuity check, weakening the `reimburse` guard to accept an already-Reimbursed invoice produced a concrete counterexample trace (lock, reimburse, reimburse).
- **Gas costs are modest and constant-time.** Issuing an invoice costs 646,773 gas; the complete reimbursement protocol costs under 135,000 gas; every core operation is O(1) in the number of invoices.
- **Throughput measured on a single development node was 137 invoice issuances per second.** Latency and throughput are explicitly framed as contract-execution bounds of a single-node configuration, with consensus overhead to be added in a real network. Detailed latency figures beyond the setup description are not reported in the provided content.
- **All 23 functional tests pass,** including adversarial cases: unregistered accounts cannot apply, mint, issue or receive; non-holders cannot issue or lock; non-sellers cannot declare or red-flush; a reimbursed invoice cannot be locked, reimbursed again, or red-flushed; a forged face fails digest verification.
- **Agent safety is a corollary, not an add-on.** Because an LLM-based agent operating a registered account is, from the contract's perspective, indistinguishable from any other key holder, it is exactly the adversary of the threat model. In the end-to-end case study, every unsafe agent action — duplicate, over-limit, or forged-receipt claims, even with the agent's own policy layer bypassed — was rejected, ultimately by the contract itself.

## Methodology in Plain English

The authors start from a requirements analysis: who touches an invoice, at what point, and what each party needs to be able to do and verify. From that they derive five subsystems covering the whole lifecycle.

They then model the contract as a state machine. Each invoice has a status, and each operation is a "guarded command" — a set of preconditions that must all hold, plus a defined state update. If any precondition fails, the transaction reverts and nothing changes. This representation maps one-to-one onto the actual `require` statements and storage writes in the Solidity code, so the model and the implementation are the same object viewed two ways.

Security is argued under an explicit threat model: the adversary holds the private keys of any set of registered enterprise accounts and may submit arbitrary transactions in any order, but cannot forge signatures, break keccak256, or violate consensus safety. The tax bureau is trusted only for admitting enterprises and supplying blank invoices — not for invoice state, which the contract and consensus enforce. Against this adversary, four properties are proved by hand.

To avoid the hand proofs being a single point of trust, the state-machine invariants are re-encoded as `assert` statements in a Solidity model (abstracting only face strings and hashing) and discharged by the SMTChecker, which reasons inductively over all reachable transaction sequences rather than testing sample scenarios. A deliberately weakened guard is used to confirm the checker is not passing vacuously.

Finally, the system is built and measured: a single contract, a four-role web front end that holds no authoritative state, a 23-case test suite, and gas/throughput benchmarks on a private network. The agent layer is then placed on top and shown to inherit the contract's guarantees.

## Why This Matters

**Impact on research.** The paper is a worked example of "make the invalid unrepresentable" applied to a concrete administrative workflow, and it demonstrates a practical pattern: transcribe guards from code into a formal model, prove properties by hand, then re-discharge the same properties with an automated checker. It also positions autonomous agents not as a new attack surface requiring new defenses, but as an instance of an already-modeled adversary — a framing that could simplify how agentic-blockchain systems are analyzed.

**Real-world applications:**

- **Corporate expense reimbursement:** replacing manually maintained registers of already-reimbursed invoice numbers with a shared on-chain state that no single employer's bookkeeping can override.
- **Cross-border and intra-EU VAT compliance:** the paper notes the EU's "VAT in the Digital Age" package, adopted March 2025, mandates structured e-invoicing for intra-EU B2B transactions by 2030, with projected fraud reductions of up to €11 billion per year.
- **Tax-authority infrastructure:** shifting from a centralized platform provisioned for peak nationwide load (China has run a nationwide VAT e-invoice system since 2015) to a consortium ledger where the bureau admits participants but does not own invoice state.
- **Audit, banking and litigation:** third-party verifiers reconstruct an invoice's full history from indexed events and confirm authenticity from a content digest, without interacting with seller or buyer.

**Industry relevance.** The gas figures (646,773 to issue; under 135,000 for the full reimbursement protocol) and the O(1) complexity mean the design is economically plausible at enterprise scale. The authors argue a consortium deployment with PBFT-style consensus is the natural fit for identified, permissioned participants, while the contract layer remains consensus-agnostic. The explicit decision to omit any public transfer function — invoices are legal documents, not tradable assets — contrasts deliberately with industry work that tokenizes invoices as tradable ERC-721 assets for invoice financing, where tradability is the point and double-financing is the analogous hazard.

## Future Directions

- **Off-chain concerns are explicitly out of scope.** The guarantees cover on-chain state only; fictitious underlying sales, private-key theft, and storage-layer confidentiality are named as outside the proven properties, leaving open how to bind an on-chain invoice to a real commercial transaction.
- **Consensus overhead and multi-node performance remain unmeasured.** Throughput and latency figures come from a single development node and are framed as contract-execution bounds; real consortium deployments with PBFT-class consensus would need separate evaluation.
- **Legal and organizational adoption questions.** The design makes the bureau the sole admitting authority and assumes an enterprise registry writable only by it; how such a registry maps onto existing national tax infrastructures and liability regimes is not addressed.
- **Generalizing the agent-safety corollary.** The case study uses one reimbursement agent and one ledger-audit agent, with the claim that prompt-injection-induced behavior is covered by the threat model; broader empirical testing of agents under adversarial prompting against the deployed contract would strengthen that claim.

## Target Audience

Researchers and practitioners in blockchain systems, applied cryptography, and formal verification of smart contracts; engineers building enterprise or consortium DLT applications in tax, finance, and supply-chain document management; and teams deploying autonomous agents that transact on-chain, who need a template for arguing that agent misbehavior is bounded by contract-level guarantees rather than by the agent's own policy layer. Regulators and tax-authority technologists evaluating alternatives to centralized e-invoice platforms will find the requirements analysis and the comparison table useful, though the formal sections assume a verification background.

## Authors’ abstract

Electronic invoices are replacing paper invoices worldwide, but today's centralized architectures leave three problems unsolved on the consumption side: an invoice can be submitted for reimbursement repeatedly, authenticity is difficult for recipients to verify, and data is siloed at a central authority that forms both a performance bottleneck and a single point of failure. This paper presents the design, formal analysis, and implementation of a complete blockchain-based…

[The full abstract on arXiv](https://arxiv.org/abs/2609.37819)

[Read the original paper](https://arxiv.org/abs/2609.37819)

---

Canonical: https://crypto.world/paper/making-duplicate-reimbursement-unrepresentable-a-verified-ethereum-e-2609.37819
