Connect
Cover: Venue adapters and the Gate: one adapter per pool design, admitted by a delay and a code pin

Venue adapters and the Gate: one adapter per pool design, admitted by a delay and a code pin

What is a venue adapter, why does every venue need its own, and what does the Gate check before one can touch a swap?

Eight adapter contracts on the DEX main branch let the 2.0.0 Router reach Curve, Balancer, PancakeSwap Infinity, Liquidity Book and Algebra Integral pools. What an adapter is, what the Gate checks on every swap, and what it does not protect.

Known formally as Gate adapters (IExtAdapter) behind kind 9 wrappers in the BlazePhoenix whitepaper.

BlazePhoenix Engineering · article updated 2026-11-17 · site dataset through 2026-11-19 · 9 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 — Eight adapter contracts on the DEX main branch let the 2.0.0 Router trade on pool designs the Core cannot price natively: Curve, Balancer, PancakeSwap Infinity, Liquidity Book and Algebra Integral. The Gate admits an adapter only after a 48-hour delay and a scan of its code, pins the hash of that code and checks it again on every swap, and counts as output only the balance change measured at the recipient. None of these adapters is deployed on mainnet yet.

Português — Oito contratos adaptadores no ramo main da DEX permitem ao Router 2.0.0 negociar em desenhos de pool que o Core não consegue precificar nativamente: Curve, Balancer, PancakeSwap Infinity, Liquidity Book e Algebra Integral. O Gate só admite um adaptador após um atraso de 48 horas e uma análise do seu código, fixa o hash desse código e volta a verificá-lo em cada swap, e conta como saída apenas a variação de saldo medida no destinatário. Nenhum destes adaptadores está ainda implantado em mainnet.

Español — Ocho contratos adaptadores en la rama main del DEX permiten al Router 2.0.0 operar con diseños de pool que el Core no puede valorar de forma nativa: Curve, Balancer, PancakeSwap Infinity, Liquidity Book y Algebra Integral. El Gate solo admite un adaptador tras un retraso de 48 horas y un análisis de su código, fija el hash de ese código y lo comprueba de nuevo en cada swap, y cuenta como salida solo el cambio de saldo medido en el destinatario. Ninguno de estos adaptadores está desplegado todavía en mainnet.

Français — Huit contrats adaptateurs sur la branche main du DEX permettent au Router 2.0.0 de trader sur des conceptions de pool que le Core ne sait pas évaluer nativement : Curve, Balancer, PancakeSwap Infinity, Liquidity Book et Algebra Integral. Le Gate n'admet un adaptateur qu'après un délai de 48 heures et une analyse de son code, épingle le hash de ce code et le revérifie à chaque swap, et ne compte comme sortie que la variation de solde mesurée chez le destinataire. Aucun de ces adaptateurs n'est encore déployé sur le mainnet.

Deutsch — Acht Adapter-Contracts im main-Branch der DEX lassen den Router 2.0.0 auf Pool-Designs handeln, die der Core nicht nativ bepreisen kann: Curve, Balancer, PancakeSwap Infinity, Liquidity Book und Algebra Integral. Das Gate lässt einen Adapter erst nach einer Verzögerung von 48 Stunden und einer Prüfung seines Codes zu, fixiert den Hash dieses Codes und prüft ihn bei jedem Swap erneut, und es wertet als Output nur die beim Empfänger gemessene Saldoänderung. Keiner dieser Adapter ist bisher im Mainnet bereitgestellt.

Русский — Восемь контрактов-адаптеров в ветке main репозитория DEX позволяют Router 2.0.0 торговать в пулах тех конструкций, которые Core не может оценить напрямую: Curve, Balancer, PancakeSwap Infinity, Liquidity Book и Algebra Integral. Gate допускает адаптер только после 48-часовой задержки и проверки его кода, фиксирует хеш этого кода и сверяет его заново при каждом свопе, а выходом считает только изменение баланса, измеренное у получателя. Ни один из этих адаптеров пока не развёрнут в mainnet.

