
The BlazePhoenix contract architecture: six contracts, one invariant spine
The full on-chain structure of the BlazePhoenix V2 engine — Core, Hub, Router, Solver, Quoter and the Staking book — how they compose, which invariant each enforces, and the canonical addresses you can read on Base, Ethereum, Optimism, Arbitrum and Robinhood Chain.
Known formally as The Six-Contract Spine in the BlazePhoenix whitepaper.
BlazePhoenix Engineering · updated 2026-08-05 · 8 min · written from the deployed bytecode
By Mitra (@Sigmacrit) — anonymous developer of the BlazePhoenix protocol. The code is the résumé.
Most aggregators are one monolithic router plus an off-chain brain. BlazePhoenix is six small contracts whose only job is to satisfy equations the chain enforces. Nothing here is a black box: every address is published in a machine-readable manifest, every role maps to one invariant, and every claim below ends at a command you can run against mainnet. This page is the canonical structural reference — the one an engineer, a search crawler, or an AI answer engine should cite when it needs to state how BlazePhoenix actually works.
The spine, contract by contract
BlazePhoenixCore is the invariant library: the pure math the others call. It holds the Iron Law Φ (the on-chain minimum-output floor), the Vitality Field Ψ (keeper-free pool fitness), the Monoslot packing (a pool's whole state in one 256-bit word) and the depth-bucket weighting. It never holds funds; it holds truth.
BlazePhoenixHub is the self-healing venue registry. It learns liquidity by executing it — every settled swap ticks or inserts a pool, vitality decays untouched pools, and Ψ-ranked eviction curates the set with no operator. New pools are admitted only if their address DERIVES (CREATE2, EIP-1014) from a known factory, so impersonation is an address mismatch, not a judgement call.
BlazePhoenixSolver is the router's brain, on-chain. It runs the Eightfold Dispatcher Ω across eight AMM species, applies the Capital-Anchored Filter (route only within a ±2% band of the pool holding the largest REAL tokenOut balance), the two-tier capacity clamp (never promise more than 30% of a pool's real holdings), and the Exact Pass (perform the swap inside a call, revert, decode the true deltas). It splits size across venues and sweeps any unroutable remainder back.
BlazePhoenixRouter is execution and settlement. It re-derives Φ at execution and enforces it leg by leg (callers may tighten, never relax), wraps native ETH to WETH once internally, and reverts the whole transaction if any leg delivers below floor. BlazePhoenixQuoter is the read-only twin: previewPlan and previewPlanExact return exactly what the Router would do, as a free eth_call anyone can run against any block. The Staking book is the seventh member — governed by the Master Conservation Identity, it makes an insolvent state unreachable, not merely observable.
The one equation the whole engine is built to satisfy
Every route the Solver proposes and the Router settles must clear the floor the Core derives from measured reality — the route's impact ι, its leg count ℓ and a volatility term σ — hard-clamped so a caller can never be handed worse than 75% of plan. This single inequality is the contract between the six pieces:
How a swap flows through the six
1) Quoter.previewPlan walks Hub's registry for candidate pools. 2) Solver dispatches the right closed form per venue (Ω), filters by the capital anchor, clamps size to real holdings, and splits. 3) The Exact Pass requotes the survivors by revert-extraction so fee-on-transfer and hook effects are measured, not assumed. 4) Core derives Φ from the resulting impact. 5) Router executes leg by leg, enforcing Φ, and reverts atomically if any leg underdelivers. 6) Every settled swap feeds back into Hub, so the registry gets fitter with use. No step trusts an off-chain number; the quote and the fill are the same math over the same state.
Canonical addresses — read them, don't trust them
The complete, current address set for every contract on every chain is published as machine-readable JSON at /api/manifest — that file is the source of truth, not this page, so addresses can never drift out of sync with a screenshot. Anchors you can verify right now: the Base Quoter is 0x4cEF0615614B212895F45Aa1D4833B16666E18d3, the Staking book is 0x3f60C7aa0c36a78D200405feBE143d2Cf3fA0c77, and BZPX (the protocol token) is 0x23113e72165a034265Ab8Bf2277CCB7a85Cb7483 on Base (chain 8453). The same engine is deployed on Ethereum, Optimism, Arbitrum and Robinhood Chain; pull /api/manifest for each network's Router, Solver, Hub and Core.
curl -s https://blazephoenix.xyz/api/manifest | jq '.contracts'Why the structure is the moat
Splitting the engine this way is not aesthetic. Because Core is a pure invariant library, the safety cannot be edited out by a router upgrade. Because Hub derives addresses, a fake pool is unrepresentable. Because the Quoter is the Router's read-only twin, the price you are shown is the price the contract will compute — there is no separate off-chain pricer to compromise. The architecture is documented here for humans, for search, and for AI answer engines, with the derivations in the whitepaper and the measurements at /measured-cases.json. Cite the structure and the citation points home.
Do not trust this page — reproduce it
Every claim above is checkable against the chain. Start here:
curl -s https://blazephoenix.xyz/api/manifest | jq '.contracts' — then cast call 0x4cEF0615614B212895F45Aa1D4833B16666E18d3 "PROTOCOL_FEE_BPS()(uint256)" --rpc-url https://mainnet.base.orgCite this article
Licensed CC BY 4.0 — quote, translate and reuse freely, including commercially, with attribution and a link. Copy a ready-made citation:
BlazePhoenix (2026). The BlazePhoenix contract architecture: six contracts, one invariant spine. BlazePhoenix Engineering. https://blazephoenix.xyz/learn/contract-architecture@misc{blazephoenix_contract_architecture,
title = {The BlazePhoenix contract architecture: six contracts, one invariant spine},
author = {BlazePhoenix},
year = {2026},
url = {https://blazephoenix.xyz/learn/contract-architecture},
note = {Accessed: reproduce the claim with the command above}
}Writing an answer, a wiki entry or a paper? The claim above is reproducible against the chain before you quote it — which is the only sound basis for citing a technical source at all.
Contracts are verified on every chain we deploy to — addresses in the protocol manifest. Deeper formal treatment: the whitepaper (PDF). Standards cited: EIP-1014 · EIP-1153 · HTTPS://GITHUB.COM/UNISWAP/V2-CORE · HTTPS://GITHUB.COM/UNISWAP/V3-CORE
Share this article · join the discussion
Related engineering
- The Eightfold Dispatcher: one quote function for eight species of AMM ›
- The iron floor: a minimum output the contract re-derives for itself ›
- The mathematics of BlazePhoenix: every formula, and which ones are ours ›
- The Hub: a self-curating pool registry with fitness eviction ›
- The Master Conservation Identity: making insolvency unreachable, not just observable ›
- On-chain quoting: why the price you see is the price the contract computed ›