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

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

Why keep separate acceptance checks when the code paths look identical?

Collapsing venue diversity into one pricing morphism shrinks the code, but it does not remove verification. Where the unification stops, and why a coincidence is pinned, not merged.

Known formally as Membership is not acceptance in the BlazePhoenix whitepaper.

BlazePhoenix Engineering · article updated 2026-11-16 · site dataset through 2026-11-19 · 7 min · written from the deployed bytecode

By Mitra (@Sigmacrit) — anonymous developer of the BlazePhoenix protocol. The code is the résumé.

Abstract in 15 languages · resumo · resumen · 摘要 · 要旨 · ملخص

English — 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.

Português — Duas verificações que concordam hoje são uma coincidência, não uma lei. A BlazePhoenix unifica a leitura (que pools existem, de que tipo, em que estado) numa só tabela e numa só derivação, mas mantém a porta de aceitação separada, porque uma recusa que duas verificações independentes podem fazer cada uma é mais forte do que a de uma só; uma coincidência fixa-se com um teste de paridade, não se funde.

Español — Dos comprobaciones que coinciden hoy son una coincidencia, no una ley. BlazePhoenix unifica la lectura (qué pools existen, de qué tipo, en qué estado) en una sola tabla y una sola derivación, pero mantiene separada la puerta de aceptación, porque un rechazo que dos comprobaciones independientes pueden hacer cada una es más fuerte que el de una sola; una coincidencia se fija con una prueba de paridad, no se fusiona.

Français — Deux vérifications qui concordent aujourd'hui sont une coïncidence, pas une loi. BlazePhoenix unifie la lecture (quels pools existent, de quel type, dans quel état) en une seule table et une seule dérivation, mais garde la porte d'acceptation séparée, car un refus que deux vérifications indépendantes peuvent chacune prononcer est plus fort que celui d'une seule ; une coïncidence se fige avec un test de parité, elle ne se fusionne pas.

Deutsch — Zwei Prüfungen, die heute übereinstimmen, sind ein Zufall, kein Gesetz. BlazePhoenix vereinheitlicht das Lesen (welche Pools existieren, welcher Art, in welchem Zustand) in einer Tabelle und einer Ableitung, hält das Akzeptanz-Gate aber getrennt, denn eine Ablehnung, die zwei unabhängige Prüfungen je für sich aussprechen können, ist stärker als die einer einzigen; ein Zufall wird mit einem Paritätstest festgenagelt, nicht verschmolzen.

Русский — Две проверки, которые сегодня совпадают, — это совпадение, а не закон. BlazePhoenix сводит чтение (какие пулы существуют, какого типа, в каком состоянии) к одной таблице и одному выводу, но оставляет шлюз приёма отдельным: отказ, который может вынести каждая из двух независимых проверок, сильнее отказа одной проверки; совпадение закрепляют тестом паритета, а не сливают.

