Coder Social home page Coder Social logo

0xsidius / mev-template-rs Goto Github PK

View Code? Open in Web Editor NEW

This project forked from degatchi/mev-template-rs

0.0 0.0 0.0 18 KB

Bootstrap your MEV bot strategies with a simple boilerplate to build on top of.

License: MIT License

Shell 1.26% Python 5.08% Rust 56.46% Solidity 37.20%

mev-template-rs's Introduction

MEV Template

A template to build a MEV bot from.

How to expand on this template

I wrote an article How To Build A MEV Bot that explains the overall architecture you need to think of to build a bot - from getting a strategy, fetching data, etc.

Quick Start

  • Get a node from QuickNode as they have a free websocket option or you can run your own node.
  • Import your EOA priv key for the bot to execute transactions.
  • Add your discord websocket to send alerts to.
  • For testing, run cargo run
  • For production, run cargo run --release

Features

  • Simple discord message system.
  • Historic block function caller.
  • Uniswap amountIn + amountOut functions
  • Contract ABI binding.
  • Template contract
    • Uniswap getters.
    • Withdraw ERC20 + ETH functions.

Testing Onchain Data

Setting up environment:

  • Install python3: pip install.
  • Install modules: pip install web3.
  • Run: python3 block_history.py.

5 main components to consider:

  • provider: Which chain is being utilised.
  • abi: The contract interface to interact with.
  • block: Which mined block you're calling from (can be past block).
  • contract address: Contract address to call.
  • function call: Function to call from the contract address.

mev-template-rs's People

Contributors

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