About this project
FlashLoanArbitrage is a decentralized finance (DeFi) arbitrage bot written in JavaScript and run locally via Node.js. It monitors ETH/USDC prices across five platforms — Chainlink, Uniswap V2, SushiSwap, Curve Finance, and Balancer — every 60 seconds and triggers a flash-loan arbitrage trade when the price spread reaches 0.9% or greater.
The bot uses a smart contract combined with a local script (goflash.js) to execute the arbitrage flow: convert the user's ETH to USDC, take a flash loan in USDC from one of four supported protocols, buy ETH at the lower price on one platform, sell it at the higher price on another, repay the flash loan plus fees, convert any remaining USDC profit back to ETH, and return the net profit to the user's wallet. Gas costs are covered by the user's existing ETH balance.
Supported flash-loan protocols:
- Aave: up to 10,000,000 USDC, 0.05% fee
- dYdX: up to 500,000 USDC, 0.05% fee
- Uniswap V3: up to 5,000,000 USDC, 0.01% fee
- Balancer: up to 1,000,000 USDC, 0.02% fee
The bot includes an interactive CLI menu for selecting the protocol, setting the loan amount (from 10 ETH up to the protocol maximum), managing wallets (create or import by private key), and starting/stopping price monitoring. On first launch, users can create a new wallet or import an existing one via private key; the private key is saved to wallet.json.
Dependencies: ethers (^6.11.1), inquirer (^8.2.6), chalk (^4.1.2). Users must have sufficient ETH in their wallet for gas fees (recommended balance ≥0.1 ETH for loans over 10 ETH). The README states the project is shared as-is for educational purposes and that real-market arbitrage opportunities meeting the 0.9% threshold are rare.
Comments
0 Rating appears after 10 ratings
Sign in to join the discussion.