alextcn
dex-arbitrage
TypeScript

DEX arbitrage bot

Last updated Jun 28, 2026
77
Stars
38
Forks
0
Issues
0
Stars/day
Attention Score
46
Language breakdown
TypeScript 41.0%
Solidity 37.1%
JavaScript 21.9%
Files click to expand
README

DEX arbitrage bot

The DEX arbitrage bot tracks price difference between DEX exchanges and calculates optimal trade size and profit.

Supported DEXs

  • Uniswap V2
  • Balancer V2
  • Uniswap V3 (soon)
You can search for arbitrage opportunities across any pair of supported DEXs, such as Uniswap V2 & Sushiswap, Uniswap V2 & Balancer V2, Sushiswap & Balancer V2, etc.

Features

  • Multiple exchanges, routes, and tokens
  • Minimum trade profit
  • Finds optimal trade size (binary search – soon)

Install

1. Install Hardhat

npm install --save-dev hardhat

2. Create .env and set Alchemy API key to ALCHEMYAPIKEY

3. Set Ethereum address private key to PRIVATE_KEY in .env

Run

Run mainnet fork node on localhost: npx hardhat node --fork https://eth-mainnet.alchemyapi.io/v2/[API_KEY]

Deploy contracts: npx hardhat --network localhost run scripts/deploy.js

Open console: npx hardhat --network localhost console

Run bot: npx hardhat --network localhost run scripts/trade.js

© 2026 GitRepoTrend · alextcn/dex-arbitrage · Updated daily from GitHub