Could an AI agent run somewhere nobody can tamper with it? Not even its creators?
No server. No kill switch. Nothing to trust but consensus itself.
We spent months finding out. In one sentence: we measured, down to the metered instruction, what it costs to run an LLM inside a blockchain's consensus, pushed the software to the floor of that cost model, and got bit-identical outputs across three independent execution environments.
Here's the story, and what it opens.
Why inside consensus?
Every other way of putting AI on-chain asks you to trust something: a server (oracles), a hardware vendor (TEEs), a prover pipeline (zkML), a challenge window (optimistic rollups). We wanted the model's forward pass itself to be a consensus fact. One production network lets you measure that at useful sizes today: The Internet Computer (@dfinity), with deterministic WebAssembly and a hard budget of 40 billion instructions per call.
The wall
On-chain inference wasn't new: @onicaiHQ got llama.cpp running inside a canister first, proving an LLM could live inside deterministic consensus at all. The state of the art stood at 10 tokens per call on a 0.5B model, a number that read like a platform ceiling.
We saw an anomaly instead. Nothing about the hardware explains that number.
The dig
We profiled everything. 98.7% of the cost sits in one place: matrix multiplication. So we rebuilt that path: SIMD vectorization of the quantized inner loops.
Same weights. Same mainnet canister. Same budget.
10 → 29 tokens per call. Not a single transistor changed.
Then the pattern generalized. Decode cost collapses into one line: tok/call ≈ B / (α_eff × 2P), where B is the instruction budget, P the parameter count, and α_eff the metered instructions your kernel spends per weight operation. Calibrated on 11 models across 8 architectures, it predicts architectures it has never seen to within ~8%.
And it has a floor. Ternary weights (-1/0/+1, no multiplications) on a custom WASM kernel land at α_eff = 1.03. Our isolated kernel already benches 0.82.
≈4 → 1.4 → 1.03 → still going.
The moment
Same prompts. A local replica, the 13-node Swiss subnet, a standard ICP mainnet subnet. Two engine builds, two independent weight conversions, three months apart.
Byte-identical outputs. Empty diff.
Thirteen machines re-executed an entire neural network and agreed on every single bit. The model's output stopped being somebody's claim. It became a consensus fact.
What this opens
An agent whose *mind* runs inside the same consensus that secures the money.
Its cost: predictable from a model card. A DAO can budget years of its thinking before deploying it.
Its compute: hard-capped per action by the protocol. It cannot exceed its mandate.
Its outputs: facts that no host, no developer, no government can falsify.
Its life: it can hold assets, execute policy, and outlive the company that made it.
That's the destination, not a claim. What exists today are the primitives: predictable cost, enforced budgets, provable determinism. Measured, published, reproducible.
And what stands in the way is just as real: sub-1B model quality is THE open problem. Our failures are in the artifact too, including a ternary model that ran fast and produced garbage.
Next paper (drafted): instruction-bounded autonomy. An agent whose every action is metered, budgeted, and consensus-verified.
Check us
Paper: https://t.co/tnMc6IgHoc
Artifact: https://t.co/PDg5E6J03C
Co-author /@ORIGYNTech
Dfinity Forum: https://t.co/1rqE0jrZDu
Beat our numbers. That's what the artifact is for.
Massive for ICP: AI running inside consensus can now improve at software speed.
Congrats @MeotisResearch their open research enabled @icpp_pro to ship ~2.8× higher mainnet throughput in <48h.
Research → production. This is how ICP compounds. 🔥
https://t.co/Azq9kdF9yT
@icpp_pro Really proud our research helped unlock this. Shipping a ~2.8× mainnet gain in under 48 hours is incredible. Huge respect for moving so fast and thank you for the attribution on the README. Lets connect 🤝
2.8x throughput increase for on-chain LLM inference on #ICP with llama_cpp_canister v0.12.0
https://t.co/LiVckWrTy5
For details and references to foundational research by the ICP community see https://t.co/SmKLr6ldKF