About this project

FlashLoanArbitrage is a small Node.js project for Ethereum DeFi trading with flash loans. The repository listing describes it as a DeFi portfolio manager, but the README itself documents a flash-loan arbitrage bot made of a local script (goflash.js) plus a companion smart contract. How it works The script compares ETH/USDC prices across five sources: a Chainlink oracle used as the base price, Uniswap V2, SushiSwap, Curve Finance and Balancer. It waits for a price difference of at least 0.9% between venues before acting; below that threshold it keeps monitoring to avoid loss-making trades. When the spread is large enough, the flow described in the README is: convert the user's ETH to USDC up front, have the contract take a flash loan in USDC, buy ETH on the cheaper platform, sell it on the more expensive one, repay the loan plus flash-loan fee and gas, then convert the remaining profit from USDC back to ETH. The README states the wallet balance is used only for gas and that ETH is not transferred into the contract. Flash-loan providers and limits Four protocols are listed as flash-loan sources, each with an advertised fee and maximum loan size in USDC: Aave (0.05%, up to 10,000,000), dYdX (0.05%, up to 500,000), Uniswap V3 (0.01%, up to 5,000,000) and Balancer (0.02%, up to 1,000,000). The README notes that larger loans mean larger fees and recommends dYdX or Uniswap V3 for lower fees. Setup and usage The instructions are for a local machine: obtain goflash.js and package.json, place them in any folder, run npm install, then node goflash.js. On first launch the script offers to create a new wallet (address and private key are shown and the key is saved to wallet.json in the same folder) or import an existing wallet from a 0x-prefixed private key. After that an interactive terminal menu appears, showing wallet balance and address, with entries for choosing the DeFi protocol, setting the loan amount in ETH, recreating the wallet, importing another wallet by private key, starting arbitrage, and exiting. The arbitrage mode is documented as scanning prices on all platforms roughly every 60 seconds and printing a live price table with up/down/unchanged indicators plus the maximum observed spread. Warnings and behaviour notes The README repeatedly warns about private-key hygiene: never share wallet.json or the key, add it to .gitignore, keep offline backups and use a dedicated wallet. It also cautions that a wallet balance below 0.1 ETH is not enough to service loans above 10 ETH because of gas, and it lists the costs taken into account (trading fees 0.1%, slippage 0.05%, gas, flash-loan fee). A troubleshooting section covers module-format errors, invalid private key format, insufficient funds, RPC unavailability and missing V2 pairs. It states plainly that 0.9% price gaps are rare in real markets, that a simulated opportunity is shown occasionally for demonstration, and that the project is shared as-is for educational purposes and used at the owner's own risk. Technical details The project is a JavaScript/Node.js application with three dependencies: ethers (^6.11.1) for Ethereum interaction, inquirer (^8.2.6) for the interactive CLI and chalk (^4.1.2) for coloured console output. The documented file layout is just goflash.js, package.json, the auto-generated wallet.json and the README. No licence terms beyond the educational-use and use-at-your-own-risk statement are given, and no tests, deployment scripts or public performance results are described.