whitepaperv1.0
Tare: An Optimizing Build for Anchor Programs, Proven by Differential ExecutionGross, tare and net compute for every instruction, and an on-chain registry of the evidence

Abstract
Tare is an optimizing build tool for Solana programs written in Anchor and a public on-chain registry of what it built. It compiles an unchanged Anchor workspace twice, once with stock Anchor and once with a second implementation of the Anchor language substituted at the dependency level, and then rewrites the linked sBPF bytecode. Every instruction receives three weights in compute units: gross (the stock build), net (the Tare build) and tare (their difference). The two builds are shown to behave identically by executing them side by side on a local SVM over a corpus of transactions, drawn from the program's own tests, from sequences generated from its IDL and from samples of its mainnet traffic, and comparing account bytes, lamports, account metadata, logs, return data and errors after every transaction. The result is published as a record in a registry program on Solana mainnet, from which anyone can rebuild both binaries and rerun the comparison. Over a corpus of 189 open-source Anchor programs, 1,187 measured instructions fall from 6,295,676 to 4,459,739 compute units and binaries from 38,786,032 to 30,970,216 bytes, with 257,892 transactions matched and none diverging.
- Authors
- Tare
- Version
- 1.0
- Date
- 22 November 2026 (UTC)
- Length
- 43 pages, PDF, 388.8 KB
Contents
- 1Introduction1
- 2Background3
- 3The Three Weights5
- 4System Overview8
- 5The Build9
- 6The Front Stage: A Second Implementation of the Anchor Language12
- 7The Bytecode Stage16
- 8The Differential Proof20
- 9The Registry24
- 10Weighing Deployed Programs27
- 11Evaluation29
- 12Related Work33
- 13The Road35
- 14Conclusion35
- AAppendix: Registry Reference39
- BAppendix: Constructs Exercised by the Corpus40
- CAppendix: Benchmark Results by Program41
Cite it
@misc{tare2026,
title = {Tare: An Optimizing Build for Anchor Programs, Proven by Differential Execution: Gross, tare and net compute for every instruction, and an on-chain registry of the evidence},
author = {Tare},
year = {2026},
note = {Version 1.0},
url = {https://tare.cx/paper/tare-whitepaper.pdf}
}