Türkçe — DEX'in main dalındaki sekiz adaptör kontratı, 2.0.0 Router'ın Core'un yerel olarak fiyatlayamadığı havuz tasarımlarında işlem yapmasını sağlar: Curve, Balancer, PancakeSwap Infinity, Liquidity Book ve Algebra Integral. Gate bir adaptörü yalnızca 48 saatlik bir gecikme ve kodunun taranmasından sonra kabul eder, bu kodun hash'ini sabitler ve her swap'te yeniden kontrol eder, ve çıktı olarak yalnızca alıcıda ölçülen bakiye değişimini sayar. Bu adaptörlerin hiçbiri henüz mainnet'te dağıtılmış değildir.

العربية — تتيح ثمانية عقود محوِّلات (adapters) في الفرع main لمستودع الـ DEX لـ Router 2.0.0 التداول على تصاميم مجمّعات لا يستطيع الـ Core تسعيرها أصليًا: Curve وBalancer وPancakeSwap Infinity وLiquidity Book وAlgebra Integral. لا يقبل الـ Gate محوِّلًا إلا بعد مهلة 48 ساعة وفحص لشيفرته، ثم يثبّت بصمة (hash) تلك الشيفرة ويتحقق منها من جديد في كل swap، ولا يحتسب ناتجًا إلا تغيّر الرصيد المقيس لدى المستلم. لم يُنشر أيٌّ من هذه المحوِّلات على الـ mainnet بعد.

हिन्दी — DEX की main ब्रांच पर आठ एडैप्टर कॉन्ट्रैक्ट 2.0.0 Router को उन पूल डिज़ाइनों पर ट्रेड करने देते हैं जिन्हें Core मूल रूप से प्राइस नहीं कर सकता: Curve, Balancer, PancakeSwap Infinity, Liquidity Book और Algebra Integral। Gate किसी एडैप्टर को केवल 48 घंटे की देरी और उसके कोड की जाँच के बाद ही स्वीकार करता है, उस कोड का hash पिन करता है और हर swap पर उसे फिर से जाँचता है, और आउटपुट के रूप में केवल प्राप्तकर्ता पर मापे गए बैलेंस परिवर्तन को गिनता है। इनमें से कोई भी एडैप्टर अभी mainnet पर डिप्लॉय नहीं हुआ है।

日本語 — DEX の main ブランチにある 8 つのアダプターコントラクトにより、2.0.0 Router は Core がネイティブに価格付けできないプール設計(Curve、Balancer、PancakeSwap Infinity、Liquidity Book、Algebra Integral)で取引できます。Gate は 48 時間の待機期間とコードの検査を経た後にのみアダプターを受け入れ、そのコードのハッシュを固定してスワップのたびに再確認し、出力として数えるのは受取人で測定した残高の変化だけです。これらのアダプターはいずれもまだメインネットにデプロイされていません。

中文 — DEX main 分支上的八个适配器合约让 2.0.0 Router 能够在 Core 无法原生定价的池设计上交易:Curve、Balancer、PancakeSwap Infinity、Liquidity Book 和 Algebra Integral。Gate 只有在 48 小时延迟和代码扫描之后才接纳一个适配器,固定该代码的哈希并在每次兑换时重新检查,并且只把在接收方测得的余额变化计为输出。这些适配器目前都尚未部署到主网。

한국어 — DEX의 main 브랜치에 있는 8개의 어댑터 컨트랙트는 2.0.0 Router가 Core가 네이티브로 가격을 매길 수 없는 풀 설계, 즉 Curve, Balancer, PancakeSwap Infinity, Liquidity Book, Algebra Integral에서 거래할 수 있게 합니다. Gate는 48시간의 지연과 코드 검사를 거친 뒤에만 어댑터를 받아들이고, 그 코드의 해시를 고정해 매 스왑마다 다시 확인하며, 출력으로는 수신자에게서 측정한 잔액 변화만을 인정합니다. 이 어댑터들은 아직 어느 것도 메인넷에 배포되지 않았습니다.

