Vincent Tran

AI proposes, data decides: how unbyte decodes closed Solana programs

A language model infers the layout of programs that publish nothing, a strict validator decides what to keep, and no model ever sits on the answer path.

In short

  • The model never answers a request. It builds the registry once per program version, for about a dollar, and answers come from validated IDLs: deterministic and fast.
  • A strict validator decides what to keep: exact fit, balance checks, negative controls, held-out traffic.
  • Data picked the targets. One business metric and a query over a day of mainnet chose what to decode.

The problem

A Solana instruction is a blob of bytes; to read it you need the program’s IDL. On 2026-10-12, 28.4% of app instruction volume went through programs with no IDL and no verified source. Publishing one is no guarantee either: across the 49 busiest programs that do, only 75.9% of volume decoded cleanly with their own on-chain IDL (2026-10-14).

Outcome first, data picks the targets

unbyte has one number to move: the share of app instruction volume decoded with a verified quality score. Volume is concentrated, with the top 10 programs carrying 81.1% of it and the top 100 carrying 96.5%. Most closed programs in the top 100 turned out to be operator infrastructure that nobody else needs to read. Only three were public trading routers, the programs users sign without being able to read what they sign. Those became the targets, and operator programs a non-goal. The model never chose what to work on.

The design in one picture

BATCH · ONCE PER VERSIONSERVING · EVERY REQUESTEvidencebytes, inner calls, balance changesModel proposeslayouts and field meaningsValidator decidesexact fit, controls, held-outRegistryversioned IDLsDecoderno model hereAgents, walletsand explorersUPGRADE → RE-VALIDATE
The model works once per program version, in batch. Requests are answered from validated IDLs, with no model on the path.
  • No model on the answer path. Inference is a build cost of the registry, paid once per program version ($0.64 to $1.26 per run so far). A thousand agents asking about the same program cost nothing extra.
  • Batch and serving are separate. Sampling, inference and validation run in a CLI, locally or in CI. Serving runs on Cloudflare: a Worker, IDLs in R2, metadata in D1, and a cron and queue that re-validate a program when it upgrades.
  • The core does no I/O and compiles to WebAssembly, so the same decoder runs in the Worker, the CLI and, later, a wallet.
  • Cheapest tier first: the on-chain IDL, then verified source, then a borrowed IDL that must consume the data exactly, and inference only when nothing else works. The exact-fit rule matters: term9 reuses Jupiter’s discriminator with a different layout, so borrowing Jupiter’s IDL is rejected, and the inferred layout fits 493 of 494 unseen instructions.

AI proposes, data decides

A deterministic probe gathers evidence: tag bytes, length prefixes, the arguments of inner calls, token balance changes. A model reads it and proposes layouts and field meanings. A validator decides:

GateRejects
Exact fitLayouts that leave bytes over or run out of bytes
Balance checkAmounts that do not match the transaction’s token balance changes
95% of at least 20 samplesMeanings that fit a few lucky transactions
Negative controlMeanings that also “hold” on another transaction’s or another field’s evidence
Held-out trafficLayouts tuned to the transactions they came from

If you keep one gate, keep the negative control. Round or repeated amounts make a check like “equals what left the user’s account” easy to pass by accident; if it also passes on someone else’s transaction, it proves nothing.

In a blind exam on FLASHX, a router I had already decoded by hand, the loop recovered all 9 known fields and a 33-byte swap shape my hand-built IDL had missed. When FLASHX’s traffic later shifted, it re-derived the hand layout byte for byte (283 of 283) for $0.66.

Versioned, honest, self-checking

  • Versioned. Every past IDL is rebuilt from chain history and picked by slot. On 1,148 historical pump and pump_amm instructions, today’s IDL decoded 50% cleanly; the IDL by slot decoded 98%.
  • Honest. Each instruction comes back with a status (decoded, borrowed, no_idl, error and a few more) and the source of its IDL. Data that does not fit is reported, never stretched, and the same statuses are the quality metric.
  • Self-checking. Each registry entry records the deploy and clean-decode rate it was validated at; idl watch flags changes and registry validate re-measures. When FLASHX’s traffic shifted on 2026-10-15, byte-exact decoding fell from 98.8% to 93.6%; the next morning’s update decoded all 3,882,890 held-out calls of that day.

What carries over

  • Pick one number the business cares about, and let the data choose where the model goes.
  • Keep the model off the request path. Pay for inference once and serve the validated result.
  • Make the validator strict, with negative controls and held-out data.
  • Report what you could not decode. An honest “unknown” beats a confident guess.
  • Version everything by time; what you validated yesterday may not hold today.

It is the evaluation half of building an agent harness, applied to data: the model proposes, a check in code decides, and you keep measuring after you ship.

Figures come from unbyte’s dated measurement reports; each is given with its date.