{"id":13465245,"url":"https://github.com/refcell/subway-rs","last_synced_at":"2025-08-24T17:11:05.083Z","repository":{"id":61720681,"uuid":"549259165","full_name":"refcell/subway-rs","owner":"refcell","description":"An extensible and practical demonstration of constructing evm-based sandwich attacks built with ethers-rs and Huff language.","archived":false,"fork":false,"pushed_at":"2023-10-04T21:08:17.000Z","size":11305,"stargazers_count":523,"open_issues_count":2,"forks_count":91,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-05-13T02:50:17.495Z","etag":null,"topics":["evm","huff","mev","rust","sandwich"],"latest_commit_sha":null,"homepage":"https://github.com/refcell/subway-rs","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/refcell.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2022-10-10T23:23:27.000Z","updated_at":"2025-05-06T15:12:10.000Z","dependencies_parsed_at":"2023-01-24T04:31:28.802Z","dependency_job_id":"e87fbebf-b0e5-4f42-9eab-3a9757f2bc13","html_url":"https://github.com/refcell/subway-rs","commit_stats":{"total_commits":68,"total_committers":4,"mean_commits":17.0,"dds":"0.044117647058823484","last_synced_commit":"5682b9f3c3d9fe93634e8403cc2d1aedf8d01346"},"previous_names":["abigger87/subway-rs"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/refcell%2Fsubway-rs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/refcell%2Fsubway-rs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/refcell%2Fsubway-rs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/refcell%2Fsubway-rs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/refcell","download_url":"https://codeload.github.com/refcell/subway-rs/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254394670,"owners_count":22063992,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["evm","huff","mev","rust","sandwich"],"created_at":"2024-07-31T15:00:24.321Z","updated_at":"2025-05-16T04:05:54.335Z","avatar_url":"https://github.com/refcell.png","language":"Rust","funding_links":[],"categories":["Projects using rust / ethers-rs","Rust"],"sub_categories":[],"readme":"\u003cimg align=\"right\" width=\"150\" height=\"150\" top=\"100\" src=\"./assets/subway.png\"\u003e\n\n# subway-rs • [![ci](https://github.com/refcell/subway-rs/actions/workflows/ci.yaml/badge.svg?label=ci)](https://github.com/refcell/subway-rs/actions/workflows/ci.yaml) ![license](https://img.shields.io/badge/License-MIT-green.svg?label=license) ![twitter](https://img.shields.io/twitter/follow/asnared?style=social)\n\nConstruct evm-based sandwich attacks using Rust and Huff.\n\n#### Getting Started\n\n[subway-rs](https://github.com/refcell/subway-rs) is a port of [libevm](https://twitter.com/libevm)'s original [subway](https://github.com/libevm/subway), implemented with [ethers-rs](https://github.com/gakonst/ethers-rs) and [huff](https://github.com/huff-language).\n\n\u003e 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.\n\u003e _Source: [libevm/subway](https://github.com/libevm/subway#subway)_\n\nTo improve upon the original tech stack, we use [rust](https://www.rust-lang.org/): the best language available for speed, dependability, and scalability (not biased).\n\nThis is [subway-rs](https://github.com/refcell/subway-rs): A pure-rust bot and Huff smart contracts used to execute sandwich attacks on UniswapV2.\n\nThe 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.\n\nWe're building it to be **fast**. But don't take our word for it, just check out the [benchmarks](./bot/benches).\n\nCurrent capabilities:\n\n- Watch pending transactions in the mempool.\n- Decode Transaction data for Uniswap V2 Calls. (and more soon!)\n- Search for profitable strategies efficiently using a variety of algorithms.\n- Calculate gas bribes.\n- Simulate and Execute Flashbot Bundles.\n- Verbose telemetry reporting using [tracing](https://crates.io/crates/tracing).\n\n#### Future Improvements\n\n\u003e **Note**\n\u003e\n\u003e Be aware, this bot is intended to be educational content and not for production use.\n\nAlthough the bot functions, it is simplistic and _certainly_ not competitive. Accept that advanced searchers to already be executing far beyond the current capabilities.\n\nThat being said, a list of future improvements are tagged with the `feat:` prefix in the [issues section](https://github.com/refcell/subway-rs/issues) of this repository.\n\n#### Contributing\n\nAll contributions are welcome!\n\nPlease reach out to [asnared](https://twitter.com/asnared) on twitter or [open an issue](https://github.com/refcell/subway-rs/issues/new) for any questions, improvements, or bugs.\n\n#### Attributions\n\n- [subway](https://github.com/libevm/subway)\n- [mev-template-rs](https://github.com/DeGatchi/mev-template-rs)\n- [foundry](https://github.com/foundry-rs/foundry)\n- [forge-std](https://github.com/brockelmore/forge-std)\n- [foundry-huff](https://github.com/foundry-rs/foundry-huff)\n\n#### Noteworthy Mentions\n\n- [quay](https://github.com/Alcibiades-Capital/quay)\n- [merkle-generator](https://github.com/DeGatchi/merkle-generator)\n- [flashloans-toolbox](https://github.com/Supercycled/flashloans-toolbox)\n- [Cake Sniper](https://github.com/Supercycled/cake_sniper)\n- [searcher-examples](https://github.com/jito-labs/searcher-examples)\n- [simple-arbitrage-rs](https://github.com/thasarito/simple-arbitrage-rs)\n- [mev-bundle-generator](https://github.com/Alcibiades-Capital/mev_bundle_generator)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frefcell%2Fsubway-rs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frefcell%2Fsubway-rs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frefcell%2Fsubway-rs/lists"}