About this project
FlashLoanArbitrage (published under the repository name flashloan-routing-engine) is an English-language educational project that pairs a Solidity smart contract with a local Node.js script, goflash.js, for ETH/USDC flash-loan arbitrage on Ethereum DeFi venues.
How the README describes the workflow: the contract takes a flash loan denominated in USDC, uses the borrowed funds to buy ETH on the venue quoting the lower price and sell it on the venue quoting the higher one, repays the loan plus fees and gas, converts the remaining profit, and leaves the net result with the user. The borrowing leg is documented as supporting 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 notes that the flash-loan fee scales with loan size, so it advises keeping the loan modest relative to wallet balance.
The companion script goflash.js polls ETH/USDC prices roughly every 60 seconds from Chainlink as an oracle reference, plus Uniswap V2, SushiSwap, Curve Finance and Balancer, prints them with up / down / unchanged indicators, and only signals arbitrage when the observed spread is at least 0.9%. It also reports the maximum price difference across venues.
Running it, per the instructions: download goflash.js and package.json into any folder, run npm install, then node goflash.js. Listed dependencies are ethers ^6.11.1, inquirer ^8.2.6 and chalk ^4.1.2. On first launch an interactive menu offers to create a new wallet or import an existing one by private key; the key is written to wallet.json in the same folder. The menu then exposes DeFi protocol selection, loan amount in ETH, wallet recreation, wallet import, Start Arbitrage and Exit.
Caveats stated in the README itself: trading fees (listed as 0.1%) and 0.05% slippage plus gas are deducted before net profit; a wallet below 0.1 ETH is described as insufficient to cover gas for loans above 10 ETH; and the README acknowledges that a 0.9% spread is rare in real markets and that the script occasionally displays a simulated opportunity for demonstration purposes. A troubleshooting section covers module-format errors, invalid private key format, insufficient funds and RPC reconnection.
Security guidance included in the README asks users not to commit wallet.json, to add it to .gitignore, to keep offline private-key backups, to use a dedicated wallet and to start with small amounts. The project is described as shared as-is for educational purposes, with use at the user's own risk.
For anyone evaluating it: the design stores a plaintext private key in a local JSON file and involves funding a wallet with ETH for gas, so those remain material considerations; the contract and script should be reviewed before any funds are moved, and no profitability is claimed or evidenced by the material.
Comments
0 Rating appears after 10 ratings
Sign in to join the discussion.