About this project

The README is titled FlashLoanArbitrage and describes a DeFi flash loan arbitrage bot built around a local Node.js script, goflash.js, and a smart contract. The repository description says it tracks and reports yield from various DeFi positions, but the README's actual subject is arbitrage execution, not yield tracking or reporting. According to the documentation, the smart contract takes a flash loan in USDC, converts the user's ETH to USDC before the trade, buys ETH at a lower price on one platform, sells ETH at a higher price on another, repays the loan, pays fees and gas, converts profit from USDC back to ETH, and leaves the remainder as profit. The local goflash.js script is described as checking ETH/USDC prices on five sources: Chainlink, Uniswap V2, SushiSwap, Curve Finance, and Balancer. It waits for a price difference of 0.9% or more before triggering arbitrage through the contract; below that threshold it waits to avoid losses. The README lists four flash loan protocols: Aave (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). It recommends dYdX or Uniswap V3 for lower fees. Loan amounts are set in ETH, described as selectable from 10 ETH up to the protocol maximum. The documentation warns that if the wallet balance is below 0.1 ETH, a loan over 10 ETH should not be chosen because gas may not be covered. The setup section explains downloading goflash.js and package.json, installing npm dependencies, and running node goflash.js. On first launch, the script reportedly asks the user to create a new wallet or import an existing one by private key, saving the private key to wallet.json. The main menu is described as offering DeFi protocol selection, loan amount in ETH, recreate wallet, import wallet, start arbitrage, and exit. The script displays wallet balance, wallet address, and live prices with up/down indicators. Dependencies are listed as ethers, inquirer, and chalk. The price monitoring display shows ETH/USDC prices from Chainlink, Uniswap V2, SushiSwap, Curve Finance, and Balancer, plus the maximum price difference between platforms. Safety and risk warnings are prominent: do not commit wallet.json to Git, add it to .gitignore, keep offline backups of the private key, use a dedicated wallet for the bot, start with small amounts, and never share the private key. The README also mentions trading fees (0.1%), slippage (0.05%), gas fees, and flash loan fees. Troubleshooting covers module format errors, invalid private key format, insufficient funds, zero wallet balance, RPC unavailability, missing ETH/USDC pair on V2, and failure to find arbitrage opportunities. It notes that such price differences are rare in real markets and that the script occasionally shows a simulated opportunity for demonstration. Overall, the README presents an automated DeFi flash loan arbitrage script with wallet management, multi-platform price monitoring, protocol selection, and risk disclaimers. It is positioned as shared as-is for educational purposes and used at the user's own risk. A notable discrepancy is that the repository name and description suggest yield tracking, while the README describes arbitrage.