About this project

FlashLoanArbitrage is a decentralized finance (DeFi) arbitrage bot written in JavaScript. It monitors ETH/USDC prices across five platforms—Chainlink (as oracle baseline), Uniswap V2, SushiSwap, Curve Finance, and Balancer—and triggers arbitrage trades via smart contract flash loans when price differences reach at least 0.9%. The bot supports four flash loan protocols: Aave, dYdX, Uniswap V3, and Balancer, each with different fee structures and liquidity limits. The workflow converts the user's ETH to USDC, takes a flash loan, buys ETH on the cheaper platform, sells on the more expensive one, repays the loan plus fees, and returns the net profit to the user's wallet. Usage requires downloading goflash.js and package.json, installing Node.js dependencies via npm, and running the script. On first launch, users create or import an Ethereum wallet; the private key is saved to wallet.json. The interactive CLI menu lets users select a protocol, set loan amounts, and start price monitoring. The script polls prices every 60 seconds, displays real-time price data with directional arrows, and only executes when the spread threshold is met. Users are advised to maintain at least 0.1 ETH in their wallet for gas costs, especially when taking larger loans. The project is shared as-is for educational purposes and carries inherent financial risk from smart contract interaction, gas costs, slippage, and market volatility.