About this project

The README presents FlashLoanArbitrage as an educational DeFi arbitrage bot built around a local goflash.js script and a smart contract. On first run, the interactive CLI asks the user to create a new wallet or import one via private key; the key is saved to wallet.json in the same folder. The main menu lets users choose a flash-loan protocol (Aave, dYdX, Uniswap V3, or Balancer), set a loan amount in ETH, recreate or import a wallet, start arbitrage, or exit. The bot scans ETH/USDC prices on Chainlink, Uniswap V2, SushiSwap, Curve Finance, and Balancer, displaying prices with up/down indicators and the maximum spread. It waits for a price difference of at least 0.9% before triggering an arbitrage attempt through the contract, with the stated intent of covering flash-loan fees, trading fees (0.1%), slippage (0.05%), and gas. The README notes that the script converts ETH to USDC before a deal and converts profit back to ETH, and that wallet balance is used only for gas. It recommends dYdX or Uniswap V3 for lower fees and warns that loans over 10 ETH require sufficient gas balance. Dependencies include ethers, inquirer, and chalk. The README also includes troubleshooting and security advice: never share wallet.json or private keys, add wallet.json to .gitignore, use a dedicated wallet, and start with small amounts. It states that real 0.9% spreads are rare and that a simulated opportunity may occasionally be shown for demonstration. The project is shared as-is for educational purposes, and no performance or profitability claims are made here.