Practical overview
When it fits
Use it when you need a codebase for configuring a flash-swap strategy that compares prices for the same token pair across Uniswap V2-style pools and related forks.
Who it is for
- Developers who want to study or configure a contract-and-bot arbitrage workflow across AMM pools.
- Users familiar with Hardhat, wallet secrets and network-specific smart-contract configuration.
Documented uses
- Estimate potential arbitrage profit between two pools in a base token.
- Configure token and DEX lists that determine which pairs the bot monitors.
- Deploy the flash-swap contract and invoke the bot’s documented arbitrage workflow.
- Withdraw contract-held profit using the owner-only withdrawal function.
Requirements & limits
- The implementation combines a Solidity contract with a TypeScript bot and uses Hardhat for deployment and tests.
- The documented profit estimate is obtained through getProfit(pool1, pool2); flashArbitrage(pool1, pool2) is the execution call.
- The bot’s monitored pairs are configured in tokens.ts and generated into a reusable JSON file.
- The contract is configured for Ethereum in the README example; other network setups require edits to network and token-address configuration.
- Flash-swap repayment conditions must be met within the transaction, and the README notes transaction fees.
Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.
Prepare the contract deployment configuration
Set up the documented network and wallet configuration before deploying the flash-swap contract.
Before you start
- The project repository and its Hardhat configuration files.
- A private key and wallet address for the local secret configuration.
- A network configuration and token address appropriate to the intended deployment.
Steps
Edit the network settings in hardhat.config.ts.
Copy .secret.ts.sample to .secret.ts and edit its private key and wallet address fields.
Check the token address in deploy.ts; the README says the sample is set to WKCS by default.
Use the documented Hardhat deployment script for the selected network.
Expected outcome
The repository’s deployment configuration is prepared and the documented script can be invoked for the selected network.
Guide limitations
- The README’s default example is Ethereum; another EVM network requires configuration changes.
- The documentation does not verify compatibility with a specific network or token configuration.
- The guide covers the documented setup and deployment invocation, not a confirmed successful deployment.
Configure token pairs monitored by the bot
Change the documented base tokens, quote tokens and DEX settings used to generate monitored pairs.
Before you start
- The project repository and its bot configuration in tokens.ts.
Steps
Edit ethBaseTokens, ethQuoteTokens and ethDexes in tokens.ts.
Delete the existing generated pair JSON file so the bot will create a fresh pair list.
Rerun the bot using the documented Yarn command.
Inspect the regenerated pair list in the corresponding JSON file.
Expected outcome
The bot regenerates its monitored token-pair list from the edited settings and stores it in a JSON file for reuse.
Guide limitations
- The README’s pair-file naming varies between its Ethereum and KCC examples.
- This guide describes configuration behavior, not profitable opportunities or successful trades.
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 17 October 2026
- Original website title
- gweidart/evm-flashswap-arb · Official homepage title · retained in its source language

