https://github.com/jordy25519/fulcrum
low-latency arbitrage bot for Arbitrum L2
https://github.com/jordy25519/fulcrum
arbitrum-l2 rust
Last synced: 9 days ago
JSON representation
low-latency arbitrage bot for Arbitrum L2
- Host: GitHub
- URL: https://github.com/jordy25519/fulcrum
- Owner: jordy25519
- Created: 2023-06-02T09:55:06.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-06-07T01:28:09.000Z (almost 2 years ago)
- Last Synced: 2025-04-03T13:51:11.240Z (about 2 months ago)
- Topics: arbitrum-l2, rust
- Language: Rust
- Homepage:
- Size: 218 KB
- Stars: 38
- Watchers: 3
- Forks: 10
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Fulcrum
Fulcrum is an experimental, low-latency engine for arbitrage trading on Arbitrum L2.
Primary design goal is to measure strategy latency in single-digit µ seconds.
Created out of interest in understanding HFT systems and the arbitrum rollup architecture.## Motivation/Design
Fulcrum builds a price graph on each block and simulates new transactions from the raw sequencer feed directly against the local price graph.
It does not run a full EVM and so relies on a full node to sync prices at sequencer batch block - 1 (i.e trades accuracy for latency).```bash
crates
├── engine # primary trading engine
├── sequencer-feed # fast feed deserializer
└── ws-cli # fast(er), minimal fork of ethers-providers
```## Run
```bash
$ ./target/release/fulcrum \
--chain arbitrum --ws \
run --min-profit 0.0002 \
--key \
--executor \
--dry-run
```## Profile (MacOS)
```bash
$ cargo install samply$ samply record ./target/profiling/fulcrum
```## Test
```bash
$ cargo test --workspace
```## Bench
```
$ cargo +nightly bench --features=bench --profile=release
```## Build
```bash
$ sudo apt install build-essential pkg-config libssl-dev$ RUSTFLAGS='-C target-cpu=native' cargo build --release
```## Contracts
```bash
$ forge test --fork-url -vvv
```