About this project
What it is
FlashLoanArbitrage is a local command-line script (goflash.js) for experimenting with flash-loan arbitrage on Ethereum-style DeFi markets. It runs on the user's own machine, is driven by an interactive menu, and is distributed through a repository containing the script, a package.json and a README. The README presents the project as educational material to be used at the user's own risk.
How it works
On start the script offers wallet options: generate a new wallet, or import an existing one by private key. The resulting key is written to a wallet.json file in the same folder. The menu then offers four flash-loan back-ends (Aave, dYdX, Uniswap V3, Balancer), a loan-amount setting expressed in ETH, wallet recreation and import, a start/stop control for arbitrage, and exit.
While running, the script polls ETH/USDC reference prices roughly every 60 seconds from five sources: Chainlink as the oracle base, plus Uniswap V2, SushiSwap, Curve Finance and Balancer as venues. It displays the current values with up/down/unchanged indicators and reports the maximum spread across sources. Only when the spread reaches about 0.9% does it hand off to the arbitrage contract; otherwise it keeps waiting. The README states that such spreads are rare in real markets and that a simulated opportunity is occasionally shown for demonstration purposes.
The described contract flow is: take a flash loan in USDC, buy ETH on the cheaper venue, sell on the dearer one, repay the loan and its fee, settle trading fees, slippage and gas, then convert remaining profit back to ETH.
Setup and dependencies
The only dependencies listed are ethers, inquirer and chalk. Usage is: place goflash.js and package.json in a folder, run npm install, then node goflash.js, and follow the prompts. Troubleshooting notes in the README cover module-format errors, private-key format validation, insufficient funds for gas, RPC reconnection and missing trading pairs.
What to watch for
- The README describes an on-chain contract, but the project structure it lists contains only the script, package.json, wallet.json and the README itself; the contract source is not shown there, so the on-chain half cannot be inspected from the listing.
- The wallet file stores a private key in plaintext on disk. The README itself advises adding wallet.json to .gitignore, keeping offline backups, using a dedicated wallet and never sharing the key.
- The README warns that a wallet below roughly 0.1 ETH should not take loans above 10 ETH because gas may not be covered, and that costs include flash-loan fees, about 0.1% trading fees, 0.05% slippage and gas.
- No independent performance, profitability or correctness claims are evidenced by the repository content; the described behavior is the author's own account, and the project is explicitly labelled as shared as-is for educational purposes.
Comments
0 Rating appears after 10 ratings
Sign in to join the discussion.