GithubHelp home page GithubHelp logo

niluke / rusty-sando Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mouseless-eth/rusty-sando

0.0 0.0 0.0 18.99 MB

Implementation of a competitive v2/v3 multi-meat sandwich bot written using Rust and Huff.

License: MIT License

Shell 0.06% Rust 10.90% TypeScript 20.65% Nix 0.01% Makefile 0.05% Solidity 68.32%

rusty-sando's Introduction

Rusty-Sando license twitter

A practical example on how to perform V2/V3 and multi-meat sandwich attacks written using Rust and Huff.

The goal of this repo is to act as reference material for searchers looking to implement their strategies using Rust and Huff.

Demo

final_demo.mp4

Brief Explanation

Anytime that a transaction interacts with a Uniswap V2/V3 pool and their forks, there is some slippage introduced (router swaps, aggregator swaps, other mev bots). Sandwich bots are a toxic form of MEV as they profit off this slippage by frontrunning the transaction pushing the price of the asset up to the slippage limit and then immediately selling the asset through a backrun transaction.

Features

  • Fully Generalized: Sandwich any tx that introduces slippage (routers, aggregators, mev bots, ...).
  • V2 and V3 Logic: Logic to handle Uniswap V2/V3 pools.
  • Multi-Meat: Build and send multi-meat sandwiches.
  • Gas Optimized: Contract written in Huff using unconventional gas optimizations.
  • Local Simulations: Fast concurrent EVM simulations to find sandwich opportunities.
  • Token Dust: Stores dust at the end of every bundle for lower gas usage next time token is traded.
  • Salmonella Checks: Detect if tx uses unusual opcodes that may produce different mainnet results.
  • Discord Logging: Send notifications via discord webhooks.

Bot Logic Breakdown can be found under bot/README.md

Contract Logic Breakdown can be found under contract/README.md

Notice

If any bugs or optimizations are found, feel free to create a pull request. All pull requests are welcome!

Warning

This software is highly experimental and should be used at your own risk. Although tested, this bot is experimental software and is provided on an "as is" and "as available" basis under the MIT license. We cannot guarantee the stability or reliability of this codebase and are not responsible for any damage or loss caused by its use. We do not give out warranties.

Acknowledgments

rusty-sando's People

Contributors

mouseless-eth 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.