The Eightfold Dispatcher: one quote function for eight species of AMM
Known formally as The Eightfold Dispatcher Ω in the BlazePhoenix whitepaper.
BlazePhoenix Engineering · updated 2026-07-17 · 6 min · written from the deployed bytecode
Abstract in 15 languages · resumo · resumen · 摘要 · 要旨 · ملخص
English — One dispatcher quotes eight species of AMM — V2, V3, Algebra, Solidly, Curve stable, Curve crypto, Balancer, V4 — using closed-form math where formulas are truth and asking the pool's own bytecode wherever replication could lie.
Português — Um único dispatcher cota oito espécies de AMM — V2, V3, Algebra, Solidly, Curve stable, Curve crypto, Balancer, V4 — com matemática fechada onde a fórmula é a verdade e perguntando ao próprio bytecode do pool onde a replicação poderia mentir.
Español — Un solo dispatcher cotiza ocho especies de AMM — V2, V3, Algebra, Solidly, Curve stable, Curve crypto, Balancer, V4 — con matemática cerrada donde la fórmula es la verdad y preguntando al propio bytecode del pool donde la replicación podría mentir.
Français — Un seul dispatcher cote huit espèces d'AMM — V2, V3, Algebra, Solidly, Curve stable, Curve crypto, Balancer, V4 — par formules fermées là où la formule est la vérité, et en interrogeant le bytecode du pool partout où la réplication pourrait mentir.
Deutsch — Ein Dispatcher quotiert acht AMM-Arten — V2, V3, Algebra, Solidly, Curve stable, Curve crypto, Balancer, V4 — mit geschlossenen Formeln, wo die Formel die Wahrheit ist, und fragt den Bytecode des Pools, wo Replikation lügen könnte.
Русский — Один диспетчер котирует восемь видов AMM — V2, V3, Algebra, Solidly, Curve stable, Curve crypto, Balancer, V4 — замкнутыми формулами там, где формула и есть истина, и спрашивая байткод самого пула там, где репликация могла бы лгать.
Türkçe — Tek bir dağıtıcı sekiz AMM türünü fiyatlar — V2, V3, Algebra, Solidly, Curve stable, Curve crypto, Balancer, V4 — formülün hakikat olduğu yerde kapalı form matematikle, kopyalamanın yalan söyleyebileceği her yerde havuzun kendi bytecode'una sorarak.
العربية — موزّع واحد يسعّر ثمانية أنواع من AMM — V2 وV3 وAlgebra وSolidly وCurve المستقر وCurve المشفر وBalancer وV4 — برياضيات مغلقة حيث تكون الصيغة هي الحقيقة، وبسؤال بايتكود المجمّع نفسه حيثما أمكن للنسخ أن يكذب.
हिन्दी — एक ही डिस्पैचर आठ प्रकार के AMM कोट करता है — V2, V3, Algebra, Solidly, Curve stable, Curve crypto, Balancer, V4 — जहाँ सूत्र ही सत्य है वहाँ बंद-रूप गणित से, और जहाँ प्रतिकृति झूठ बोल सकती है वहाँ पूल के अपने बाइटकोड से पूछकर।
日本語 — 一つのディスパッチャーが8種のAMM(V2、V3、Algebra、Solidly、Curve stable、Curve crypto、Balancer、V4)を見積もります。式が真実である所は閉形式の数学で、複製が嘘をつき得る所ではプール自身のバイトコードに尋ねます。
中文 — 一个调度器为八种 AMM 报价——V2、V3、Algebra、Solidly、Curve 稳定池、Curve 加密池、Balancer、V4——公式即真相处用闭式数学,复制可能撒谎处则直接询问池自身的字节码。
한국어 — 디스패처 하나가 여덟 종의 AMM을 견적합니다 — V2, V3, Algebra, Solidly, Curve stable, Curve crypto, Balancer, V4. 공식이 곧 진실인 곳은 닫힌 수식으로, 복제가 거짓말할 수 있는 곳은 풀 자신의 바이트코드에 묻습니다.
Bahasa Indonesia — Satu dispatcher menguotasi delapan spesies AMM — V2, V3, Algebra, Solidly, Curve stable, Curve crypto, Balancer, V4 — memakai matematika bentuk-tertutup di mana rumus adalah kebenaran, dan bertanya pada bytecode pool sendiri di mana pun replikasi bisa berbohong.
বাংলা — একটি ডিসপ্যাচার আটটি প্রজাতির AMM কোট করে — V2, V3, Algebra, Solidly, Curve stable, Curve crypto, Balancer, V4 — যেখানে সূত্রই সত্য সেখানে বদ্ধ-রূপ গণিতে, আর যেখানে প্রতিলিপি মিথ্যা বলতে পারে সেখানে পুলের নিজস্ব বাইটকোডকে জিজ্ঞেস করে।
Filipino — Isang dispatcher ang nagko-quote ng walong uri ng AMM — V2, V3, Algebra, Solidly, Curve stable, Curve crypto, Balancer, V4 — gamit ang closed-form math kung saan ang pormula ang katotohanan, at nagtatanong sa mismong bytecode ng pool saanman maaaring magsinungaling ang panggagaya.
Every AMM family speaks a different mathematical language: constant product (V2), square-root-price ticks (V3/Algebra), the x³y+xy³ stable curve (Solidly), Curve's get_dy, Balancer's weighted pools, V4's singleton with hooks. Aggregators usually handle this with one adapter contract per venue — a maintenance surface that grows with every fork. BlazePhoenix compresses it into one dispatcher: give it a pool of any of the eight kinds and an input amount, and it returns the output, a depth proxy for the split allocator, and an impact hint.
The branching doctrine is what matters: closed-form math where the formula is the truth (V2's single-expression output with division deferred to the last step, so the only rounding is the final floor), and ASK-THE-POOL where a venue's own bytecode is the only honest source — Curve's get_dy and Solidly's getAmountOut are called directly, because the same code that will enforce the invariant at execution produced the number, so quote and fill cannot diverge.
Defaults that prevent reverts by construction
The details carry the reliability: a V2 venue registered with no fee defaults to 30 bps — the universal Uniswap-V2/Sushi fee — mirrored byte-for-byte in the execution path, so the quote matches the pool's own K check and a fee mismatch cannot revert the swap. V4 state is read via extsload from the singleton PoolManager with the slot layout verified against the canonical StateView; delta-altering hooks are refused outright (fail-closed) rather than guessed at.
One dispatcher, eight species, zero per-venue adapters — and every branch documented in the whitepaper with the exact formula the Core computes.
Do not trust this page — reproduce it
Every claim above is checkable against the chain. Start here:
GET /api/quote across kinds: a V2 pair, a V3 pool and a Solidly stable pool return the same response shape — the dispatcher normalized themContracts are verified on every chain we deploy to — addresses in the protocol manifest. Deeper formal treatment: the whitepaper (PDF).
Share this article · join the discussion