arXiv:2609.37819cs.CRSep 2026

Manuscript Offprint

arXiv:2609.37819

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

Jia Cai

Jia Cai

College of Engineering and Computing

George Mason University

Fairfax, VA, USA

jcai8@gmu.edu

Abstract—Electronic invoices are replacing paper invoices worldwide, but today's centralized e-invoice architectures leave three problems unsolved on the consumption side: an e-invoice can be printed and submitted for reimbursement repeatedly, its authenticity is hard for recipients to verify, and invoice data is siloed at a central authority that becomes both a performance bottleneck and a single point of failure. This paper presents the design, formal analysis, and implementation of a complete blockchain-based electronic invoice system on Ethereum. We give a formal model of the invoice lifecycle as a guarded labeled transition system and prove, under standard cryptographic and consensus assumptions, that the system guarantees (i) reimbursement uniqueness—an invoice can be reimbursed at most once, even across mutually distrusting organizations; (ii) face integrity—any invoice that passes verification equals the recorded one unless keccak256 second-preimage resistance is broken; and (iii) authorization soundness for every lifecycle operation. The core state-machine invariants are additionally machine-checked with the Solidity SMTChecker, which proves them inductively over all reachable transaction sequences. The design models each invoice as a non-fungible, non-tradable token whose ownership and state change only through five lifecycle subsystems, and a lock-based reimbursement protocol makes duplicate reimbursement unrepresentable rather than merely detectable. We implement the design as a Solidity 0.8 smart contract with a four-role web application and evaluate it on a private Ethereum network: issuing an invoice costs 646,773 gas, the complete reimbursement protocol costs under 135,000 gas, every core operation is O(1)O(1) in the number of invoices, and a single development node sustains 137 invoice issuances per second. Finally, we show that the verified contract doubles as a safety envelope for autonomous AI agents: an LLM-based reimbursement agent operating a registered account is exactly the adversary of our threat model, so agent safety follows as a corollary of the proved theorems, and in an 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 — is rejected, ultimately by the contract itself. The full implementation, agent runtime, test suite, and benchmarks are open source. The results indicate that lifecycle-complete, formally-grounded invoice management on a blockchain is practical and directly eliminates the duplicate-reimbursement and verification pain points of centralized designs.

I. INTRODUCTION

Invoices are the primary written evidence of commercial transactions. They anchor bookkeeping and expense reimbursement inside firms, value-added tax (VAT) collection by tax authorities, audit by regulators, and evidence in litigation. Their digitization is accelerating globally: China has operated a nationwide VAT e-invoice system since 2015 [1], and the European Union's "VAT in the Digital Age" package, adopted in March 2025, mandates structured electronic invoicing for intra-EU B2B transactions by 2030, projecting fraud reductions of up to €11 billion per year [2], [3].

Existing e-invoice systems are centralized: a tax authority (or its service provider) issues, records, and validates all invoices. This architecture digitizes the issuing side effectively but neglects the consumption side, where three pain points persist.

Duplicate reimbursement. An electronic invoice is a file that can be printed or forwarded any number of times. An employee can submit the same invoice for reimbursement at two employers, or twice at the same employer through different channels. Finance departments today defend against this with manually maintained registers of already-reimbursed invoice numbers—a process that is error-prone, unauditable, and does not work across organizations at all.

Costly verification. Paper invoices carried physical anti-forgery features; a printed e-invoice carries none. Recipients must query the authority’s central platform to verify authenticity, and in practice most do not, so forged and altered e-invoices circulate. Some firms respond by refusing e-invoices above certain amounts, undermining adoption.

Central bottleneck and data silo. All invoice data converges on the authority’s platform, which must be provisioned for peak nationwide load, becomes a single point of failure, and gives downstream users (buyers, auditors, banks, courts) no direct, tamper-evident access to invoice state.

These pain points are precisely the trust and state-sharing problems that blockchains address [4], [5]. A blockchain provides a replicated, append-only ledger whose state transitions are validated by consensus rather than by a single operator; a

Index Terms—blockchain, Ethereum, smart contract, electronic invoice, non-fungible token, formal model, autonomous agent, tax administration smart contract platform such as Ethereum [6], [7] additionally lets the invoice lifecycle itself be encoded as executable rules that no participant can bypass. If every invoice is a unique on-chain asset whose reimbursement is a one-way state transition, duplicate reimbursement is not merely detectable—it is unrepresentable.

This paper designs, formally analyzes, implements, and evaluates such a system. Concretely, we make six contributions:

  1. Requirements and architecture. We analyze the business requirements of electronic invoicing from the perspectives of the tax authority, the invoice issuer (seller), the recipient (buyer), and third-party verifiers, and derive a five-subsystem architecture covering the complete invoice lifecycle (Section V).

  2. Formal model. We formalize the system as a guarded labeled transition system over an explicit global state, with an invoice lifecycle automaton and a complete table of transition rules (Section IV).

  3. Security proofs, machine-checked. Under an explicit threat model, we prove reimbursement uniqueness, face integrity, red-flush value conservation, and authorization soundness, and mechanically verify the core state-machine invariants with the Solidity SMTChecker (Section VII).

  4. Complete implementation. We realize the design as a single auditable Solidity 0.8.24 contract that models invoices as non-fungible, non-tradable tokens, together with a four-role web application, released as open source (Sections VI–VIII).

  5. Evaluation. We evaluate functional correctness (23 unit tests spanning all subsystems), per-operation gas cost, asymptotic complexity, latency, and throughput on a private Ethereum network (Section IX).

  6. Agentic case study. We build an autonomous reimbursement agent (hybrid deterministic/LLM reasoning) and a ledger-audit agent on top of the contract, show that agent safety is a corollary of the proved theorems — the agent is a registered account, i.e., the modeled adversary — and demonstrate end-to-end that unsafe agent actions are rejected even when the agent's own policy layer is bypassed (Section X).

The rest of the paper is organized as follows. Section II surveys related work and positions our contribution. Section III gives preliminaries and the threat model. Section IV presents the formal model. Sections V–VI give the architecture and contract design; Section VII proves the security properties; Sections VIII–IX cover implementation and evaluation; Section X presents the autonomous-agent layer and its case study; Sections XI–XII discuss limitations and conclude.

References (27)