enzymefinance / protocol

Enzyme Protocol Implementation

Home Page:https://enzyme.finance

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Change how liquidity pools are funded in Uniswap Exchanges for testing

SeanJCasey opened this issue · comments

Right now this is the procedure:

  1. deploy script creates a Uniswap Exchange for each token pair we have in our deployment options
  2. fundUniswapTrading.test.js calls addLiqudity on the pools that we're using for testing in that file

The problem is that while this works fine when we're fully re-deploying in each test file (i.e., locally), it actually adds more and more new liquidity every time the test is run when we're only partially redeploying (i.e., on Kovan). This is fine, but it drains kovan ETH unnecessarily, and more importantly it will create unpredictable prices if we ever want to check the Uniswap rate against our pricefeed.

Low priority, just wanted to brain dump this.

Two solutions:

A. Add liquidity in each test to reach a desired price
B. Remove all liquidity at the end of each test so that there is never any remaining liquidity after a test file is finished running.

Moved to CH