Main
/
List
/
Categories
/
Tags
A closer look at inference programs (Actually Smart Contracts): a jury of six AI nodes in a hexagon around an amber core, connected by a beam to one highlighted block, labeled intent 7c3a, in a chain of blocks

A Closer Look at Inference Programs (Actually Smart Contracts)

Smart contracts store code, and code on chain only gets worse with age. Inference programs store the intention instead, and let verifiable AI carry it out. Here is what they are, how one runs end to end, how precedent keeps them cheap, and why the economics may be closer than you think.

13 min read
November 14, 2026

Smart contracts were a real breakthrough. For the first time, two parties could agree on a rule, write it as code, put it on a public chain and know that nobody could quietly change it. A decade of decentralized finance was built on that one idea.

But the idea carries a cost that grows over time. A smart contract is frozen at the understanding its authors had on the day they deployed it. Every exploit class discovered later applies to it. Every real-world situation its authors did not anticipate is either unhandled or handled wrongly. Upgrading it is a governance fight and a new attack surface. Code on chain is nothing more than tech debt and security debt that only rots and gets worse over time.

Meanwhile, something changed outside crypto. Models can now read a statement of intent and a body of evidence and rule on it well enough to be checked by other models. Proofs can show which model produced an answer. Models are getting smaller, cheaper and easier to compress every quarter.

Put those together and a different design becomes possible. We call it an inference program, and it is the idea behind Actually Smart Contracts. This post is a closer look at what an inference program is, how one runs end to end, why precedent is central to it, and whether the economics can work.

The short version: store intentions only. Encrypt them. Compress them. Never code. Then put the engineering effort where it belongs, into proving the off-chain AI can be trusted.

Intelligence is the ultimate form of compression

An intention fits in a paragraph. The code that tries to express the same intention runs to thousands of lines, and it is still less expressive, because it can only check what its authors managed to encode.

Storing the intention and letting a model expand it when it is called inverts that tradeoff. The stored artifact is small and stable. The expansion improves every time the models do. That is the property smart contracts can never have: inference programs improve and get more secure over time.

What an inference program is

This is our working definition. It is not finished, but this is the direction.

What is an inference program? Eight properties: immutable, amendable, verifiable, contextual, interpretable, generative, cached, agentic

  • Immutable intention. The intention is fixed when the program is written.
  • Amendable. A program may allow amendments, under rules stated in advance.
  • Verifiable. Every run carries proof of which AI ruled on it, checkable after the fact.
  • Contextual. A program can be fed detailed factual data that the AI uses in reaching its outcome. Sources can change and be updated, and that can change the decision over time.
  • Interpretable. The exact logic may be fuzzy, and may vary each time the program is called.
  • Generative. There is no fixed logic. New logic is generated as it is needed.
  • Cached. Interpretations can be cached for speed. If carrying out one intention takes 10,000 lines of generated code, that code can be kept as precedent instead of being rewritten on every call, and regenerated as models improve or the need arises.
  • Agentic. A program can spawn autonomous agents and processes: web searches, tool calls, sub-tasks.

Smart contracts and inference programs, side by side

Smart contractsInference programs
On chainCodeIntentions only, encrypted and compressed
LogicFixed at deployGenerated as needed, cached as precedent
Checked byThe VMVerifiably neutral external AI models
Over timeRots into tech and security debtImproves and gets more secure as AI improves
InputsOracles and price feedsReal-world evidence and updated sources
Can enforceToken transfersAgreements, constitutions, certifications, insurance, policy
The hard partAuditing every line of codeProving the off-chain AI can be trusted

The last row is the whole shift. With smart contracts, the security problem is the code. With inference programs, the security problem is the judge, and that is the problem Verafy has been working on from the start: juries of models from different labs, bonded jurors, prompt filtering, and proofs.

The round trip: how an inference program runs

An inference program has two halves. It is stored once, and it runs every time it is called.

Store once

  1. Write the intention. The program states its intent, goals and objectives, its run rules and guidelines, its guardrails and governance policies, and the context it should use to interpret all of that.
  2. Compile and store. A compiler cleans up and simplifies the program, compresses it, optionally encrypts it, and fingerprints it, so the same intention always has the same id. The compiled intention and its fingerprint go on chain. Solana works; so does any other chain.

