deadeye-rs
A Rust SDK for the Deadeye prediction-market protocol on Starknet, built for market makers: low latency, small dependency surface, no hidden async.
Crates
| Crate | Purpose |
|---|---|
deadeye-core |
Signed Q128.128 fixed-point, distribution types, error hierarchy. no_std-friendly. |
deadeye-artifacts |
Compile-time-embedded contract ABIs and release manifest. |
deadeye-collateral |
Off-chain collateral solver (L2 norm, lambda, Newton-Raphson minimiser). |
deadeye-starknet |
Calldata encoders, entry-point selectors, view-call wrappers over starknet-rs. |
deadeye-sdk |
High-level façade: client, quote, per-market handles. |
deadeye-indexer |
Typed HTTP client for the production indexer (situation-indexer.fly.dev). |
deadeye-testkit |
Integration-test helpers (devnet, Cartridge RPC, harness). Unpublished. |
deadeye-e2e |
End-to-end tests against a live RPC. Unpublished. |
xtask |
Workspace task runner (cargo xtask ci, cargo xtask devnet-up). Unpublished. |
Each layer is independently usable. A latency-critical MM can drive
deadeye-starknet directly; the SDK is convenience, not a wall.
Design goals
- Pedantic from day one. The workspace runs
clippy::all + pedantic + nurseryplus a curated set ofclippy::restrictionlints.unsafe_codeisforbid.#[expect]everywhere — never bare#[allow]. - Small dependency surface. No
reqwestin the hot path. Noserdeindeadeye-core. Thestarknet-providerscrate is feature-gated so custom transports (multi-RPC racers, mocks) cost nothing. - Numerics that match the chain bit-for-bit.
Sq128Rawround-trips bit-identical with the CairoSQ128x128Rawstruct, verified by proptest. no_std-capable core.deadeye-coreanddeadeye-artifactscan compile withoutstdso the same primitives feed bots, indexers, and on-chain verifier tooling.
Quick start
use ;
use ;
use Url;
async
Development
# Run the full local CI pipeline (fmt + clippy + tests)
# Check workspace MSRV
# Run unit tests
# Run integration tests against a local devnet
DEADEYE_RUN_INTEGRATION=1
# Run integration tests against Cartridge Sepolia
DEADEYE_RUN_INTEGRATION=1 DEADEYE_TEST_TARGET=cartridge \
# Smoke-test the live Sepolia indexer (situation-indexer.fly.dev)
DEADEYE_RUN_INTEGRATION=1
MSRV
Rust 1.92 (the workspace uses resolver = "3" and edition = "2024").
License
Dual-licensed under MIT or Apache-2.0.