How it works

A program's bytecode is public. revrsly reads it carefully.

Anyone can fetch a deployed program with solana program dump. What comes back is compiled sBPF — correct, but unreadable. revrsly decompiles it and reconstructs as much structure as the bytes support, and marks how sure it is about each piece. The authors' original source does not come back.

01

The pipeline

  1. 1network
    fetch

    Read the program account (and, for an upgradeable program, its program data account) and take the ELF bytes as deployed, without the account's zero padding. Record the deploy slot and the bytecode's SHA-256, and look up what the authors published: a verified build, an IDL.

  2. 2sandboxed
    analyze

    The analyzer runs in a sandbox with no network and no files, under memory and time limits. Typically well under two seconds.

  3. 3library
    publish

    Store the report and every view in the public library, keyed by network, address and the bytecode's SHA-256, with the deploy slot recorded. An upgrade is a new entry; the old one stays. The program page opens.

Before any of this, the address is checked: the account must exist, belong to one of the BPF loaders and hold an sBPF program. Missing accounts, native programs, closed programs, plain data accounts, a program's data account and deploy buffers are each named for what they are. A program that's already in the library opens immediately. Everyone shares one queue, and fair-use limits keep it moving: 5 new decompiles per visitor per hour, 120 an hour for the whole site, and at most 50 waiting at once. An address that is already queued joins the request in progress. Reading the library is unlimited.

02

What the analyzer recovers, and how

Instructions and functionsThe ELF is parsed and relocated by the loader's own rules. Functions start at the entrypoint, at every call target and at every function symbol.● Derived
Control flowBranch edges are exact. The structured shape on top of them — loops, if/else — is a reconstruction.● Derived
Strings, syscalls, logsStrings are read where the code says how long they are; syscalls are named by their relocations, or in sBPF v3 by their hashes. Each is explained inline in the disassembly.■ Observed
Anchor instructionsA candidate name is kept only when sha256("global:<name>")[..8], the discriminator Anchor dispatches on, occurs in the binary.● Derived
Accounts and their checksRecovered from the account-validation code and Anchor's error strings, which carry account names.◇ Inferred
Errors and eventsError names and messages are read from the program's own error enum, and codes from the offset its constructor adds (Anchor's 6000 unless the program sets another). An event name is kept only when its hash occurs in the binary.■ Observed
Argument and field typesFrom load widths and how values are used. Field names are not in the bytecode, so fields are named by offset.◇ Inferred
Verified build, IDL, security.txtThe authors' own published claims. Shown as theirs, never as revrsly output.❝ Published
03

The sandbox

revrsly never runs the program it decompiles; it only reads the bytes. The risk is different: a crafted file built to trip a bug in the analyzer. So the analyzer itself is treated as untrusted while it works.

It's written in Rust and compiled to WebAssembly with no imports, so its code can reach nothing but its own memory; a module that declares any import is refused. Each run gets its own process with an empty environment, a memory ceiling, a kill timer and a cap on its output. It's given the bytecode, and the instruction names and discriminators from a published IDL when there is one, and it can return only its report.

runtime
WebAssembly with no imports
process
its own, with an empty environment
input
the bytecode, plus a published IDL's instruction names and discriminators
network
none
files
none
limits
a memory ceiling and a kill timer
output
one report under a size cap, or a failure
04

Certainty

Every fact on every page is one of four kinds, marked the same way in prose, tables, code and chips. Colour is paired with a glyph and a line style so the marks survive greyscale and colour-blindness.

■ ObservedRead straight from the bytes."Instruction: Buy"
● DerivedComputed exactly by the loader's own rules.fn_5ec40
◇ InferredA heuristic that can be wrong.pub vault
❝ PublishedThe program's authors' claim, not revrsly's.verified build

Each program also gets a tier: Disassembled (instructions recovered and annotated), Reconstructed (control flow and higher-level structure recovered) or Partial (only parts recovered; the gaps are listed). The tier is always shown.

05

What it can't recover

The authors' namesLocal variables, fields and most functions are compiled away. Names survive only where the bytes carry them — log strings, error messages, panic paths.
Comments and formattingNothing of the original text layout, comments or doc strings is in the bytecode.
How code was split into functionsThe compiler inlines and merges freely. revrsly shows the functions that exist in the binary, not the ones that were written.
Anything off chainTests, scripts, clients, build settings and dependencies that were optimised out.