lmanini / mev-template-rs

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

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

MEV Template

A template to build a MEV bot from.

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.

About

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

License:MIT License


Languages

Language:Rust 56.5%Language:Solidity 37.2%Language:Python 5.1%Language:Shell 1.3%