This project provides tools to calculate profits from Uniswap V3 and V4 pools, using Hardhat for task management and automation.
Ensure you have Node.js and npm installed, then install the required dependencies:
npm installPrints the list of supported chains.
npx hardhat chainsCalculates profit for a given account on a specified chain for a given period in days, with a parameter to ignore transactions with profit above a specified amount in USD.
npx hardhat calc --account {account} --chain {chain} --ignore {ignore} --days {days}account: Account address to calculate profit for.chain: Chain to perform the calculation on (runnpx hardhat chainsto see the list of supported chains).ignore: Ignore transactions with profit above this number in USD (recommended: 1000).
-
List the supported chains:
npx hardhat chains
-
Calculate profit:
npx hardhat calc --account 0xYourAccountAddress --chain eth-mainnet --ignore 1000
scripts/main.ts: Contains thecalculateProfitfunction to perform profit calculation.data/types.ts: Defines theSupportedChainstype and list.