Bahasa Indonesia — Delapan kontrak adapter di branch main DEX memungkinkan Router 2.0.0 bertransaksi di desain pool yang tidak dapat dihargai secara native oleh Core: Curve, Balancer, PancakeSwap Infinity, Liquidity Book, dan Algebra Integral. Gate hanya menerima sebuah adapter setelah jeda 48 jam dan pemindaian kodenya, mengunci hash kode tersebut dan memeriksanya kembali pada setiap swap, serta hanya menghitung perubahan saldo yang diukur pada penerima sebagai output. Belum ada satu pun adapter ini yang di-deploy di mainnet.

বাংলা — DEX-এর main ব্রাঞ্চে থাকা আটটি অ্যাডাপ্টার কন্ট্র্যাক্ট 2.0.0 Router-কে এমন পুল ডিজাইনে ট্রেড করতে দেয় যেগুলোর দাম Core সরাসরি নির্ধারণ করতে পারে না: Curve, Balancer, PancakeSwap Infinity, Liquidity Book এবং Algebra Integral। Gate কোনো অ্যাডাপ্টারকে কেবল 48 ঘণ্টার বিলম্ব এবং তার কোড স্ক্যানের পরেই গ্রহণ করে, সেই কোডের hash পিন করে এবং প্রতিটি swap-এ আবার যাচাই করে, আর আউটপুট হিসেবে কেবল প্রাপকের কাছে পরিমাপ করা ব্যালান্সের পরিবর্তনকেই গণ্য করে। এই অ্যাডাপ্টারগুলোর কোনোটিই এখনও mainnet-এ ডিপ্লয় করা হয়নি।

Filipino — Ang walong adapter contract sa main branch ng DEX ay nagbibigay-daan sa 2.0.0 Router na mag-trade sa mga disenyo ng pool na hindi kayang presyuhan nang native ng Core: Curve, Balancer, PancakeSwap Infinity, Liquidity Book at Algebra Integral. Tumatanggap lamang ang Gate ng adapter pagkatapos ng 48 oras na pagkaantala at pag-scan ng code nito, pini-pin ang hash ng code na iyon at sinusuri itong muli sa bawat swap, at ang binibilang lamang nitong output ay ang pagbabago ng balanse na sinukat sa tatanggap. Wala pa sa mga adapter na ito ang naka-deploy sa mainnet.

Short answer: an adapter is a small contract that knows how to trade on one kind of pool the Core cannot read natively. The Gate stands in front of it. It admits an adapter only after a 48-hour delay and a scan of its code, pins the hash of that code, and checks the pin again on every swap. Whatever the adapter reports, the Router pays nothing on its word: the output is the balance change measured at the recipient.

This page describes the 2.0.0 generation of the DEX, which is not deployed yet and is scheduled to launch on 15 December 2026. None of the eight adapters is deployed on mainnet yet, and this page gives no date for any of them. Every contract fact below is read from the main branch of the DEX repository at commit 969bcc6, and each one names the file where you can check it.

What an adapter is

The Core prices six kinds of pool natively, by reading a few storage slots: Uniswap V2, V3 and V4 (native-ETH V4 pools included), Algebra, and Solidly stable and volatile pools. Some pool designs cannot be priced that way. They keep their balances in a shared vault, take a different swap call, or let outside hook code run inside a trade.

For those, the Gate creates a thin wrapper per pool. To the Router the wrapper looks like a Uniswap V3 pool: it has the V3 `swap` call and callback, and its address is derived by CREATE2 from the pair and a venue key, by the same formula the Hub uses for every V3 factory. The wrapper forwards the input it measured arriving to the adapter of its family, and the adapter trades on the real pool.

Every adapter answers the same four questions (`IExtAdapter`): `resolve` proves from the venue's own registry that a pool is the venue's, once, when the wrapper is created; `exec` trades; `quote` and `quoteCall` give a price for off-chain routing. The Gate never reads a quote during execution.

Why each venue needs its own

Pool designs differ in three things that matter for safety, and an adapter has to get all three right for its venue.

The adapters on main today

At commit 969bcc6, `src/adapters` holds eight adapter contracts, plus a shared base (`ExtAdapterBase`) and the interface. The table lists what each one trades and how it holds custody.

