About this project
FlashLoanArbitrage is a Node.js command-line bot published for flash-loan arbitrage on DeFi. According to its README, it pairs an on-chain smart contract with a local script, goflash.js, that runs on the user's own machine. The repository is described by its author as shared "as-is for educational purposes" and used at the reader's own risk.
How it is described as working: the contract takes a flash loan denominated in USDC, the script converts the user's ETH to USDC beforehand, ETH is bought on one venue and sold on another, the loan plus fees and gas are repaid, and the remaining USDC profit is converted back to ETH. The script polls ETH/USDC prices every 60 seconds and only triggers a trade when the spread between platforms reaches 0.9% or more; below that it waits.
Price sources and loan venues. For flash loans the README lists Aave (stated fee 0.05%, 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). For price scanning it lists Chainlink as an oracle for the base ETH price, plus Uniswap V2, SushiSwap, Curve Finance and Balancer. The console output shows each venue's price with up/down/unchanged indicators and the maximum spread between platforms.
Installation and use. The instructions are to obtain goflash.js and package.json, place them in any folder, run npm install, then node goflash.js. On first launch an interactive prompt (built with inquirer) asks whether to create a new wallet or import an existing one by private key starting with 0x. Generated keys are written to wallet.json in the same folder. A text menu then offers: DeFi (choose the flash-loan protocol), Loan Amount in ETH, Recreate Wallet, Import Wallet, Start Arbitrage and Exit. Dependencies listed are ethers ^6.11.1, inquirer ^8.2.6 and chalk ^4.1.2.
Stated constraints and costs. The README says loan amounts run from 10 ETH up to the selected protocol's maximum, and warns that wallets holding under 0.1 ETH should not take loans above 10 ETH because gas would not be covered. It mentions trading fees of 0.1%, slippage of 0.05% and gas costs as deductions from gross profit. It also states that the wallet balance is used only for gas and that ETH is not transferred to the contract.
Caveats worth flagging. The README itself says that a 0.9% cross-venue spread is rare in real markets and that the script "shows a simulated opportunity occasionally for demonstration" — meaning displayed output may not correspond to a live executable trade. The project also asks users to create or import a private key into a plaintext wallet.json file; its own security section advises never committing that file, adding it to .gitignore, keeping offline backups, using a dedicated wallet for the bot, starting with small amounts and never sharing the key. Anyone evaluating this software should treat private-key custody and the accuracy of advertised returns as the central risks, and should verify the referenced contract address and script behaviour independently rather than relying on the README's examples.
The README also includes a troubleshooting section for common errors: module-format errors, invalid private key format, insufficient funds, zero wallet balance, RPC unavailability, missing ETH/USDC pairs on V2, and failure to find arbitrage opportunities. The described project layout is goflash.js, package.json, wallet.json and README.md.
Comments
0 Rating appears after 10 ratings
Sign in to join the discussion.