This guide gets the repository building and running locally with reproducible steps.
git clone <your-repository-url>
cd mev-protocolInstall:
- Rust 1.75+
- Go 1.21+
- Foundry (
forge) - GCC/Clang or MinGW toolchain
From repository root:
Copy-Item .env.example .env
notepad .envcp .env.example .env
$EDITOR .envFill required fields (private key, RPC endpoints, relay/auth settings) using your own credentials.
Do not commit populated .env files.
.\scripts\build.ps1chmod +x scripts/build.sh
./scripts/build.shExpected artifacts:
core/target/release/mev-enginebin/mev-node(ormev-node.exeon Windows)contracts/out/fast/lib/libmev_fast.a
From repository root:
make testIf make is unavailable on Windows, run stack-specific commands:
cd fast && mingw32-make test(ormake test)cd core && cargo testcd network && go test ./...cd contracts && forge test
make lint
make ci-local.\scripts\live.ps1 -ExecutionMode simulateFor signed relay submission instead of read-only mode:
.\scripts\live.ps1 -ExecutionMode liveLive mode requires these environment variables:
PRIVATE_KEY(EOA used to sign executor transaction)FLASHBOTS_SIGNING_KEY(bundle auth signature key)
Optional performance toggle (auto-falls back to Rust path if C fast-path is unavailable):
MEV_USE_FFI=1
This starts the Rust gRPC core (grpc_server), the Go network node, and the dashboard wiring in the correct order.
cd core
cargo run --release --bin mev-enginecd network
go run ./cmd/mev-nodeUse only after verifying network and key settings:
./scripts/deploy.sh arbitrumAfter deployment, apply contract security configuration before live execution:
FlashArbitrage.setExecutor(executor, true)FlashArbitrage.setTrustedV2Router(router, true)for each approved routerFlashArbitrage.setTrustedV3Factory(factory)MultiDexRouter.setTrustedFactories(v2Factory, v3Factory)FlashArbitrage.setPaused(false)only after simulation and dry-run validation
- Build fails in
fast/: verify C toolchain andmakeavailability. forgemissing: runfoundryupafter Foundry installation.- RPC connection issues: check endpoint permissions and websocket URL correctness.
- Missing env vars: ensure
.envexists and required variables are populated. - Clippy failures: run
cd core && cargo clippy --all-targets --all-features -- -D warningsand address warnings before PR.
For architecture details and project positioning, see README.md.