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▸ 2 more #[derive(Accounts)] structs · lines 18–40
41
42#[derive(Accounts)]
43pub struct OnChainArbMultiPathWithGuard<'info> {◇ 9 accounts · order, types and checks inferred
44 #[account(mut)]
45 pub user: Signer<'info>,
46 #[account(mut)]
47 pub wsol: AccountInfo<'info>,
48 #[account(mut)]
49 pub user_wsol_ata: AccountInfo<'info>,
50 pub token_program: Program<'info, /* id not recovered */>,
51 pub token_2022_program: AccountInfo<'info>,
52 pub system_program: Program<'info, System>,
53 pub associated_token_program: Program<'info, /* id not recovered */>,
54 pub freshness_clock: AccountInfo<'info>,
55 pub freshness_clock_2: AccountInfo<'info>,
56}
57
58▸ 1 more #[derive(Accounts)] struct · lines 58–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 }
144 ▸ pub fn first_leg_arb(ctx: Context<FirstLegArb>) -> Result<()> { … 112 lines }
258
259 // discriminator d4c338b7ba130647● found in the code at .text+0x322b8
260 // args
261 ▾ pub fn on_chain_arb_multi_path_with_guard(ctx: Context<OnChainArbMultiPathWithGuard>) -> Result<()> {● its sha256 matches the discriminator
262 // ◇ The program's own handler (`on_chain_arb_multi_path_with_guard` in reconstructed.rs), register-level. Anchor's wrapper
263 // (`on_chain_arb_multi_path_with_guard_handler`) loads the accounts, then calls it with r1 = where its Result is written,
264 // r2 = &Context, r3 = the arguments in order (larger ones by reference; more on the stack).
265 // 80 stack slots (local_…) used below; declared in reconstructed.rs.
266 r9 = r3;
267 r6 = r2;
268 local_3f0 = r1;
269 r8 = *((r6 + 8
721 ▸ pub fn second_leg_arb(ctx: Context<SecondLegArb>) -> Result<()> { … 447 lines }
)
as
*
const
u64
);
270 r0 = fn_48270(r8 + 0x150);
272 r0 = fn_48270(r8 + 0x180);
276 local_408 = *((r9 + 0x78) as *const u64);
277 local_3a8 = r8 + 0x120;
278 local_3b0 = r8 + 0xf0;
279 local_3b8 = r8 + 0xc0;
280 local_3c0 = r8 + 0x90;
281 local_3d0 = r8 + 0x30;
286 local_400 = *((r6 + 0x10) as *const u64);
288 r8 = *((r6 + 0x18) as *const u64);
290 r0 = fn_16120(&local_2e0, r9, r3, r8);
292 r0 = memcpy(&local_b8, &local_2d8_u64, 0xa0);
306 local_2f0 = local_230;
307 local_2f8 = local_238;
309 r0 = memcpy(&local_398, &local_b8, 0xa0);
312 r0 = fn_17760(&local_2e0, r8, r3, r9, r7);
313 local_b8 = local_2d8_u64;
314 local_b0 = local_2d0;
315 local_a8 = local_2c8;
319 r0 = memcpy(r7 + 0x20, &local_2c0, 0x80);
320 *((r7 + 0x18) as *mut u64) = local_a8;
321 *((r7 + 0x10) as *mut u64) = local_b0;
322 *((r7 + 8) as *mut u64) = local_b8;
323 *((r7) as *mut u64) = r6;
325 local_220 = local_b8;
326 local_218 = local_b0;
327 local_210 = local_a8;
328 r0 = fn_18478(&local_2e0, r8, r7);
329 local_b8 = local_2d8_u64;
330 local_b0 = local_2d0;
331 local_a8 = local_2c8;
335 r0 = memcpy(r7 + 0x20, &local_2c0, 0x80);
336 *((r7 + 0x18) as *mut u64) = local_a8;
337 *((r7 + 0x10) as *mut u64) = local_b0;
338 *((r7 + 8) as *mut u64) = local_b8;
339 *((r7) as *mut u64) = r6;
341 local_208 = local_b8;
342 local_200 = local_b0;
343 local_1f8 = local_a8;
344 r0 = clock_get(&local_2e0);
348 local_1e0 = local_2b8;
353 local_ff8 = &local_1f0;
358 r0 = fn_18ff8(&local_2e0, r7, r3, r4, fp);
359 local_b8 = local_2d8_u64;
360 local_b0 = local_2d0;
361 local_a8 = local_2c8;
365 r0 = memcpy(r7 + 0x20, &local_2c0, 0x80);
366 *((r7 + 0x18) as *mut u64) = local_a8;
367 *((r7 + 0x10) as *mut u64) = local_b0;
368 *((r7 + 8) as *mut u64) = local_b8;
369 *((r7) as *mut u64) = r6;
371 local_1d8 = local_b8;
372 local_1d0 = local_b0;
373 local_1c8 = local_a8;
376 local_ff8 = &local_1f0;
378 r0 = fn_1a2a8(&local_2e0, r7, local_420, r4, fp);
379 local_b8 = local_2d8_u64;
380 local_b0 = local_2d0;
381 local_a8 = local_2c8;
385 r0 = memcpy(r7 + 0x20, &local_2c0, 0x80);
386 *((r7 + 0x18) as *mut u64) = local_a8;
387 *((r7 + 0x10) as *mut u64) = local_b0;
388 *((r7 + 8) as *mut u64) = local_b8;
389 *((r7) as *mut u64) = r6;
391 local_1c0 = local_b8;
396 local_428 = local_218;
402 local_fc0 = &local_1f0;
408 local_1000 = local_428;
413 r0 = fn_e028(&local_2e0, &local_3d8, r7, local_420, fp);
414 local_180 = local_2d0;
415 local_178 = local_2c8;
416 local_170 = local_2c0;
417 local_168 = local_2b8;
418 local_160 = local_2b0;
423 r0 = memcpy(r8 + 0x38, &local_2a8, 0x68);
424 *((r8 + 0x30) as *mut u64) = local_160;
425 *((r8 + 0x28) as *mut u64) = local_168;
426 *((r8 + 0x20) as *mut u64) = local_170;
427 *((r8 + 0x18) as *mut u64) = local_178;
428 *((r8 + 0x10) as *mut u64) = local_180;
429 *((r8 + 8) as *mut u64) = r6;
430 *((r8) as *mut u64) = r7;
437 r1 = *((r8 + 0x80) as *const u64);
438 r2 = *((r8 + 0x88) as *const u64);
439 local_ff0 = *((r8 + 0x90) as *const u8);
442 r0 = fn_2a518(local_3f8, local_418, local_410, r4, fp);
445 *((r1 + 0x10) as *mut u64) = 0;
446 *((r1 + 8) as *mut u64) = 0;
447 *((r1) as *mut u64) = 4;
449 local_2e0 = -0x8000000000000000;
451 r0 = fn_44198(local_3f0, &local_2e0);
453 r0 = fn_c2a8(&local_1c0);
454 r0 = fn_c2c8(&local_1d8);
455 r0 = fn_c2e8(&local_208);
456 r0 = fn_c288(&local_220);
458 r0 = fn_d058(local_3e8 + 0x20);
461 local_2e0 = -0x8000000000000000;
463 r0 = fn_44198(local_3f0, &local_2e0);
464 r0 = fn_c2a8(&local_1c0);
465 r0 = fn_c2c8(&local_1d8);
466 r0 = fn_c2e8(&local_208);
467 r0 = fn_c288(&local_220);
469 r0 = fn_d058(local_3e8 + 0x20);
472 local_190 = local_168;
473 local_198 = local_170;
474 local_1a0 = local_178;
475 local_1a8 = local_180;
482 local_fb0 = &local_1f0;
483 local_fb8 = local_430;
484 local_fc0 = local_428;
492 local_1000 = local_400;
493 r0 = fn_e6b0(&local_2e0, &local_3d8, &local_180, local_3e0, fp);
501 r0 = memcpy(r9 + 0x20, &local_2c0, 0x80);
502 *((r9 + 0x18) as *mut u64) = r6;
503 *((r9 + 0x10) as *mut u64) = r7;
504 *((r9 + 8) as *mut u64) = local_420;
505 *((r9) as *mut u64) = r8;
507 r0 = fn_c2a8(&local_1c0);
508 r0 = fn_c2c8(&local_1d8);
509 r0 = fn_c2e8(&local_208);
510 r0 = fn_c288(&local_220);
512 r0 = fn_d058(local_3e8 + 0x20);
521 if (r6 as i64) >= 0 {
529 r1 = *((r8 + 0x80) as *const u64);
530 r2 = *((r8 + 0x88) as *const u64);
532 local_ff0 = *((r8 + 0x90) as *const u8);
536 r0 = fn_2a518(local_3f8, local_418, local_410, r6, fp);
549 local_fd8 = &local_3a0;
550 local_fe0 = &local_1a8;
555 r0 = fn_21420(&local_b8, &local_3d8, r7, r9, fp);
558 r0 = memcpy(r7, &local_b8, 0xa0);
559 local_18 = -0x8000000000000000;
561 r0 = fn_44198(&local_158, &local_18);
569 r0 = memcpy(r9 + 0x18, &local_140, 0x88);
570 *((r9 + 0x10) as *mut u64) = r7;
571 *((r9 + 8) as *mut u64) = local_3f8;
572 *((r9) as *mut u64) = r6;
578 if r9 <= *((r8 + 0x70) as *const u64) {
581 if (r7 as i64) <= 0 {
590 if (r7 as i64) > -1 {
591 r1 = *((r8 + 0x80) as *const u64);
592 r2 = *((r8 + 0x88) as *const u64);
593 local_ff0 = *((r8 + 0x90) as *const u8);
596 r0 = fn_2a518(local_3f8, local_418, local_410, r6, fp);
599 local_2e0 = -0x8000000000000000;
601 r0 = fn_44198(local_3f0, &local_2e0);
602 r0 = fn_c2a8(&local_1c0);
603 r0 = fn_c2c8(&local_1d8);
604 r0 = fn_c2e8(&local_208);
605 r0 = fn_c288(&local_220);
607 r0 = fn_d058(local_3e8 + 0x20);
611 *((r1 + 0x10) as *mut u64) = r9;
612 *((r1 + 8) as *mut u64) = r3;
613 *((r1) as *mut u64) = 4;
614 r0 = fn_c2a8(&local_1c0);
615 r0 = fn_c2c8(&local_1d8);
616 r0 = fn_c2e8(&local_208);
617 r0 = fn_c288(&local_220);
619 r0 = fn_d058(local_3e8 + 0x20);
622 r0 = fn_c2a8(&local_1c0);
623 r0 = fn_c2c8(&local_1d8);
624 r0 = fn_c2e8(&local_208);
625 r0 = fn_c288(&local_220);
627 r0 = fn_d058(local_3e8 + 0x20);
631 local_2e0 = -0x8000000000000000;
633 r0 = fn_44198(local_3f0, &local_2e0);
634 r0 = fn_c2a8(&local_1c0);
635 r0 = fn_c2c8(&local_1d8);
636 r0 = fn_c2e8(&local_208);
637 r0 = fn_c288(&local_220);
639 r0 = fn_d058(local_3e8 + 0x20);
643 *((r1 + 0x10) as *mut u64) = r9;
644 *((r1 + 8) as *mut u64) = r3;
645 *((r1) as *mut u64) = 4;
646 r0 = fn_c2a8(&local_1c0);
647 r0 = fn_c2c8(&local_1d8);
648 r0 = fn_c2e8(&local_208);
649 r0 = fn_c288(&local_220);
651 r0 = fn_d058(local_3e8 + 0x20);
657 /* continues at L_37840; not expressible as structured Rust */● an edge Rust can't hold
661 *((r1 + 0x10) as *mut u64) = 0;
662 *((r1 + 8) as *mut u64) = 0;
663 *((r1) as *mut u64) = 4;
664 r0 = fn_c2a8(&local_1c0);
665 r0 = fn_c2c8(&local_1d8);
666 r0 = fn_c2e8(&local_208);
667 r0 = fn_c288(&local_220);
669 r0 = fn_d058(local_3e8 + 0x20);
674 /* continues at L_376a0; not expressible as structured Rust */● an edge Rust can't hold
679 r0 = fn_c2a8(&local_1c0);
680 r0 = fn_c2c8(&local_1d8);
681 r0 = fn_c2e8(&local_208);
682 r0 = fn_c288(&local_220);
684 r0 = fn_d058(local_3e8 + 0x20);
687 r0 = fn_c2c8(&local_1d8);
688 r0 = fn_c2e8(&local_208);
689 r0 = fn_c288(&local_220);
691 r0 = fn_d058(local_3e8 + 0x20);
695 local_a8 = local_2c8;
696 local_b0 = local_2d0;
698 r0 = fn_1bc8(local_3f0, &local_b8);
700 r0 = fn_c2e8(&local_208);
701 r0 = fn_c288(&local_220);
703 r0 = fn_d058(local_3e8 + 0x20);
706 r0 = fn_c288(&local_220);
708 r0 = fn_d058(local_3e8 + 0x20);
712 r0 = memcpy(local_3f0, &local_b8, 0xa0);
715 r0 = fn_d058(local_3e8 + 0x20);