Coder Social home page Coder Social logo

lanturn's Introduction

Pre-requisites

Run archive node, serving Ethereum HTTP JSON-RPC on port 8545

Install common software dependencies: python, npm

Python Modules: pip3 install GitPython pandas tqdm scikit-learn

Simulation Clients

The following scripts by default launch 44 simulation networks.

cd eth_clients/hardhat

bash setup_hardhat.sh

bash launch_hardhats.sh

eth_clients/hardhat directory has detailed instructions on managing sim clients

Download data:

Download and uncompress the zip file from the URL: https://lanturn.s3.us-east-2.amazonaws.com/dataset.zip

Copy the files from dataset/data/ to data/ directory of this repository. This data is used for deriving the prices for Binance (CEX settlement of non-ETH currencies), although optimizations and simulations can run without this data, in which case the settlement will occur only on dexes.

problem-dataset dir contains the input transactions (user transactions and templates) and domain for optimization.

baseline-dataset dir contains the flashbots baseline for the above problems.

Sample optimization command:

python3 optimize.py -t <example_transactions> -d <example_domain> --dexes <contract_list> --n_parallel_gauss 44 --capital 1000 --reorder

where contract_list can be a sublist of ['sushiswap', 'aave', 'uniswapv3', 'uniswapv2', 'uniswapv3-jit'] depending on the contracts and experiments involved.

python3 runme.py script automatically launches simulation clients (setup has to be called manually first) and runs an example optimization.

If you want to run simulation standalone, sample command: python3 simulate_client.py -f <concrete_transactions> -p <PORT_ID> where PORT_ID = <PORT of sim client> - 8601

Example files

concrete_transactions : examples/optimised

example_transactions : examples/0xeth/multiple_tokens

example_domain : examples/0xeth/multiple_tokens_domain

lanturn's People

Contributors

kushalbabel 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.