Fix Solana Trading Bot Errors

Job ID: 39983414

Budget: $30 – $250 USD

My Solana-based trading bot has suddenly started throwing on-chain errors every time it tries to execute a swap—whether it’s a buy or a sell. The transaction reaches “finalized (MAX confirmations)” but then fails with:

• Instruction #6 Failed – custom program error: 6001
• Instruction #3 Failed – custom program error: 6024

These appear only when the bot calls the JUT route to purchase or liquidate a token, so I suspect an issue in my program logic, CPI call, or account constraints rather than network congestion. All other steps (signature, fee payer, funding) clear without issues.

What I need from you
1. Pinpoint the root cause of errors 6001 and 6024 inside the Solana program.
2. Patch the code so the bot completes both buy and sell instructions successfully.
3. Supply a concise write-up of the fix so I can maintain it going forward.

You’re free to work in your preferred environment—Anchor, Solana-web3.js, or raw Rust—so long as the final result is a stable program I can deploy and test on main-net. Once your patch lets me buy and sell the target token without the above failures, the job’s done.