Strategy

Rust Rust

About

A framework for writing MEV strategies and bots in Rust

Install

Cargo.toml

toml [dependencies] strategy = { version = "0.1.1" }

Usage

strategy.rs

```rust

use strategy::types::Strategy, Event, Action};

pub struct Sandwicher { provider: Arc }

impl Sandwicher { pub fn new(provider: Arc) -> Self { Self { provider } } }

[async_trait]

impl Strategy for Sandwicher { async fn process_event(&mut self, event: Event) -> Option {

    // Process incoming event/tx

    None
}

} ```