Giter Site home page Giter Site logo

martinlim45 / mev-templates Goto Github PK

View Code? Open in Web Editor NEW

This project forked from solidquant/mev-templates

1.0 0.0 0.0 6.63 MB

MEV bot templates written in Python/Javascript/Rust. All implementing DEX flashloan arbitrage

Shell 0.22% JavaScript 28.80% Ruby 6.26% Python 1.76% Rust 1.18% Nix 0.01% Makefile 0.07% Solidity 61.71%

mev-templates's Introduction

MEV templates written in Python, Javascript, and Rust

You can find three MEV templates written in Python/Javascript/Rust here.

The three templates follow a similar design pattern and are written with readability in mind. With the components introduced here, you can easily reproduce most of the MEV strategies known to people: sandwich, frontrunning, arbitrage, sniping, so on and so forth.

The templates all include an example DEX flashloan arbitrage strategy to demonstrate how the template can be used. It is a simple demonstration and will need some tweaking to make it work (mostly in regards to order size optimization and gas bidding strategy), though it will work as a real DEX arbitrage bot by doing:

  • Retrieving all historical events from the blockchain (PairCreated).

  • Create a triangular arbitrage path with all the pools retrieved from above.

  • Perform a multicall request of "getReserve" calls to all the pools we're trading (1 ~ 3 second to retrieve >=6000 pools).

  • Stream new headers, new pending transactions, events asynchronously.

  • Simulate Uniswap V2 3-hop paths offline.

  • Sign transactions and create bundles to send to Flashbots (also supports sending transactions to the mempool).

What is this?

Professor Oak

(Professor Oak) Good. So you are here.

In this Github repository, you can pick one of the most popular languages to use in your MEV project. By studying this project, you'll get a feel for how MEV strategies are built.

Most strategies share a common code base, and this repository is an attempt to include the basic tooling required for all level of traders to have in their pockets.


You can find more about this project in my blog post:

πŸ‘‰ MEV templates written in Python, Javascript, and Rust

⚑️ Plus, come join our Discord community to take this journey together. We’re actively reviewing the code used in these blog posts to guarantee safe usage by all our members. Though still in its infancy, we’re slowly growing and collaborating on research/projects in the πŸ’« MEV space πŸ„β€β™€οΈπŸ„β€β™‚οΈ:

πŸ‘¨β€πŸ‘©β€πŸ‘¦β€πŸ‘¦ Join the Solid Quant Discord Server!

Also, for people that want to reach out to me, they can e-mail me directly at: [email protected]

mev-templates's People

Contributors

solidquant avatar

Stargazers

 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.