AdapterPool designCustodyRefused or pinned
CurveNGCurve StableSwap-NG plain poolsPUSH (exchange_received)Metapools, rate-oracle and rebasing coins, the raw-ETH sentinel
CurveCryptoNGCurve Twocrypto-NG (FXSwap included) and Tricrypto-NGPUSH (exchange_received)Native-enabled tricrypto pools
BalancerV2Pools of one Balancer V2 Vault, up to four factories fixed at constructionPULL, an exact approval consumed to zeroPools from factories outside the list
BalancerV3Pools of one Balancer V3 Vault, two factories fixed at constructionSETTLE (Vault unlock), no allowanceHook-adjusted amounts; hooks outside two pinned code hashes
InfinityCLPancakeSwap Infinity concentrated-liquidity poolsSETTLE (Vault lock), no allowanceafterSwap and returns-delta hooks, dynamic fees; hooks outside three pinned code hashes
InfinityBinPancakeSwap Infinity Bin poolsSETTLE (Vault lock), no allowanceThe same hook rules as InfinityCL
LBLiquidity Book pairs: LFJ v2.1 and v2.2, Pharaoh DLMM (one instance per factory)PUSHAFTER_SWAP hooks; a BEFORE_SWAP hook only if it is the one seen at creation
AlgebraIntegralAlgebra Integral custom pools (Blackhole CLMM), one instance per factoryPULL by callback, no allowanceBEFORE_SWAP and dynamic-fee plugins; an AFTER_SWAP plugin only with the code seen at creation

