smart_arb
Reconstructed93.7% of control flow structuredAnchor ◇5aMAKxzyqesf1dn7cDLPdGxwshZf1aVNavYzAQQU32Fgdecompiled 14 Oct 2026
- Loader
- ■v3 · upgradeable
- sBPF
- ■v0
- Size
- ■424,472 bytes
- Instructions
- ●43,919
- Functions
- ●655
- SHA-256
- ●6a840638…44e19500
- Upgrade authority
- ■8tZL…1LQR
- Last deploy slot
- ■449,218,614
❝ 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: 5aMAKxzyqesf1dn7cDLPdGxwshZf1aVNavYzAQQU32Fg (mainnet)
11
12use anchor_lang::prelude::*;
13
14declare_id!("5aMAKxzyqesf1dn7cDLPdGxwshZf1aVNavYzAQQU32Fg");■ string · 44 B
15
16// Accounts — each instruction's accounts, in order, as its account loader (try_accounts) checks them.
17
18▸ 1 more #[derive(Accounts)] struct · lines 18–26
27
28#[derive(Accounts)]
29pub struct FirstLegArb<'info> {◇ 7 accounts · order, types and checks inferred
30 #[account(mut)]
31 pub user: Signer<'info>,
32 #[account(mut)]
33 pub wsol: AccountInfo<'info>,
34 #[account(mut)]
35 pub user_wsol_ata: AccountInfo<'info>,
36 pub token_program: Program<'info, /* id not recovered */>,
37 pub token_2022_program: AccountInfo<'info>,
38 pub system_program: Program<'info, System>,
39 pub associated_token_program: Program<'info, /* id not recovered */>,
40}
41
42▸ 2 more #[derive(Accounts)] structs · lines 42–74
75
76#[program]
77pub mod smart_arb {
78 use super::*;
79
82 ▸ pub fn commit_first_leg_result(ctx: Context<CommitFirstLegResult>) -> Result<()> { … 57 lines }
141
142 // discriminator 28da3e93d61eac3f● found in the code at .text+0x32438
143 // args
144 ▾ pub fn first_leg_arb(ctx: Context<FirstLegArb>) -> Result<()> {● its sha256 matches the discriminator
145 // Recovered handler logic (register-level reconstruction of `first_leg_arb_handler`; r1..r5 were the
146 // dispatch arguments: program_id, accounts slice, instruction data). Calls to other fn_*
147 // are in pseudocode.c.
148 let mut local_1000: u64 = 0;
149 let mut local_ff8: u64 = 0;
150 let mut local_ff0: u64
261 ▸ pub fn on_chain_arb_multi_path_with_guard(ctx: Context<OnChainArbMultiPathWithGuard>) -> Result<()> { … 455 lines }
721 ▸ pub fn second_leg_arb(ctx: Context<SecondLegArb>) -> Result<()> { … 447 lines }
=
0
;
151 let mut local_500: u64 = 0;
152 let mut local_4f8: u64 = 0;
153 let mut local_4f0: u64 = 0;
154 let mut local_4e8: u64 = 0;
155 let mut local_4e0: u64 = 0;
156 let mut local_4d8: u32 = 0;
157 let mut local_4d4: u64 = 0;
158 let mut local_468: u64 = 0;
159 let mut local_460: u64 = 0;
160 let mut local_458: u64 = 0;
161 let mut local_450: u64 = 0;
162 let mut local_440: u64 = 0;
163 let mut local_438: u64 = 0;
164 let mut local_430: u64 = 0;
165 let mut local_428: u64 = 0;
166 let mut local_420: u64 = 0;
167 let mut local_2de: u8 = 0;
168 let mut local_2dd: u32 = 0;
169 let mut local_2d9: u8 = 0;
170 let mut local_2d8: u64 = 0;
171 let mut local_188: u64 = 0;
172 let mut local_180_u64: u64 = 0;
173 let mut local_180_u32: u32 = 0;
174 let mut local_17c: u64 = 0;
175 let mut local_3e: u8 = 0;
176 let mut local_3d: u32 = 0;
177 let mut local_39: u8 = 0;
178 let mut local_38: u64 = 0;
179 let mut local_30: u64 = 0;
180 let mut local_28: u64 = 0;
181 let mut local_20: u64 = 0;
182 let mut local_18: u64 = 0;
183 let mut local_10: u64 = 0;
184 let mut local_8: u64 = 0;
190 sol_log_("Instruction: FirstLegArb", 0x18); // log a string■ string · 24 B
191 r7 = *((r8 - 0xff8) as *const u64);
193 r8 = *((r8 - 0x1000) as *const u64);
195 r0 = fn_3a078(&local_188, &local_428);
197 if r6 != -0x8000000000000000 {
200 r0 = memcpy(&local_4d4, &local_17c, 0x6c);
207 local_430 = local_4f8;
208 local_438 = local_4f0;
209 local_ff0 = &local_450;
210 local_ff8 = &local_468;
213 r0 = first_leg_arb_try_accounts(&local_188, r9, &local_438, r8, fp);
217 r0 = memcpy(r6, &local_188, 0x14a);
218 local_2dd = local_3d;
219 local_2d9 = local_39;
221 r0 = memcpy(r8, r6, 0x14a);
223 local_18 = local_468;
224 local_10 = local_460;
226 local_20 = local_430;
227 local_28 = local_438;
231 r0 = memcpy(r6, &local_4e0, 0x78);
232 r0 = fn_37a40(&local_188, &local_38, r6);
236 r0 = memcpy(r7 + 8, &local_180_u64, 0x98);
237 *((r7) as *mut u64) = r6;
239 *((r7) as *mut u64) = 4;
241 r0 = fn_2ab0(&local_428);
242 r0 = fn_cfb0(&local_450);
245 r0 = memcpy(r6, &local_188, 0xa0);
246 r0 = memcpy(local_500, r6, 0xa0);
247 r0 = fn_cfb0(&local_450);
248 r0 = fn_d058(&local_468);
249 r0 = fn_2d98(&local_4e0);
252 local_2d8 = local_180_u64;
253 r0 = fn_2968(&local_2d8, r2, r3, r4, r5);
254 r0 = anchor_error_new(r9, 0x66); // Anchor error 102 InstructionDidNotDeserialize?