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▸ 2 more #[derive(Accounts)] structs · lines 18–65
66
67#[derive(Accounts)]
68pub struct BuybackBurn<'info> {◇ 15 accounts · order, types and checks inferred
69 #[account(mut, address = /* … */)]
70 pub keeper: Signer<'info>,
71 #[account(seeds = [/* … */], bump)]
72 pub protocol: AccountInfo<'info>,
73 #[account(mut, seeds = [/* … */], bump)]
74 pub launch: AccountInfo<'info>,
75 #[account(mut, seeds = [/* … */], bump)]
76 pub vault: SystemAccount<'info>,
77 pub bonding_curve: AccountInfo<'info>,
78 #[account(mut)]
79 pub vault_quote: AccountInfo<'info>,
80 #[account(mut)]
81 pub coin_mint: AccountInfo<'info>,
82 #[account(mut)]
83 pub vault_coin: AccountInfo<'info>,
84 pub coin_program: AccountInfo<'info>,
85 pub pool: AccountInfo<'info>,
86 #[account(mut)]
87 pub lp_mint: AccountInfo<'info>,
88 #[account(mut)]
89 pub vault_lp: AccountInfo<'info>,
90 pub lp_program: AccountInfo<'info>,
91 pub spl_token: Program<'info, /* id not recovered */>,
92 pub system_program: Program<'info, System>,
93}
94
95▸ 6 more #[derive(Accounts)] structs · lines 95–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 }
1550
1551 // discriminator 14fe3afcd1206f61● found in the code at .text+0x52166
1552 // args
1553 ▾ pub fn buyback_burn(ctx: Context<BuybackBurn>) -> Result<()> {● its sha256 matches the discriminator
1554 // ◇ The program's own handler (`buyback_burn` in reconstructed.rs), register-level. Anchor's wrapper
1555 // (`buyback_burn_handler`) loads the accounts, then calls it with r1 = where its Result is written,
1556 // r2 = &Context, r3..r5 = the arguments in order (larger ones by reference; more on the stack).
1557 // 39 stack slots (local_…) used below; declared in reconstructed.rs.
1558 r8 = r4;
1559 r9 = r3;
1560 r7 = r2;
1561 r6 = r1;
1562
1817 ▸ pub fn collect(ctx: Context<Collect>) -> Result<()> { … 369 lines }
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
r3 = *((r7 + 8) as *const u64);
1564 if r9 >= *((r3 + 0x372) as *const u8) {
1565 r0 = fn_1f380(&local_a8, 0x521cc); // .rodata+0xa6c
1566 r0 = fn_4430(&local_90, 0x521cc, r3, r4, r5); // .rodata+0xa6c
1567 local_c0_u64 = 0x5221c; // .rodata+0xabc
1569 local_b0_u32 = 0x1c3;
1572 local_30 = 0x177c; // custom Anchor error 6012 (#12)?
1573 r0 = fn_3d1a8(&local_d8, &local_c8);
1577 *((r6 + 8) as *mut u64) = r7;
1578 *((r6) as *mut u64) = r9;
1584 r0 = fn_49180(r9, 4, &Location("programs/anchor-fees/src/lib.rs:452:20"));■ string · 38 B
1586 r4 = *((r5 - 0xff0) as *const u64);
1587 r0 = *((r5 - 0xff8) as *const u64);
1588 r5 = *((r5 - 0x1000) as *const u64);
1591 r6 = *((r2 + r8 + 0x2e) as *const u8);
1594 r0 = fn_1f380(&local_a8, 0x521f4); // .rodata+0xa94
1595 r0 = fn_4430(&local_90, 0x521f4, r3, r4, r5); // .rodata+0xa94
1596 local_c0_u64 = 0x5221c; // .rodata+0xabc
1598 local_b0_u32 = 0x1c5;
1601 local_30 = 0x1776; // custom Anchor error 6006 (#6)?
1602 r0 = fn_3d1a8(&local_118, &local_c8);
1608 *((r6 + 8) as *mut u64) = r7;
1609 *((r6) as *mut u64) = r9;
1617 r2 = *((r3 + 0x380) as *const u64);
1621 r0 = fn_a4a8(&local_c8, r2, r3);
1630 *((r6 + 8) as *mut u64) = r7;
1631 *((r6) as *mut u64) = r9;
1637 r0 = fn_1f380(&local_a8, 0x52210); // .rodata+0xab0
1638 r0 = fn_4430(&local_90, 0x52210, r3, r4, r5); // .rodata+0xab0
1639 local_c0_u64 = 0x5221c; // .rodata+0xabc
1641 local_b0_u32 = 0x1c7;
1644 local_30 = 0x177a; // custom Anchor error 6010 (#10)?
1645 r0 = fn_3d1a8(&local_108, &local_c8);
1651 *((r6 + 8) as *mut u64) = r7;
1652 *((r6) as *mut u64) = r9;
1657 r3 = *((r7 + 0x18) as *const u64);
1658 r2 = *((r7 + 0x10) as *const u64);
1660 r4 = *((r1 + 8) as *const u64);
1661 r1 = *((r1 + 0x10) as *const u64);
1662 r5 = *((*((local_130 + 0x378) as *const u64)) as *const u64);
1663 local_b0_u64 = *((r5 + 0x18) as *const u64);
1664 local_b8 = *((r5 + 0x10) as *const u64);
1665 local_c0_u64 = *((r5 + 8) as *const u64);
1666 local_c8 = *((r5) as *const u64);
1667 local_ff0 = &local_c8;
1668 local_ff8 = local_138;
1671 r0 = fn_af50(&local_e8, r2, r3, r4, fp);
1680 *((r6 + 8) as *mut u64) = r7;
1681 *((r6) as *mut u64) = r9;
1685 r1 = 0x52871; // .rodata+0x1111
1687 r1 = 0x52781; // .rodata+0x1021
1696 r4 = *((r3 + 8) as *const u64);
1697 r3 = *((r3 + 0x10) as *const u64);
1703 r0 = fn_86e8(&local_c8, r7, r9, r4, fp);
1710 *((r6 + 8) as *mut u64) = r7;
1711 *((r6) as *mut u64) = r9;
1715 if r1 >= local_150 {
1718 r0 = fn_352d0(&local_a8, 0x521b4); // .rodata+0xa54
1721 r0 = fn_40d0(&local_90, 0x521b4, r3, r4, r5); // .rodata+0xa54
1722 local_c0_u64 = 0x5221c; // .rodata+0xabc
1725 local_b0_u32 = 0x1ca;
1728 r0 = fn_3d1a8(&local_f8, &local_c8);
1734 *((r6 + 8) as *mut u64) = r7;
1735 *((r6) as *mut u64) = r9;
1738 r5 = local_158 + r8;
1739 r2 = *((r5) as *const u64);
1741 r0 = fn_4d5c0(&Location("programs/anchor-fees/src/lib.rs:460:9"));■ string · 37 B
1743 *((r5) as *mut u64) = r2 - r9;
1744 r4 = *((r5 + 8) as *const u64);
1754 r0 = fn_4d568(&Location("programs/anchor-fees/src/lib.rs:461:9"));■ string · 37 B
1756 *((r5 + 8) as *mut u64) = r2;
1757 r5 = *((r0 + 0x318) as *const u64);
1768 *((r0 + 0x318) as *mut u64) = r5;
1769 r4 = *((r0 + 0x350) as *const u64);
1775 r0 = fn_4d568(&Location("programs/anchor-fees/src/lib.rs:463:9"));■ string · 37 B
1777 *((r0 + 0x350) as *mut u64) = r3;
1778 r4 = *((r0 + 0x358) as *const u64);
1785 r0 = fn_4d568(&Location("programs/anchor-fees/src/lib.rs:464:9"));■ string · 37 B
1787 *((r0 + 0x358) as *mut u64) = r2;
1788 r2 = *((r0 + 0x36c) as *const u32) + 1;
1789 if (r2 << 0x20 >> 0x20) != r2 {
1790 r0 = fn_4d568(&Location("programs/anchor-fees/src/lib.rs:465:9"));■ string · 37 B
1792 *((r0 + 0x36c) as *mut u32) = r2;
1794 local_b0_u64 = *((r3 + 0x18) as *const u64);
1795 local_b8 = *((r3 + 0x10) as *const u64);
1796 local_c0_u64 = *((r3 + 8) as *const u64);
1797 local_c8 = *((r3) as *const u64);
1801 r0 = fn_201f8(r7, &local_c8);
1803 local_28 = local_10;
1804 r0 = fn_3ffc8(&local_28, 1);
1808 *((r6 + 8) as *mut u64) = r7;
1809 *((r6) as *mut u64) = r9;
1812 /* continues at L_1a3b0; not expressible as structured Rust */● an edge Rust can't hold