Giter Site home page Giter Site logo

uniswap_market_impact's Introduction

uniswap_market_impact

Some scripts to calculate the swap quantities required for a specific amount of price impact in a Uniswap V2 pool.

See README.pdf for an explanation of the calculations required.

See main.py for an example calculation.

Note, this repository requires a .env file of the format:

POOL = 'UNISWAP_V2_POOL_ON_ETHEREUM'
ETHERSCAN_TOKEN = 'ETHERSCAN_API_KEY'

Unit tests for this library can be run using python -m pytest tests.

These unit tests require a local fork of the Ethereum network, which can be configured as follows:

development:
- cmd: ganache-cli
  cmd_settings:
    accounts: 10
    fork: https://eth-mainnet.g.alchemy.com/v2/[ALCHEMY-API-KEY]
    mnemonic: brownie
    port: 8545
  host: http://127.0.0.1
  id: uniswap-market-impact2
  explorer: https://api.etherscan.io/api
  name: uniswap-market-impact2

uniswap_market_impact's People

Contributors

jakexbt avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.