Source: src/adapters/*.sol, contract header comments, DEX repository main at 969bcc6.

Where they are configured

The repository wires adapters in two places, and neither is a deployment. Fork tests run the adapters behind a Gate against live pools: on Base for the two Curve and two Balancer adapters, on Avalanche for Liquidity Book and Algebra Integral, and on BNB Chain for the two PancakeSwap Infinity adapters. Local gas-campaign scripts replay the same wiring on a local fork.

The repository's deployment table for Gate adapters (`docs/deployments/gate-adapters.tsv`) has a header and no rows. Which adapters a deployed Gate admits, and on which chain, will be an on-chain fact: read the `AdapterAccepted` and `WrapperCreated` events after launch rather than any list, this one included.

What the Gate checks, and when it reverts

The Gate keeps one adapter per family. An adapter enters in two steps 48 hours apart (`ADAPTER_DELAY`). At the proposal the Gate walks the adapter's runtime code opcode by opcode and refuses `DELEGATECALL`, `CALLCODE` and `SELFDESTRUCT`, empty code, and an EIP-7702 delegation prefix, then records the code hash. The acceptance reverts if the code has changed since. From then on `liveAdapter` answers zero if the code at that address is no longer the pinned code, and every swap asks it.

Each swap through a wrapper then runs a fixed sequence, and any failed step reverts the whole transaction:

  1. Refuse re-entry (GateE 11) and anything but exact-in (GateE 12).
  2. Ask for the family's live adapter; none, or code that moved from its pin, reverts (GateE 4).
  3. Ask the caller for the input the V3 way and measure what arrived; less than asked reverts (GateE 13).
  4. Forward exactly that amount to the adapter, which trades on the pool and pays the recipient directly.
  5. Check custody: if the adapter now holds more of either token than before, revert (GateE 14); if the wrapper does, revert (GateE 15).
  6. Report as output the balance change measured at the recipient, never the number the adapter returned.

Why this protects the user

The protection comes from what the Router measures, not from trusting an adapter. The Router's floors, per leg, per hop and your own minimum output, are checked against the amount that actually arrived. A wrong quote, a lying return value or a skimmed output cannot pass that check; the swap reverts instead.

The other checks narrow what a bad adapter could even attempt. It cannot keep part of the input or the output, because custody is checked on both tokens. It cannot be swapped for different code without a public 48-hour proposal, because the hash is pinned. It cannot be pointed at an arbitrary pool, because the pool is fixed once at creation from the venue's own registry, and the wrapper's address is derived, not named in calldata.

A family can also be stopped at once. `clearAdapter` makes every wrapper of that family revert from the next call, in the same block, while the native kinds are untouched. That is a brake on trading, not a power over funds: the wrapper holds no tokens between calls.

What it does not protect

These limits follow from the design. They are stated so that you can weigh them.

Where to check

Read the Gate in `src/BlazePhoenixGate.sol`: the three properties are stated at the top, the opcode scan is `codeIsClean`, the pin is `liveAdapter`, and the wrapper's `swap` carries the custody checks. Each adapter states its custody, identity and hook rules in the header comment of its file under `src/adapters/`. The source is published under the Business Source License 1.1 (BUSL-1.1).

WhatFile
The Gate and the wrapperhttps://github.com/blazephoenixxyz-crypto/Blaze-Phoenix-Dex/blob/main/src/BlazePhoenixGate.sol
Shared adapter base and error codeshttps://github.com/blazephoenixxyz-crypto/Blaze-Phoenix-Dex/blob/main/src/adapters/ExtAdapterBase.sol
Curve StableSwap-NGhttps://github.com/blazephoenixxyz-crypto/Blaze-Phoenix-Dex/blob/main/src/adapters/BlazePhoenixAdapterCurveNG.sol
Curve Twocrypto-NG and Tricrypto-NGhttps://github.com/blazephoenixxyz-crypto/Blaze-Phoenix-Dex/blob/main/src/adapters/BlazePhoenixAdapterCurveCryptoNG.sol
Balancer V2https://github.com/blazephoenixxyz-crypto/Blaze-Phoenix-Dex/blob/main/src/adapters/BlazePhoenixAdapterBalancerV2.sol
Balancer V3https://github.com/blazephoenixxyz-crypto/Blaze-Phoenix-Dex/blob/main/src/adapters/BlazePhoenixAdapterBalancerV3.sol
PancakeSwap Infinity CLhttps://github.com/blazephoenixxyz-crypto/Blaze-Phoenix-Dex/blob/main/src/adapters/BlazePhoenixAdapterInfinityCL.sol
PancakeSwap Infinity Binhttps://github.com/blazephoenixxyz-crypto/Blaze-Phoenix-Dex/blob/main/src/adapters/BlazePhoenixAdapterInfinityBin.sol
Liquidity Bookhttps://github.com/blazephoenixxyz-crypto/Blaze-Phoenix-Dex/blob/main/src/adapters/BlazePhoenixAdapterLB.sol
Algebra Integralhttps://github.com/blazephoenixxyz-crypto/Blaze-Phoenix-Dex/blob/main/src/adapters/BlazePhoenixAdapterAlgebraIntegral.sol
Deployed Gate adapters (empty before launch)https://github.com/blazephoenixxyz-crypto/Blaze-Phoenix-Dex/blob/main/docs/deployments/gate-adapters.tsv

Source: DEX repository, main branch at 969bcc6.

Do not trust this page — reproduce it

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

git ls-tree --name-only origin/main src/adapters/   # eight BlazePhoenixAdapter*.sol files plus ExtAdapterBase.sol and IExtAdapter.sol at 969bcc6. Then: git show origin/main:src/BlazePhoenixGate.sol | grep -n 'ADAPTER_DELAY\|GateE(14)\|GateE(15)'
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). Venue adapters and the Gate: one adapter per pool design, admitted by a delay and a code pin. BlazePhoenix Engineering. https://blazephoenix.xyz/learn/venue-adapters-and-the-gate/
@misc{blazephoenix_venue_adapters_and_the_gate,
  title  = {Venue adapters and the Gate: one adapter per pool design, admitted by a delay and a code pin},
  author = {BlazePhoenix},
  year   = {2026},
  url    = {https://blazephoenix.xyz/learn/venue-adapters-and-the-gate/},
  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 · 2 / 20
One question, one producer: the shared-quantity register ›Every quantity used in two places gets the question each consumer asks and a single producer, or a named test that ties the copies. How the register works, and how to count it.7 min

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

Go to APP