TAIFOON/ SOLVERS
[ DOCS ]

Solver runtime
in three pages.

Lightweight pointers to the source. Full documentation lives in the repo at yawningmonsoon/taifoon-solver.

[ Quick start ]
$git clone https://github.com/yawningmonsoon/taifoon-solver
$cd taifoon-solver
[ Environment variables ]

Copy .env.example to .env and fill in the values before starting the solver.

$env
$SOLVER_PRIVATE_KEY=0x... # EVM hot wallet private key
$SOLVER_ADDRESS=0x... # Corresponding EVM address
$MAX_NOTIONAL_USD=5000 # Per-fill exposure cap in USD
$MIN_PROFIT_USD=0.10 # Skip fills below this profit threshold
$API_PORT=8082 # Solver HTTP API + dashboard port
[ Keychain setup (macOS) ]

Store credentials in the system keychain instead of a plaintext .env file. The solver reads from the mamba-messiah-key service name at startup.

$security add-generic-password \
$ -s mamba-messiah-key \
$ -a solver \
$ -w "$(cat ~/.solver_private_key)"
[ Architecture ]

A solver is a single Rust process composed of a genome-stream client, a profitability calculator, a wallet manager, a protocol-adapter layer (per-protocol calldata builders), and an executor. Each pod owns one wallet and one set of protocol/chain registrations. The sidecar portfolio manager exposes inventory and P&L via the HTTP API on localhost:{API_PORT}/api/solver/*.

[ Lambda lifecycle ]

Every intent flows through a 12-stage state machine — from detected to confirmed or one of the terminal failure stages. The portal renders this in real time from server-sent events.