An open API service indexing awesome lists of open source software.

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

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
```