🧪 Swift Yield is an advanced Flash Loan Arbitrage bot that harnesses the power of flash loans from Balancer to perform arbitrage trading across various decentralized exchanges (DEXs) on Base Mainnet
Currently, Three Decentralised Exchanges are integrated
-
✅ Uniswap V2: Factory Contract Address, V2Router02 Contract Address can be found here
-
🧱 Sushiswap V2: Factory Contract Address, V2Router02 Contract Address can be found here
-
🧱 Pankcake Swap V2: Factory Contract Address, V2Router02 Contract Address can be found here
Based on Uniswap V2 Code/Smart Contracts there are 643 Forked Protocols. So we can integrate hundreds of DEX into this bot.
The Flash Loan Smart Contract is deployed on Tenderly's Base Mainnet Virtual Testnet.
You can access the Public Explorer from here [https://dashboard.tenderly.co/explorer/vnet/753ba0a6-023a-4c8d-b3e4-60f03d6dc4b7/transactions?kind=standard]
One more major component here is World ID
World ID is a digital identity solution that enables users to anonymize their uniqueness and humanity via zero-knowledge proofs and advanced privacy-preserving cryptography.
-
Visit https://swiftyield.vercel.app/ and click on start arbitrage, verify yourself with World ID, then deploy the contract.
-
After the contract is deployed copy the contract address.
-
Clone this repo and run
yarn install
- Then Run the bot by running this command
yarn bot
You can use npm instead of yarn
You can then check the transaction here [https://dashboard.tenderly.co/explorer/vnet/753ba0a6-023a-4c8d-b3e4-60f03d6dc4b7/transactions?kind=standard]
Note: Some Transactions may fail because of the gas fees issue, we are optimizing the contract code
⚙️ This application is built using Scaffold Eth 2.
Before you begin, you need to install the following tools:
- Node (>= v18.17)
- Yarn (v1 or v2+)
- Git
To get started with Swift Yield Development, follow the steps below:
- Install Tenderly CLI
curl https://raw.githubusercontent.com/Tenderly/tenderly-cli/master/scripts/install-macos.sh | sh
- Then login (create an account first)
tenderly login
- Clone this repo & install dependencies
git clone https://github.com/SudeepGowda55/SwiftYield.git
cd SwiftYield
yarn install
- To deploy the contract to tenderly:
Create packages/tenderly/.env
# https://docs.tenderly.co/account/projects/account-project-slug
TENDERLY_ACCOUNT_ID=
TENDERLY_PROJECT_ID=
# https://docs.tenderly.co/account/projects/how-to-generate-api-access-token
TENDERLY_ACCESS_TOKEN=
Create packages/hardhat/.env
ALCHEMY_API_KEY= # leave empty
# DEPLOYER_PRIVATE_KEY=
ETHERSCAN_API_KEY= # leave empty
# https://docs.tenderly.co/account/projects/account-project-slug
TENDERLY_ACCOUNT_ID=
TENDERLY_PROJECT_ID=
# https://docs.tenderly.co/account/projects/how-to-generate-api-access-token
TENDERLY_ACCESS_TOKEN=
TENDERLY_AUTOMATIC_VERIFICATIONS=true
Create a staging environment
Note: use different environment name (test-1) every time
cd packages/tenderly
yarn stage:new test-1 8453
yarn stage:activate test-1
yarn stage:connect:hardhat
yarn stage:connect:nextjs
Now deploy the contract by running
cd packages/hardhat
yarn deploy --network virtual_mainnet
Now the contract will be deployed
- To start NextJS app:
cd packages/nextjs
yarn dev
Visit the app on: http://localhost:3000. You can tweak the app config in packages/nextjs/scaffold.config.ts.
- Now to interact with the bot and perform Flash Loan Arbitrage run the following commands in shell:
cd packages/bot
node arbitrageBot.js