Türkçe — Bugün uyuşan iki kontrol bir tesadüftür, yasa değil. BlazePhoenix okumayı (hangi pool'ların var olduğu, hangi türden olduğu, hangi durumda olduğu) tek bir tablo ve tek bir türetimde birleştirir, ancak kabul kapısını ayrı tutar; çünkü iki bağımsız kontrolün her birinin verebildiği bir ret, tek bir kontrolün retinden daha güçlüdür; bir tesadüf birleştirilmez, eşitlik testiyle sabitlenir.

العربية — فحصان يتفقان اليوم مصادفة لا قانون. تُوحِّد BlazePhoenix القراءة (أي pools موجودة، ومن أي نوع، وفي أي حالة) في جدول واحد واشتقاق واحد، لكنها تُبقي بوابة القبول منفصلة، لأن رفضًا يستطيع فحصان مستقلان إصداره كلٌّ على حدة أقوى من رفض فحص واحد؛ والمصادفة تُثبَّت باختبار تكافؤ ولا تُدمَج.

हिन्दी — आज जो दो जाँचें सहमत हैं, वह संयोग है, नियम नहीं। BlazePhoenix पढ़ने को (कौन से pool मौजूद हैं, किस प्रकार के हैं, किस स्थिति में हैं) एक तालिका और एक व्युत्पत्ति में एकीकृत करता है, पर स्वीकृति का गेट अलग रखता है, क्योंकि जो इनकार दो स्वतंत्र जाँचें अलग-अलग कर सकती हैं वह एक जाँच के इनकार से ज़्यादा मज़बूत है; संयोग को पैरिटी टेस्ट से पिन किया जाता है, मिलाया नहीं जाता।

日本語 — 今日たまたま一致している二つのチェックは、偶然であって法則ではない。BlazePhoenix は読み取り(どのプールが存在し、どの種類で、どの状態か)を一つのテーブルと一つの導出に統一するが、受け入れのゲートは別々に保つ。二つの独立したチェックがそれぞれ出せる拒否は、一つのチェックによる拒否より強いからだ。偶然は統合せず、パリティテストで固定する。

中文 — 今天恰好一致的两项检查只是巧合,不是定律。BlazePhoenix 把读取(存在哪些池、属于哪种类型、处于什么状态)统一为一张表和一套推导,但让接受闸门保持独立,因为两项独立检查各自都能做出的拒绝,比单项检查的拒绝更强;对于巧合,用一致性测试把它固定下来,而不是把两者合并。

한국어 — 오늘 우연히 일치하는 두 검사는 법칙이 아니라 우연입니다. BlazePhoenix는 읽기(어떤 풀이 있는지, 어떤 종류인지, 어떤 상태인지)를 하나의 표와 하나의 도출로 통합하지만, 수락 게이트는 따로 둡니다. 독립된 두 검사가 각각 낼 수 있는 거부가 한 검사의 거부보다 더 강하기 때문입니다. 우연은 합치지 않고 패리티 테스트로 고정합니다.

Bahasa Indonesia — Dua pemeriksaan yang sepakat hari ini adalah kebetulan, bukan hukum. BlazePhoenix menyatukan pembacaan (pool mana yang ada, jenis apa, dalam keadaan apa) menjadi satu tabel dan satu penurunan, tetapi menjaga gerbang penerimaan tetap terpisah, karena penolakan yang masing-masing bisa dilakukan oleh dua pemeriksaan independen lebih kuat daripada penolakan satu pemeriksaan; sebuah kebetulan dipaku dengan tes paritas, bukan digabung.

বাংলা — আজ যে দুটি যাচাই একমত, তা কাকতালীয়, কোনো নিয়ম নয়। BlazePhoenix পড়াকে (কোন pool আছে, কোন ধরনের, কোন অবস্থায়) একটি টেবিল ও একটি ডেরিভেশনে একীভূত করে, কিন্তু গ্রহণের গেট আলাদা রাখে, কারণ দুটি স্বাধীন যাচাই প্রত্যেকে যে প্রত্যাখ্যান করতে পারে তা একটি যাচাইয়ের প্রত্যাখ্যানের চেয়ে শক্তিশালী; কাকতালীয় মিলকে প্যারিটি টেস্ট দিয়ে স্থির করা হয়, মিশিয়ে ফেলা হয় না।

Filipino — Ang dalawang pagsusuring nagkakasundo ngayon ay nagkataon lamang, hindi batas. Pinag-iisa ng BlazePhoenix ang pagbasa (aling mga pool ang umiiral, anong uri, at nasa anong kalagayan) sa iisang talahanayan at iisang derivation, pero hiwalay pa rin ang gate ng pagtanggap, dahil mas matibay ang pagtanggi na kayang gawin ng bawat isa sa dalawang independiyenteng pagsusuri kaysa sa pagtanggi ng iisang pagsusuri; ang pagkakataon ay ina-pin gamit ang parity test, hindi pinagsasama.

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.

ConstantValueWhere
KIND_V20src/BlazePhoenixCore.sol, lines 273 to 277
KIND_V31same range
KIND_V44same range
KIND_SOLIDLY5same range
KIND_ALGEBRA6same range
KIND_V4_NATIVE8line 312
KIND_EXTERNAL9line 320

Source: Project facts sheet 2026-11-16 (DEX at 969bcc6)

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.

MembershipAcceptance
NatureA readA gate
QuestionWhich pools exist for this pair, of which kind, in which state?May the Router execute across this pool, at this size, under this floor?
ProducersOne answer, one producer: a single table and derivationIts own reads, kept separate on purpose
If fusedNot applicableBeing listed silently becomes being safe to trade, and a coincidence nobody declared becomes a dependency

Source: Whitepaper 2.4, section 2.6

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

  1. Check out Blaze-Phoenix-Dex at 969bcc6 and read the KIND constants at src/BlazePhoenixCore.sol, lines 273 to 277, 312 and 320.
  2. Read section 4.1 of the whitepaper: seven kinds, five families, one attribute table. The question "does this kind read reserves?" is a shift and an AND on that table, with no default branch.
  3. Find the gated door in section 11.3: the RouterE(19) refusal when the named wrapper is not the one the Gate derives.
  4. Compare with section 2.6, which states the boundary in prose.

Do not trust this page — reproduce it

Every claim above is checkable against the chain. Start here:

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.
Cite this article

Licensed CC BY-NC-ND 4.0: quote and cite it with attribution and a link. Commercial use and derivative versions need written permission from BlazePhoenix; translations are made by BlazePhoenix. Copy a ready-made citation:

BlazePhoenix (2026). A morphism is not an invariant: unify the read, never the gate. BlazePhoenix Engineering. https://blazephoenix.xyz/learn/morphism-is-not-an-invariant/
@misc{blazephoenix_morphism_is_not_an_invariant,
  title  = {A morphism is not an invariant: unify the read, never the gate},
  author = {BlazePhoenix},
  year   = {2026},
  url    = {https://blazephoenix.xyz/learn/morphism-is-not-an-invariant/},
  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).

Related engineering

Next in Architecture · 4 / 20
The measurement law and its three corollaries ›Metrological Design in one law: never act on a modelled or caller-supplied value when an on-chain measurement exists. The three corollaries, and the public guarantees you can check against them.8 min

Questions, a partnership or a bug to report? Contact us or email contact@blazephoenix.xyz

Go to APP