Giter VIP home page Giter VIP logo

jit-liquidity-strategy's Introduction

JIT-Liquidity-Strategy

Building a Just-in-time (“JIT”) liquidity bot on top of the Ethereum pending transaction stream.

Config

The JIT service consumes a config.yaml file which specified its runtime parameters. The service establishes a connection to the Ethereum mainnet in order to monitor the pending Ethereum transactions pool. We watch for Uniswap V2 transactions and use the Web3 API with a local Anvil node and an external mainnet provider to extract all information necessary to determine whether performing a JIT attack is desirable.

To install Anvil, enter the following in the terminal window:

curl -L https://foundry.paradigm.xyz | bash
brew install libusb
foundaryup

Example config.yaml file:

provider: infura
api_key: <YOUR INFURA KEY HERE>
abi_json_path: ./abi
tx_retry_times: 2
tx_retry_period: 1000
api_server_address: 127.0.0.1:8000

tx_retry_interval is in milliseconds.

Run

cargo run <optional: /path/to/config.yaml>

Important links

jit-liquidity-strategy's People

Contributors

oleggolev avatar

Stargazers

Amin Abbasi avatar  avatar  avatar Jiachen Wang avatar Moin Mir avatar

Watchers

Kostas Georgiou avatar  avatar

Forkers

0xjchen

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.