An extensible and practical demonstration of constructing evm-based sandwich attacks built with ethers-rs and Huff language.

Overview

subway-rs • ci license twitter

Construct evm-based sandwich attacks using Rust and Huff.

Getting Started

subway-rs is a port of libevm's original subway, implemented with ethers-rs and huff.

Having highly optimized contracts is just one part of the equation, a tech stack is just as important as the contracts to execute on the opportunities. Source: libevm/subway

To improve upon the original tech stack, we use rust: the best language available for speed, dependability, and scalability (not biased).

This is subway-rs: A pure-rust bot and Huff smart contracts used to execute sandwich attacks on UniswapV2.

The goal is to act as a low barrier of entry for huff and rust-based MEV development; a sort-of reference code for aspiring new searchers.

We're building it to be fast. But don't take our word for it, just check out the benchmarks.

Current capabilities:

  • Watch pending transactions in the mempool.
  • Decode Transaction data for Uniswap V2 Calls. (and more soon!)
  • Search for profitable strategies efficiently using a variety of algorithms.
  • Calculate gas bribes.
  • Simulate and Execute Flashbot Bundles.
  • Verbose telemetry reporting using tracing.

Future Improvements

Note

Be aware, this bot is intended to be educational content and not for production use.

Although the bot functions, it is simplistic and certainly not competitive. Accept that advanced searchers to already be executing far beyond the current capabilities.

That being said, a list of future improvements are tagged with the feat: prefix in the issues section of this repository.

Contributing

All contributions are welcome!

Please reach out to asnared on twitter or open an issue for any questions, improvements, or bugs.

Attributions

Noteworthy Mentions

You might also like...
Selendra is a multichains interoperable nominated Proof-of-Stake network for developing and running Substrate-based and EVM compatible blockchain applications.

Selendra An interoperable nominated Proof-of-Stake network for developing and running Substrate-based and EVM compatible blockchain applications. Read

An EVM low-level language that gives full control over the control flow of the smart contract.

Meplang - An EVM low-level language Meplang is a low-level programming language that produces EVM bytecode. It is designed for developers who need ful

Fiddi is a command line tool that does the boring and complex process of checking and processing/watching transactions on EVM compatible Blockchain.

Fiddi is a command line tool that does the boring and complex process of checking and processing/watching transactions on EVM compatible Blockchain.

Parser and test runner for testing compatable common Ethereum full node tests against Polygon Zero's EVM.

EVM Test Parses and runs compatible common Ethereum tests from ethereum/tests against Polygon Zero's EVM. Note: This repo is currently very early in d

Binding generator for EVM and ink!

Sumi is a binding generator specifically designed for Astar Network ecosystem with XVM in mind. It takes EVM metadata and converts it to an ink! modul

🛠️ Uses zkevm-circuits and anvil mainnetfork to prove that a tx solves an EVM challenge

zk-proof-of-evm-execution This is a PoC developed at hackathon that enables a user to prove that they know some calldata that can solve a challenge on

EVM compatible chain with NPoS/PoC consensus

Reef Chain Reef chain is written in Rust. A basic familiarity with Rust tooling is required. To learn more about Reef chain, please refer to Documenta

A temporary repo for ETH connector to be used by EVM

ETH connector for Rainbow bridge Definitions bridgedETH - NEP-141 fungible-token representation of ETH inside Near. nETH - native ETH inside Near EVM.

DFIP 2111-B: VOC: Ethereum Virtual Machine (EVM) Support

DeFiCh/metachain is a codename research & development for DFIP 2111-B: VOC: Ethereum Virtual Machine (EVM) Support . Proposed as a DFIP on Nov 2021; D

Comments
Tool written in Rust to perform Password Spraying attacks against Azure/Office 365 accounts

AzurePasswordSprayer Tool written in Rust to perform Password Spraying attacks against Azure/Office 365 accounts. It is multi threaded and makes no co

Pierre 7 Feb 27, 2024
Key derivation and cryptographic signing functionality for Ethereum applications (ethers-rs)

ethers-signer-factory ethers-signer-factory is a Rust crate that provides functions for key derivation and signing of Ethereum transactions and messag

Ilia 3 Sep 27, 2023
Ethernaut solutions with ethers-rs

the full repository is using Ethers-rs for the finding of CTF unless requirement of smart contract like in case of re-entrancy. best way get good at e

Advock 4 Dec 30, 2022
Rust library for practical time-lock encryption using `drand` threshold network

tlock-rs: Practical Timelock Encryption/Decryption in Rust This repo contains pure Rust implementation of drand/tlock scheme. It provides time-based e

Timofey 32 Jan 8, 2023
Rust encryption library for practical time-lock encryption.

tlock_age: Hybrid Timelock Encryption/Decryption in Rust tlock_age is a library to encrypt and decrypt age filekey using tlock scheme. It provides an

Thibault 5 Mar 29, 2023
ethers-rs signer using GCP KMS

ethers-gcp-kms-signer Installation Cargo cargo add ethers-gcp-kms-signer Usage Signer use ethers::prelude::*; use ethers_gcp_kms_signer::{GcpKeyRingRe

null 12 Apr 16, 2023
An MEV back-running template for ethers-rs

MEV price prediction I show how to predict ChainLink price updates from the mempool. For the sake of illustration I work with AAVE V2 price oracles. E

Andrea Simeoni 54 Apr 19, 2023
Ethers-rs CCIP-Read Middleware

Ethers-rs CCIP-Read Middleware Ready to dive into the world of cross-chain data access? Look no further! This Rust library provides an Ethers middlewa

Ethereum Name Service (ENS) 14 May 28, 2023
An open source, high performance limit order book for the Seaport smart contracts. Implemented in Rust using ethers-rs, this offers a turnkey option for digital asset marketplaces.

Quay Quay is an open source, high performance backend for the Seaport smart contracts. The project is implemented in Rust, using Postgres as a storage

Valorem Labs Inc. 169 Jun 23, 2023
ethers-rs scripting boilerplate

ethers-rs script boilerplate ethers-rs is a great blockchain scripting framework! This repo contains the essentials I find are useful when reading/wri

null 38 Sep 5, 2023