Case study
GoonFi V2: byte-identical Rust recompilation of a Solana program
OtterSec researchers describe an agent pipeline that reconstructed Rust source for the closed-source GoonFi V2 Solana program until a rebuild with the original toolchain reproduced the deployed ELF. Per-function instruction scoring, a deterministic merge judge and bans on assembly and other score-gaming constructs steered the agents; matching function order and panic-location paths closed the last differences. The article and a companion repository document the method and a verification script, while the internal tooling and agent transcripts remain unpublished.
- Targets
- Binary
- Category
- Independent reconstruction cases
- Relationship
- Independent reconstruction project
- Sources reviewed
Requirements & limits
- The target is GoonFi V2 as deployed at slot 448984043; the live program was upgraded on 2026-10-06, so verification uses the earlier ELF.
- The reconstruction uses the deployed binary, program IDL and on-chain transactions. The core agent harness, merge judge and transcripts are unpublished.
- build.sh requires Linux x86-64 and downloads Solana platform-tools v1.48 (rustc 1.84.1-dev, LLVM 19.1.7). VERIFY.sh needs an Alchemy archive key or another archival RPC to recover the original ELF from deploy-transaction writes and compare it byte for byte.
- The companion repository names no license for its reconstructed source; rights to the original closed-source program remain with its owner.
Cite
BibTeX
@misc{goonfi-v2-rust-recompilation-case,
title = {{GoonFi V2: byte-identical Rust recompilation of a Solana program}},
howpublished = {\url{https://osec.io/blog/goonfi-decompilation/}},
url = {https://osec.io/blog/goonfi-decompilation/},
urldate = {2026-10-18},
note = {Awesome REA entry: \url{https://awesomerea.org/resources/goonfi-v2-rust-recompilation-case/}}
}Plain text
GoonFi V2: byte-identical Rust recompilation of a Solana program. https://osec.io/blog/goonfi-decompilation/ (accessed 2026-10-18). Awesome REA entry: https://awesomerea.org/resources/goonfi-v2-rust-recompilation-case/
Useful? Star Awesome REA on GitHub2.4k
About this entry
The description was reviewed against primary sources.
Primary sources
- https://osec.io/blog/goonfi-decompilation/
- README.md GitHub · renato-osec/goonfi-v2-decompiled · Revision 381cc31
- build.sh GitHub · renato-osec/goonfi-v2-decompiled · Revision 381cc31
- VERIFY.sh GitHub · renato-osec/goonfi-v2-decompiled · Revision 381cc31
- verify_onchain.py GitHub · renato-osec/goonfi-v2-decompiled · Revision 381cc31
- Cargo.toml GitHub · renato-osec/goonfi-v2-decompiled · Revision 381cc31
- https://x.com/pashov/status/2111066785890054605
More in Native binaries
- HyperCard 1.2.2: a static recompilation of the classic Mac app · Case study
- openbst: a C reimplementation of BeSTspeech · Case study
- OpenTV: a portable C rebuild of Centigram TruVoice · Case study
- L&H TruVoice: a portable C rebuild of tv_enua.dll · Case study
- Microsoft Anna: a bit-exact C rebuild of the TTS20 engine · Case study
- OneCore TTS: a C rebuild of David, Zira and Mark · Case study
All 502 entries in Native binariesNative binaries case studies (64)