- Deploy the contract on the required EVM chain
- Populate the variables with the relevant data for tokens A & B
- Run the script
- Install the required dependencies
python3 -m venv venv
source venv/bin/activate
pip install requests-
Replace the variables with the required values
-
Run the script
python3 getSlippage.pyResponse example: for USDC / WMATIC, amount 1_000_000_000
USDC / WMATIC
Expected($): 1000.02998
Actual ($): 993.344667370729
Slippage($): 6.6853126292710385
Slippage(%): 0.67%