# A morphism is not an invariant: unify the read, never the gate

> Canonical: https://blazephoenix.xyz/learn/morphism-is-not-an-invariant/
> License: CC BY-NC-ND 4.0 (attribution + link) · © 2026 BlazePhoenix
> Updated: 2026-11-16

Two checks that agree today are a coincidence, not a law. BlazePhoenix unifies the read (which pools exist, of which kind, in which state) into one table and one derivation, but keeps the acceptance gate separate, because a refusal that two independent checks can each make is stronger than one check; a coincidence is pinned with a parity test, not merged.

## The short answer

Because two checks that agree today are a coincidence, not a law. BlazePhoenix collapses every read (which pools exist, which kind each is, what state each is in) into one table and one derivation. It does not collapse the gate that decides whether the Router may execute across a pool, at this size, under this floor. A refusal that two independent checks can each make is stronger than a refusal one check makes, and a coincidence that holds today is fixed with a parity test, not by merging the two paths.

## What is unified: the read

The aggregator does not contain an integration per venue. It evaluates one parametrised pricing morphism at a point of the space: venue shape, chain, fee model. Written as branches, half a dozen venue kinds, each with its own fee convention, multiply into hundreds of pairwise combinations. Written as a morphism, the same coverage is a handful of state shapes, one stateless Core, fee conventions carried in their native units, and registration tables, so the bytecode grows additively: a new venue is a row, not a branch.

The guard on that collapse is the rule KIND to SHAPE: a venue family is data (a kind assigned to an existing shape and a derivation mode), never a new code path that adversarial input gets to select. The kinds are constants in the Core.

## Where the collapse stops

There is no single universal formula. Two closed forms are evaluated exactly, constant product and concentrated liquidity; for every curve where replication would be a liability, the venue's own bytecode is asked and its answer is bounded by the measured balance delta and the floor. Unification reduces the if/else in the code. It does not remove the verification, and the whitepaper does not claim that it does.

## Membership versus acceptance

A concrete case from the execution layer: a leg of an external kind executes only if the wrapper it names is the one the Hub's Gate derives from the hop's own tokens and fee, otherwise the swap reverts with RouterE(19). The kind written in the calldata is a claim, not an identity. Membership told the planner the venue exists; acceptance asks again at execution.

## What to do with a coincidence

When two producers return the same answer today, the temptation is to merge them. The rule is the opposite: pin the coincidence with a parity test that fails when the two producers drift, and keep both. The merge would remove the second, independent chance to refuse.

The boundary with the previous article is the point. Single production is for primitives, quantities every consumer needs derived from the source. Predicates that decide acceptance keep their redundancy.

## Check it yourself



**Verify it yourself:** In a clean checkout of Blaze-Phoenix-Dex at 969bcc6: sed -n 273,277p src/BlazePhoenixCore.sol; sed -n 312p src/BlazePhoenixCore.sol; sed -n 320p src/BlazePhoenixCore.sol (the KIND_* values 0, 1, 4, 5, 6, 8, 9). Whitepaper 2.4: sections 2.3, 2.6, 4.1 and 11.3.

Related: https://blazephoenix.xyz/learn/universal-amm-primitive/ · https://blazephoenix.xyz/learn/eightfold-dispatcher/ · https://blazephoenix.xyz/learn/one-question-one-producer/
