Skip to content

Mithreum/balancer-assignment

Repository files navigation

Sample Assignment

Usage

  1. Deploy the contract on the required EVM chain
  2. Populate the variables with the relevant data for tokens A & B
  3. Run the script

Deployd contracts:

Polygon

Testing

  1. Install the required dependencies
python3 -m venv venv
source venv/bin/activate
pip install requests
  1. Replace the variables with the required values

  2. Run the script

python3 getSlippage.py

Response example: for USDC / WMATIC, amount 1_000_000_000

USDC / WMATIC
 Expected($):    1000.02998 
 Actual  ($):    993.344667370729 
 Slippage($):    6.6853126292710385 
 Slippage(%):    0.67%

Deployed contracts (OLD)

Gnosis Ethereum Polygon

Deployed Contracts (New)

Polygon Gnosis

About

Hypernative

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published