Run on every call

  1. An agent calls it. Any agent or program can trigger the inference program by its fingerprint.
  2. Prompt Guard screens the input. Before any model reads the request, Prompt Guard checks it for anything hostile, or anything that would interfere with how the program is meant to work. In the Verafy harness, context is evidence: nothing in the juror path follows instructions found in it.
  3. Atomize and pack. The request is broken into atoms, the smallest independently checkable questions, and packed into a block that one or more AIs interpret, depending on the type of program. The reason is cost: the more inference requests are stacked into less space, the fewer proofs are needed to show which AI produced each response.
  4. The jury rules. A single AI or a jury rules, depending on the program, with each run provable after the fact.
  5. The proof is returned and checked. The proof is validated, and a hash of it goes on chain to show the check was performed by the jury.
  6. The precedent is kept. Depending on the program, the AI returns line by line reasoning: which sources it used and why it decided as it did. That justification is the precedent. It is stored in the harness ledger, which could work the way Solana handles its accounts database and snapshots: sharded and compressed across many AI validators. It exists so anyone can check the ruling after the fact.

That is the full round trip. The intention stays fixed. The reasoning is kept.

Precedent: cached judgement

The legal concept of precedent is critical to inference programs.

A court does not reason from first principles every time a familiar dispute walks in. It finds the closest earlier ruling and applies it, unless something has changed enough to justify hearing the question again. That is precedent, and it is exactly what an AI network needs.

Precedent is cached judgement. Stored intelligence. Rather than re-analyzing a complex ruling from scratch and burning tokens, the network can rely on a cached analog.

Here is how it works:

  • Pre-characterize. A fast decision-making model, such as Jev from TypeSafe AI, which already does the cheap first pass in the Verafy Bias Detector, classifies each incoming query in advance and looks for an analog in the precedent cache.
  • Cache read. If a fresh precedent matches, the ruling comes straight back from the cache. No jury convenes, and almost no tokens are spent.
  • Rotten precedent. If the closest precedent is too old, it is readjudicated: a new jury convenes and rules again. A precedent should also count as rotten when a source it relied on has changed, or when the program it interpreted has been amended.
  • Forced readjudication. A caller who needs a fresh ruling can attach an additional fee to force a new jury to convene, even when a fresh precedent exists. The fee pays for the jury, so cached answers stay cheap for everyone else.
  • Supersede, never overwrite. A new ruling becomes a new precedent that supersedes the old one. The old one is kept, so the record of what the network decided, and why, is never lost.

Every ruling becomes precedent, and precedent answers the next query. In this way, a huge share of incoming queries never needs to reach a jury at all. We have not measured that share yet; the first build will.

The economics: can this beat a smart contract?

This is the biggest question for inference programs, and we want to be direct about it. Can an inference program be made cost effective and provable compared with a smart contract on Ethereum or Solana? A smart contract call is cheap, deterministic and verifiable by anyone. An AI ruling has to compete with that on cost, reliability and verifiability.

Two years ago, the honest answer would have been no. Several things have moved in our favor since.

Can an inference program beat a smart contract on cost? Six data points on model compression, smaller models and falling inference prices

Models compress, and keep their judgement

In September 2026, PrismML released Ternary Bonsai 2 27B, a compressed version of Alibaba's Qwen3.8 27B. It shrinks the model from about 54 GB to 5.9 GB, roughly nine times smaller, and keeps 98.2% of the original's benchmark average. It runs on a laptop. These are the company's own figures and have not yet been independently verified, but the comparison they publish is telling: the field's usual 2-bit method, applied to the same model, falls to 84.1%. (vendor-reported)

That is one result among many, and it suggests that much faster, much cheaper models are very possible.

