anchor_fees
Reconstructed97.1% of control flow structuredAnchor ◇Anchu75SGbEUeWL5WcSVG9XJQb21NVmmA1faQ7Vse7t9decompiled 22 Oct 2026
- Loader
- ■v3 · upgradeable
- sBPF
- ■v0
- Size
- ■404,096 bytes
- Instructions
- ●39,626
- Functions
- ●678
- SHA-256
- ●5ca3173c…544bcbc0
- Upgrade authority
- ■DPiU…pnms
- Last deploy slot
- ■460,073,305
❝ Published by the authors · nothing, so everything here is revrsly outputVerified build · noneIDL · none publishedsecurity.txt · none
Loading the reconstruction…
1// Reconstructed from the compiled program by revrsly.
2// Read from the bytecode: instruction names and discriminators; each instruction's accounts in
3// order, with the types and attributes their loaders' checks imply (◇ inferred: the error codes
4// they raise, the account type whose discriminator they compare, the program ids they compare
5// with); the program's error enum; event and account type names. `/* … */` is a value not
6// recovered. Handler bodies are the register-level logic of each instruction's own handler.
7// Argument names come from a published IDL when there is one, else they are placeholders; struct
8// fields are not recovered. This is a reconstruction, NOT the author's source, and will not
9// compile as-is.
10// Program: Anchu75SGbEUeWL5WcSVG9XJQb21NVmmA1faQ7Vse7t9 (mainnet)
11
12use anchor_lang::prelude::*;
13
14declare_id!("Anchu75SGbEUeWL5WcSVG9XJQb21NVmmA1faQ7Vse7t9");■ string · 44 B
15
16// Accounts — each instruction's accounts, in order, as its account loader (try_accounts) checks them.
17
18▸ 3 more #[derive(Accounts)] structs · lines 18–93
94
95#[derive(Accounts)]
96pub struct Collect<'info> {◇ 6 accounts · order, types and checks inferred
97 #[account(mut)]
98 pub cranker: Signer<'info>,
99 #[account(mut, seeds = [/* … */], bump)]
100 pub launch: AccountInfo<'info>,
101 #[account(mut, seeds = [/* … */], bump)]
102 pub vault: SystemAccount<'info>,
103 #[account(mut)]
104 pub vault_quote: AccountInfo<'info>,
105 pub spl_token: Program<'info, /* id not recovered */>,
106 pub system_program: Program<'info, System>,
107}
108
109▸ 5 more #[derive(Accounts)] structs · lines 109–177
178
179#[program]
180pub mod anchor_fees {
181 use super::*;
182
185 ▸ pub fn add_liquidity(ctx: Context<AddLiquidity>) -> Result<()> { … 805 lines }
995 ▸ pub fn buy_anchor(ctx: Context<BuyAnchor>) -> Result<()> { … 553 lines }
1553 ▸ pub fn buyback_burn(ctx: Context<BuybackBurn>) -> Result<()> { … 259 lines }
1814
1815 // discriminator d02fc29b116252ec● found in the code at .text+0x521ae
1816 // args
1817 ▾ pub fn collect(ctx: Context<Collect>) -> Result<()> {● its sha256 matches the discriminator
1818 // ◇ The program's own handler (`collect` in reconstructed.rs), register-level. Anchor's wrapper
1819 // (`collect_handler`) loads the accounts, then calls it with r1 = where its Result is written,
1820 // r2 = &Context, r3 = the arguments in order (larger ones by reference; more on the stack).
1821 // 62 stack slots (local_…) used below; declared in reconstructed.rs.
1822 local_220 = r3;
1823 r9 = r2;
1824 local_228 = r1;
1825 r8 = *((r9 + 8) as
2191 ▸ pub fn distribute(ctx: Context<Distribute>) -> Result<()> { … 820 lines }
3016 ▸ pub fn initialize(ctx: Context<Initialize>) -> Result<()> { … 139 lines }
3160 ▸ pub fn register(ctx: Context<Register>) -> Result<()> { … 732 lines }
3897 ▸ pub fn swap_to_sol(ctx: Context<SwapToSol>) -> Result<()> { … 522 lines }
4424 ▸ pub fn update_protocol(ctx: Context<UpdateProtocol>) -> Result<()> { … 66 lines }
4492
4493}
4494
4495// Account types (#[account]), by discriminator: Launch, Protocol. Fields not recovered.
4496// Events (#[event]), by discriminator: AnchorBurned, Collected, Distributed, LiquidityAdded, Registered, Swapped. Fields not recovered.
4497
*
const
u64
);
1826 r0 = fn_4658(&local_188, r8 + 0x1e0);
1827 r1 = *((*((r8 + 0x1e8) as *const u64)) as *const u64);
1828 local_f8 = *((r1 + 0x18) as *const u64);
1829 local_100 = *((r1 + 0x10) as *const u64);
1830 local_108 = *((r1 + 8) as *const u64);
1831 local_110 = *((r1) as *const u64);
1833 local_a0 = *((r1) as *const u64);
1834 local_98 = *((r1 + 8) as *const u64);
1835 local_90 = *((r1 + 0x10) as *const u64);
1836 local_88_u64 = *((r1 + 0x18) as *const u64);
1839 r0 = fn_a070(r7, &local_a0, r6);
1840 r0 = fn_4788(&local_110, r7);
1842 r0 = fn_352d0(&local_80, 0x521fc); // .rodata+0xa9c
1845 r0 = fn_40d0(&local_68, 0x521fc, r3, r4, r5); // .rodata+0xa9c
1846 local_98 = 0x5221c; // .rodata+0xabc
1849 local_88_u32 = 0xcd;
1852 r0 = fn_3d1a8(&local_1e8, &local_a0);
1855 r1 = *((*((r8 + 0x1e8) as *const u64)) as *const u64);
1856 local_88_u64 = *((r1 + 0x18) as *const u64);
1857 local_90 = *((r1 + 0x10) as *const u64);
1858 local_98 = *((r1 + 8) as *const u64);
1859 local_a0 = *((r1) as *const u64);
1861 local_e0 = *((r1) as *const u64);
1862 local_d8 = *((r1 + 8) as *const u64);
1863 local_d0 = *((r1 + 0x10) as *const u64);
1864 local_c8 = *((r1 + 0x18) as *const u64);
1865 r0 = fn_a070(&local_80, &local_e0, r6);
1866 r0 = fn_3d3d0(&local_1f8, r9, r7, &local_a0);
1870 r0 = fn_4938(&local_188);
1871 r0 = fn_49f8(local_220);
1872 *((r9 + 8) as *mut u64) = r7;
1873 *((r9) as *mut u64) = r6;
1878 r0 = fn_45560(&local_198, r2);
1881 r3 = *((r8 + 0x1dc) as *const u8);
1882 local_138 = &local_121;
1885 local_158 = 0x5223b; // .rodata+0xadb
1893 local_200 = *((r8 + 0x1e8) as *const u64);
1896 r0 = fn_4658(r1, r8);
1898 r0 = fn_4658(r7, r8 + 0x1f0);
1900 r0 = fn_4658(r6, r8 + 0x1f8);
1901 r1 = *((r9 + 0x10) as *const u64);
1902 r2 = *((r9 + 0x18) as *const u64);
1904 r3 = *((r4 + 8) as *const u64);
1905 r4 = *((r4 + 0x10) as *const u64);
1906 local_b0 = &local_158;
1908 local_fd0 = &local_b0;
1916 r0 = fn_34d68(&local_120, &local_188, local_200, local_208, fp);
1920 r0 = fn_4938(&local_a0);
1921 r0 = fn_4938(&local_e0);
1922 r0 = fn_4938(&local_110);
1924 r0 = fn_4938(&local_188);
1925 r0 = fn_49f8(local_220);
1926 *((r9 + 8) as *mut u64) = r7;
1927 *((r9) as *mut u64) = r6;
1930 r0 = fn_4938(&local_a0);
1931 r0 = fn_4938(&local_e0);
1932 r0 = fn_4938(&local_110);
1936 r0 = fn_a100(r6, &local_188, *((r8 + 0x1e8) as *const u64));
1937 r2 = *((r8 + 0x180) as *const u64);
1938 *((r8 + 0x180) as *mut u64) = r0;
1948 r7 = *((r8 + 0x1d8) as *const u16);
1949 r0 = fn_34b28(r8 + 0x158, r6, 0, r7);
1951 r0 = fn_34a40(r6, r7);
1953 r0 = fn_4d5c0(&Location("programs/anchor-fees/src/lib.rs:230:24"));■ string · 38 B
1958 r5 = *((r8 + 0x1da) as *const u8);
1968 r0 = fn_34a40(r8, local_208);
1971 r0 = fn_34a40(local_200 - r0, *((r7) as *const u16));
1975 r3 = *((r7 - 0x2c) as *const u64);
1981 *((r7 - 0x2c) as *mut u64) = r4;
1988 r0 = fn_4d5c0(&Location("programs/anchor-fees/src/lib.rs:235:13"));■ string · 38 B
1990 r0 = fn_4d568(&Location("programs/anchor-fees/src/lib.rs:234:13"));■ string · 38 B
1993 /* continues at L_14160; not expressible as structured Rust */● an edge Rust can't hold
1995 r0 = fn_49180(r9, 4, &Location("programs/anchor-fees/src/lib.rs:233:91"));■ string · 38 B
1997 r0 = fn_4d5c0(&Location("programs/anchor-fees/src/lib.rs:233:62"));■ string · 38 B
2001 /* continues at L_14130; not expressible as structured Rust */● an edge Rust can't hold
2006 local_88_u64 = *((r2 + 0x18) as *const u64);
2007 local_90 = *((r2 + 0x10) as *const u64);
2008 local_98 = *((r2 + 8) as *const u64);
2009 local_a0 = *((r2) as *const u64);
2010 local_80 = local_200;
2012 r0 = fn_1fb48(r6, &local_a0);
2013 local_108 = local_d0;
2014 local_110 = local_d8;
2015 r0 = fn_3ffc8(&local_110, 1);
2019 r0 = fn_4938(&local_188);
2020 r0 = fn_49f8(local_220);
2021 *((r9 + 8) as *mut u64) = r7;
2022 *((r9) as *mut u64) = r6;
2025 r0 = fn_49180(r1, 4, &Location("programs/anchor-fees/src/lib.rs:234:13"));■ string · 38 B
2027 local_210 = *((r9 + 0x18) as *const u64);
2028 local_218 = *((r9 + 0x10) as *const u64);
2030 r9 = *((r1 + 8) as *const u64);
2031 r3 = *((r1 + 0x10) as *const u64);
2032 r1 = *((*((r8 + 0x1e8) as *const u64)) as *const u64);
2033 local_c8 = *((r1 + 0x18) as *const u64);
2034 local_d0 = *((r1 + 0x10) as *const u64);
2035 local_d8 = *((r1 + 8) as *const u64);
2036 local_e0 = *((r1) as *const u64);
2037 local_b0 = &local_e0;
2039 local_248 = &local_68;
2040 local_250 = &local_80;
2045 r1 = *((r9 + 0x18) as *const u8);
2052 if r7 <= local_210 {
2053 if *((r9 + 0x10) as *const u64) >= 8 {
2055 r0 = fn_77f0(&local_1a8, r9, 8, &Location("programs/anchor-fees/src/lib.rs:650:35"));■ string · 38 B
2057 local_110 = *((local_1a8) as *const u64);
2060 r7 = local_218 + r6 * 0x30;
2061 r0 = fn_42e90(*((r7) as *const u64), 0x51dc8); // .rodata+0x668
2066 r0 = fn_3b390(&local_110, 0x52296); // .rodata+0xb36
2068 /* continues at L_13c28; not expressible as structured Rust */● an edge Rust can't hold
2070 r1 = local_200 - r6;
2074 r0 = fn_352d0(local_250, 0x521e8); // .rodata+0xa88
2077 r0 = fn_40d0(local_248, 0x521e8, r3, r4, r5); // .rodata+0xa88
2078 local_98 = 0x5221c; // .rodata+0xabc
2081 local_88_u32 = 0x27f;
2084 r0 = fn_3d1a8(&local_1b8, &local_a0);
2089 r0 = fn_4718(r7, &local_b0);
2093 r3 = local_208 + -0x20;
2099 /* continues at L_13b50; not expressible as structured Rust */● an edge Rust can't hold
2103 /* continues at L_13c30; not expressible as structured Rust */● an edge Rust can't hold
2105 r0 = fn_49180(0, 0, &Location("programs/anchor-fees/src/lib.rs:638:13"));■ string · 38 B
2107 r0 = fn_49248("called `Result::unwrap()` on an `Err` value", 0x2b, &local_a0, 0x56570, &Location("programs/anchor-fees/src/lib.rs:650:52")); // .data.rel.ro+0x268■ string · 43 B
2111 r0 = fn_352d0(&local_80, 0x521fc); // .rodata+0xa9c
2114 r0 = fn_40d0(&local_68, 0x521fc, r3, r4, r5); // .rodata+0xa9c
2115 local_98 = 0x5221c; // .rodata+0xabc
2118 local_88_u32 = 0x289;
2121 r0 = fn_3d1a8(&local_1c8, &local_a0);
2130 r0 = fn_4938(&local_188);
2131 r0 = fn_49f8(local_220);
2132 *((r9 + 8) as *mut u64) = r7;
2133 *((r9) as *mut u64) = r6;
2138 r4 = *((r1 + 8) as *const u64);
2139 r1 = *((r1 + 0x10) as *const u64);
2141 local_e0 = *((r2) as *const u64);
2142 local_d8 = *((r2 + 8) as *const u64);
2143 local_d0 = *((r2 + 0x10) as *const u64);
2144 local_c8 = *((r2 + 0x18) as *const u64);
2145 local_110 = &local_158;
2148 r2 = *((*((r8 + 0x1e8) as *const u64)) as *const u64);
2149 local_88_u64 = *((r2 + 0x18) as *const u64);
2150 local_90 = *((r2 + 0x10) as *const u64);
2151 local_98 = *((r2 + 8) as *const u64);
2152 local_a0 = *((r2) as *const u64);
2153 local_fd0 = &local_a0;
2154 local_fe0 = &local_110;
2155 local_fe8 = &local_e0;
2156 local_ff8 = 0x52551; // .rodata+0xdf1
2160 r0 = fn_33838(&local_1d8, local_218, local_210, r4, fp);
2166 r0 = fn_4938(&local_188);
2167 r0 = fn_49f8(local_220);
2168 *((r9 + 8) as *mut u64) = r7;
2169 *((r9) as *mut u64) = r6;
2172 /* continues at L_13f70; not expressible as structured Rust */● an edge Rust can't hold
2174 r0 = fn_4d568(&Location("programs/anchor-fees/src/lib.rs:649:28"));■ string · 38 B
2177 /* continues at L_139e0; not expressible as structured Rust */● an edge Rust can't hold
2179 /* continues at L_13c60; not expressible as structured Rust */● an edge Rust can't hold
2183 /* continues at L_13dd8; not expressible as structured Rust */● an edge Rust can't hold
2186 /* continues at L_13d40; not expressible as structured Rust */● an edge Rust can't hold