Skip to content

fabw222/deepbook-arbitrage

ย 
ย 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

2 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿง  Deepbook Arbitrage Bot

A high-frequency arbitrage bot built on the Sui mainnet. It identifies profitable opportunities across DeepBook and 7kprotocol, and executes trades based on customizable slippage and interval settings.

๐Ÿš€ Getting Started

  1. Install dependencies
npm install
  1. Configure your settings Edit src/config.ts with your custom parameters:
export const config = {
  deepbookBalanceManagerId: 'YOUR_BALANCE_MANAGER_ID', // DeepBook Balance Manager ID
  suiRpcUrl: 'https://YOUR_CUSTOM_RPC_URL',            // Optional: Custom Sui RPC URL
  arbitrageSlippage: 0.01,                             // Trigger slippage for arbitrage (e.g., 0.01 = 1%)
  swapSlippage: 0.01,                                  // Slippage tolerance for base token swap via 7k (e.g., 0.01 = 1%)
  arbitrageInterval: 30000                             // Script run interval in milliseconds (e.g., 30000 = 30 seconds)
}
  1. Set your wallet private key Export your wallet private key as an environment variable:
export PRIVATE_KEY=YOUR_WALLET_PRIVATE_KEY
  1. Run the bot
ts-node src/main.ts

๐Ÿ›  Future Work

  1. Integrate flashloan support to maximize capital efficiency

  2. Use centralized exchanges (CEX) as hedge pools

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 100.0%