Smaller models are catching up

  • In 2022, the smallest model to score above 60% on the MMLU benchmark was Google's PaLM, with 540 billion parameters. By 2024, Microsoft's Phi-3-mini reached the same threshold with 3.8 billion. That is a 142-fold reduction in two years. (measured, Stanford AI Index 2025)
  • Meta's Llama 3.2 1B scores 49.3 on MMLU. GPT-3, with 175 billion parameters, scored 43.9. A 1B model now beats the model that started the modern era. (measured)
  • The best open models that fit on a single consumer GPU match the capabilities of frontier models within six to twelve months. (measured, Epoch AI)

Andrej Karpathy has gone further. On the Dwarkesh Podcast he argued that most of a frontier model's size is memory work, not cognitive work, and said: "I almost feel like we can get cognitive cores that are very good at even like a billion parameters." That is a prediction, not a result, and he framed it on a long horizon. But every trend above points the same way.

For a jury, this is the part that matters. A juror does not need to know everything. It needs to read an intention and the evidence, and rule. That is cognitive work, not memory work, and cognitive work is exactly what keeps getting smaller.

Answers are getting cheaper, fast

  • The cost of querying a model at GPT-3.5's level on MMLU fell from $20 per million tokens in November 2022 to $0.07 by October 2024, more than 280 times cheaper in about 18 months. (measured, Stanford AI Index 2025)
  • Across tasks, the price of reaching a fixed level of performance has fallen by between 9 and 900 times a year, depending on the task. (measured, Epoch AI)

One caution

Price per token is not price per ruling. Reasoning models produce far more tokens per task than older models, and a jury of five reasoning models can spend much of what cheaper tokens save. That is why precedent and proof packing matter so much to Verafy's economics: both reduce the number of full rulings anyone has to pay for.

What would change everything

If these trends continue, networks of AI observers that can rapidly interpret and decompress stored intentions on chain, and check each other's work, may become highly economical compared with traditional smart contracts. They could even outperform Ethereum and other networks on cost, reliability and verifiability.

That would be a shocking outcome. It would mean that storing the gist of a program, which can be unfolded into a full smart contract whenever it is needed, is faster and cheaper than running the contract itself. Whether that is possible remains to be seen. The number that settles it is the cost of one jury ruling, head to head with the same logic run as an Ethereum or Solana contract call, on the same task. We have not measured it yet. It is the benchmark we are building toward.

The bigger picture

If inference programs work, they open a dramatic new era of expressiveness. Smart contracts can enforce what code can express, which in practice means moving tokens. Inference programs can enforce what a careful reader can understand.

The blockchain stops being a computer and becomes something closer to a court: the collective conscience of AI, and a neutral third party judicial and legal branch that can check and enforce real agreements, real constitutions, real legal certifications, insurance documents and policy documents.

And as AI improves, the ability to expand stored intentions securely accelerates. That is the core asymmetry. Smart contracts get worse with age. Inference programs get better.

Where this stands

This is direction, not a shipped product, and we want to be clear about which parts exist.

  • Built in the Verafy harness: juries drawn from multiple model providers, Prompt Guard, atomization and proof packing, a multi-model router with a calibrated fast screen, and storage of proof hashes. The Encoder already puts policies and contracts on Solana in full.
  • Specified, not built: precedent, written up as VIP-0042, Precedent v1, with its open questions: how old is too old, what counts as a close enough analog, how the readjudication fee is priced, and how encrypted intentions are read by a jury without leaking.
  • Not yet chosen: the proof system for verifiable inference, and the design of the harness ledger.
  • Not yet measured: precedent hit rates, and the head-to-head cost against Ethereum and Solana.

We will publish each of those numbers as we get them, including the ones that don't go our way.

Sources

RSJRex St John
Forward-Looking Statements Notice: Verafy blog articles may contain forward-looking statements regarding Verafy’s future plans, technologies, and market positioning and opinions on possible future achievements. These statements are based on current expectations, predicated on attaining future goals, forecasts, and assumptions that involve risks and uncertainties. Actual outcomes and results may differ materially from those expressed or implied in these statements due to factors such as evolving market conditions, technological challenges, regulatory developments, and other risks beyond Verafy's control. Readers are cautioned not to place undue reliance on forward-looking statements. Verafy undertakes no obligation to update or revise such opinions as a result of later or new information, future events, or otherwise.