Skip to content

FreedomParrot/SuccesfullArbitrageBotKaminoFlashloan

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

⚡ Kamino-Jupiter Atomic Arbitrage Bot (TS Edition)

"Code is the ultimate equalizer." This bot was born as an act of resistance against the culture of secrecy and gatekeeping. While major players build walls, we open-source our tools. This bot utilizes Kamino Flash Loans to allow anyone to execute arbitrage strategies without needing millions in startup capital.


🛠 How it Works (The Tech Stack)

The bot leverages Solana’s speed and Jupiter’s liquidity to find price discrepancies between two tokens (e.g., USDC and SOL) in real-time.

1. Atomic Execution

Everything happens in one single transaction. If the final sell doesn't yield enough to repay the Kamino loan plus the fee, the entire transaction fails on-chain. Zero capital risk for the user.

2. Flash Loans via Kamino Finance

The bot utilizes the Kamino Lending protocol to borrow assets instantly. The fee is a mere 0.01% (1 bps), allowing for high-leverage trades that would otherwise be impossible for retail users.

3. Smart Routing & V0 Transactions

  • Jupiter Quote API (V1): Finds the most efficient swap routes to minimize slippage.
  • Versioned Transactions (V0): Full support for Address Lookup Tables (ALTs) to squeeze complex multi-instruction logic into a single transaction.

🚀 Key Features

  • Instruction Decompilation: Automatically extracts and reconstructs instructions from Jupiter swap transactions into a custom atomic message.
  • Dynamic Compute Budget: Real-time adjustment of Compute Units and Priority Fees to ensure inclusion during network congestion.
  • Safety Buffers: Built-in checks for price impact and profit margins to protect against toxic trades.
  • CLI Powered: Easy-to-use command line interface for rapid deployment and balance monitoring.

🔧 Installation & Usage

Prerequisites

  • Node.js & npm/yarn
  • A keypair.json file with a small amount of SOL (approx. 0.05 SOL) to cover transaction fees.

Setup

  1. Clone the repository:
git clone https://github.com/FreedomParrot/SuccesfullArbitrageBotKaminoFlashloan.git
cd solana-arb-bot
  1. Install dependencies:
yarn install

Running the Arbitrage Loop

To start searching for opportunities between USDC and SOL:

yarn start simple-jupiter-arb \
  --keypair ./keypair.json \
  --token-mint1 EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v \
  --token-mint2 So11111111111111111111111111111111111111112 \
  --amount 100 \
  --slippage-bps 50 \
  --min-profit 0.1

📊 CLI Parameters

Flag Description
-m1, --token-mint1 The token you borrow (Flash Loan target).
-m2, --token-mint2 The token you are trading against.
-a, --amount Flash loan amount (in tokens, not lamports).
-p, --min-profit Minimum net profit required to trigger execution.
-s, --slippage-bps Slippage tolerance in basis points (100 bps = 1%).
-c, --compute-price Priority fee in micro-lamports.

🛡 Ethical Disclaimer

Greed erodes ecosystems. This bot is a tool for empowerment and education.

  • Risk: Never trade with funds you cannot afford to lose.
  • Competition: Arbitrage is a "Red Queen's Race." Others are running similar bots.
  • Well-being: Don't let market volatility affect your mental health. Technology should serve us, not stress us.

❤️ Contributing

If you find a way to optimize instruction deduplication or want to add support for more Lending Markets, please open a Pull Request!

"Built by the people, for the people. Against greed, for freedom."

About

I opensourcing my bot to the public !

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors