About this project
FlashLoanArbitrage is a decentralized finance arbitrage bot operating on Ethereum. It uses a Node.js script (goflash.js) paired with a smart contract to execute flash loan trades.
How it works:
- The script monitors ETH/USDC prices on five platforms: Chainlink (oracle baseline), Uniswap V2, SushiSwap, Curve Finance, and Balancer.
- When the price difference between platforms reaches 0.9% or more, the bot triggers a flash loan arbitrage through the smart contract.
- The contract takes a flash loan in USDC, buys ETH at the lower price on one platform, sells it at the higher price on another, repays the loan plus fees, and converts any remaining profit back to ETH.
Supported flash loan protocols:
- Aave: up to 10,000,000 USDC at 0.05% fee
- dYdX: up to 500,000 USDC at 0.05% fee
- Uniswap V3: up to 5,000,000 USDC at 0.01% fee
- Balancer: up to 1,000,000 USDC at 0.02% fee
Setup:
1. Download goflash.js and package.json from the repository.
2. Run npm install to install dependencies (ethers, inquirer, chalk).
3. Launch with node goflash.js.
4. On first run, create or import a wallet (private key saved to wallet.json).
5. Select a flash loan protocol, set loan amount, and start arbitrage.
The bot scans prices every 60 seconds and displays real-time prices with trend indicators. Users must maintain at least 0.1 ETH in their wallet for gas fees when taking loans over 10 ETH.
Dependencies: ethers ^6.11.1, inquirer ^8.2.6, chalk ^4.1.2.
The project is shared as-is for educational purposes.
Comments
0 Rating appears after 10 ratings
Sign in to join the discussion.