From ae14895ff6d9e50f42cd8f9a00780259d7ba62cf Mon Sep 17 00:00:00 2001 From: Serge Farny Date: Wed, 9 Oct 2024 12:03:59 +0200 Subject: [PATCH] Router: increase base CU again (comparator is still failing often) --- bin/autobahn-router/src/ix_builder.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bin/autobahn-router/src/ix_builder.rs b/bin/autobahn-router/src/ix_builder.rs index 093c77b..71841ba 100644 --- a/bin/autobahn-router/src/ix_builder.rs +++ b/bin/autobahn-router/src/ix_builder.rs @@ -9,8 +9,8 @@ use solana_program::instruction::Instruction; use solana_program::pubkey::Pubkey; use std::str::FromStr; -const CU_PER_HOP_DEFAULT: u32 = 75_000; -const CU_BASE: u32 = 75_000; +const CU_PER_HOP_DEFAULT: u32 = 80_000; +const CU_BASE: u32 = 150_000; pub trait SwapStepInstructionBuilder { fn build_ix( @@ -146,13 +146,13 @@ impl SwapInstructionsBuilder for SwapInstructions for step in &swap_instructions { if auto_create_out || (step.out_mint == sol_mint && auto_wrap_sol) { Self::create_ata(&wallet_pk, &mut setup_instructions, &step.out_mint); - cu_estimate += 10_000; + cu_estimate += 12_000; } if step.out_mint == sol_mint && auto_wrap_sol { let wsol_account = get_associated_token_address(wallet_pk, &sol_mint); Self::close_wsol_ata(&wallet_pk, &mut cleanup_instructions, &wsol_account)?; - cu_estimate += 10_000; + cu_estimate += 12_000; } cu_estimate += step.cu_estimate.unwrap_or(CU_PER_HOP_DEFAULT);