back

kairos

Learning when to execute blockchain transactions.

Deep learning for low-fee transaction timing.

// overview

KAIROS learns from finalized EVM block history to choose a low-base-fee block within a fixed future horizon. It turns externally built corpora into causal temporal samples, compares sequence models, and evaluates their timing decisions with mean per-origin economic metrics.

The project extends the original SPICE temporal experiment into a thesis-grade research and execution system: typed experiment programs, HPO, Slurm campaigns, durable training and evaluation objects, and an Expo/ExecuTorch demo.

// how it works

The Python pipeline loads canonical corpora, builds causal block features and historical windows, trains LSTM, Transformer, and Transformer-LSTM models with PyTorch Lightning, then selects candidates by economic optimality gap.

The mobile exporter converts selected models for ExecuTorch. The Expo app reads Ethereum, Polygon, and Avalanche directly through viem and runs inference on-device without a server fallback.

// capabilities

Causal temporal samples

Uses strict closed-parent history and fixed block-count horizons to prevent future-data leakage.

Dual-head sequence models

Compares three model families that predict both a target block offset and its minimum base fee.

Economic evaluation

Selects and reports models with optimality gap, fee savings, and P50 fee-inclusive evaluation.

On-device inference

Exports trained models for a serverless ExecuTorch mobile demonstration backed by direct chain reads.