This project provides tools to calculate profits from Uniswap V3 pools, using Hardhat for task management and automation.
Ensure you have Node.js and npm installed, then install the required dependencies:
npm install
Prints the list of supported chains.
npx hardhat chains
Calculates profit for a given account on a specified chain for a given period (currently fixed at 1 month), 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 chains
to 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 thecalculateProfit
function to perform profit calculation.data/types.ts
: Defines theSupportedChains
type and list.