About this project

FlashLoanArbitrage is a Node.js command-line project combining a main script (goflash.js) with an interactive terminal menu, aimed at flash-loan arbitrage between DeFi venues. According to the README, a companion smart contract takes a USDC flash loan, buys ETH on one platform and sells it on another, repays the loan plus fees and gas, converts remaining USDC profit back to ETH, and returns the net result to the user's wallet. Price monitoring: the script reads ETH/USDC prices from Chainlink (oracle), Uniswap V2, SushiSwap, Curve Finance and Balancer every 60 seconds, displays them with up/down/unchanged indicators, and reports the maximum price difference across venues. Arbitrage is attempted only when the spread reaches 0.9% or more. The README states this threshold exists to avoid losses, that such differences are rare in real markets, and that the script occasionally shows a simulated opportunity for demonstration. Flash-loan protocols: four are listed as supported — Aave (0.05% fee, up to 10,000,000 USDC), dYdX (0.05%, up to 500,000 USDC), Uniswap V3 (0.01%, up to 5,000,000 USDC) and Balancer (0.02%, up to 1,000,000 USDC). The README recommends dYdX or Uniswap V3 for lower fees and says loan amounts range from 10 ETH up to each protocol's stated limit. Usage flow: download goflash.js and package.json into a folder, run npm install, then node goflash.js. On first launch the CLI offers to create a new wallet or import an existing one by private key; the key is saved to wallet.json in the same folder. The menu then offers choosing the DeFi protocol, setting the loan amount in ETH, recreating or re-importing a wallet, starting arbitrage, and exiting. Dependencies listed are ethers (^6.11.1), inquirer (^8.2.6) and chalk (^4.1.2). Stated costs include trading fees (0.1%), slippage (0.05%) and gas; the README warns that wallets below 0.1 ETH should not take loans above 10 ETH because gas would not be covered. A troubleshooting section covers module-format errors, invalid private keys, insufficient funds, RPC reconnection, missing ETH/USDC V2 pairs, and the scarcity of opportunities. Security notes carried by the README: never commit or share wallet.json or the private key, add wallet.json to .gitignore, keep offline backups, use a dedicated wallet, and start with small amounts. The project is described as shared as-is for educational purposes and used at the user's own risk. The README provides no audit results, no track record of profits and no test coverage, and explicitly notes that real spreads of the required size are uncommon; private-key handling and any on-chain transfers should be treated with caution.