Connect
Cover: Gate vitality and adapter depth: asking the venue

Gate vitality and adapter depth: asking the venue

How does a gated venue report that it is alive, and how deep it is?

Gate.vitalOf reads a wrapper's use count and the depth its adapter declares from the venue's own balances, capped by what the venue contract holds. A discovery signal, never a price source.

BlazePhoenix Engineering · article updated 2026-11-17 · site dataset through 2026-11-19 · 6 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 — How a gated venue reports that it is alive and how deep it is: the wrapper counts material swaps (MATERIAL_SHIFT), Gate.vitalOf reads the depth the adapter declares from the venue's own balances and caps it by what the venue holds, and Quoter.gateVitalOf exposes it. A discovery signal for the 2.0.0 generation, not a price source.

Português — Como um venue com gate informa que está vivo e qual a sua profundidade: o wrapper conta os swaps materiais (MATERIAL_SHIFT), o Gate.vitalOf lê a profundidade que o adapter declara a partir dos saldos do próprio venue e limita-a pelo que o venue detém, e o Quoter.gateVitalOf expõe-na. Um sinal de descoberta da geração 2.0.0, não uma fonte de preço.

Español — Cómo un venue con gate informa de que está vivo y de su profundidad: el wrapper cuenta los swaps materiales (MATERIAL_SHIFT), Gate.vitalOf lee la profundidad que el adapter declara a partir de los saldos del propio venue y la limita por lo que el venue tiene, y Quoter.gateVitalOf la expone. Una señal de descubrimiento de la generación 2.0.0, no una fuente de precio.

Français — Comment une venue derrière le gate signale qu'elle est vivante et sa profondeur : le wrapper compte les swaps significatifs (MATERIAL_SHIFT), Gate.vitalOf lit la profondeur que l'adapter déclare à partir des soldes de la venue et la plafonne par ce que la venue détient, et Quoter.gateVitalOf l'expose. Un signal de découverte de la génération 2.0.0, pas une source de prix.

Deutsch — Wie eine Venue hinter dem Gate meldet, dass sie lebt und wie tief sie ist: der Wrapper zählt materielle Swaps (MATERIAL_SHIFT), Gate.vitalOf liest die Tiefe, die der Adapter aus den eigenen Salden der Venue meldet, und deckelt sie durch das, was die Venue hält, und Quoter.gateVitalOf macht sie lesbar. Ein Entdeckungssignal der Generation 2.0.0, keine Preisquelle.

Русский — Как площадка за гейтом сообщает, что она жива и насколько глубока: обёртка считает существенные свопы (MATERIAL_SHIFT), Gate.vitalOf читает глубину, которую адаптер заявляет по собственным балансам площадки, и ограничивает её тем, что площадка держит, а Quoter.gateVitalOf делает её доступной. Сигнал обнаружения поколения 2.0.0, а не источник цены.

Türkçe — Gate arkasındaki bir venue canlı olduğunu ve derinliğini nasıl bildirir: wrapper anlamlı swap'ları sayar (MATERIAL_SHIFT), Gate.vitalOf adapter'ın venue'nun kendi bakiyelerinden beyan ettiği derinliği okur ve venue'nun tuttuğu miktarla sınırlar, Quoter.gateVitalOf ise bunu sunar. 2.0.0 nesli için bir keşif sinyali, fiyat kaynağı değil.

العربية — كيف تُبلغ منصة خلف البوابة أنها حية وما عمقها: الغلاف يعدّ الصفقات الجوهرية (MATERIAL_SHIFT)، ويقرأ Gate.vitalOf العمق الذي يعلنه المحوّل من أرصدة المنصة نفسها ويحدّه بما تحتفظ به المنصة، ويعرضه Quoter.gateVitalOf. إشارة اكتشاف لجيل 2.0.0 وليست مصدرًا للسعر.

हिन्दी — gate के पीछे का venue कैसे बताता है कि वह सक्रिय है और कितना गहरा है: wrapper महत्वपूर्ण swaps गिनता है (MATERIAL_SHIFT), Gate.vitalOf वह गहराई पढ़ता है जो adapter venue के अपने balances से घोषित करता है और उसे venue के पास मौजूद राशि तक सीमित करता है, और Quoter.gateVitalOf उसे दिखाता है। 2.0.0 पीढ़ी के लिए खोज का संकेत, कीमत का स्रोत नहीं।

日本語 — ゲートの背後にある venue が稼働中であることと深さを伝える仕組み:wrapper は実質的な swap を数え (MATERIAL_SHIFT)、Gate.vitalOf は adapter が venue 自身の残高から申告する深さを読み、venue の保有量で上限を設け、Quoter.gateVitalOf がそれを公開します。2.0.0 世代の発見のシグナルであり、価格の情報源ではありません。

中文 — 网关后的场所如何报告自己仍然活跃以及深度:wrapper 统计实质性兑换 (MATERIAL_SHIFT),Gate.vitalOf 读取 adapter 依据场所自身余额申报的深度,并以场所实际持有量为上限,Quoter.gateVitalOf 将其公开。这是 2.0.0 代的发现信号,而非价格来源。

한국어 — 게이트 뒤의 venue가 살아 있음과 깊이를 알리는 방식: wrapper는 의미 있는 스왑을 세고 (MATERIAL_SHIFT), Gate.vitalOf는 adapter가 venue 자체 잔액에서 신고한 깊이를 읽어 venue가 보유한 양으로 상한을 두며, Quoter.gateVitalOf가 이를 공개합니다. 2.0.0 세대의 발견 신호이지 가격 출처가 아닙니다.

Bahasa Indonesia — Cara venue di balik gate melaporkan bahwa ia aktif dan seberapa dalam: wrapper menghitung swap yang material (MATERIAL_SHIFT), Gate.vitalOf membaca kedalaman yang dinyatakan adapter dari saldo venue sendiri dan membatasinya dengan yang dipegang venue, dan Quoter.gateVitalOf menampilkannya. Sinyal penemuan untuk generasi 2.0.0, bukan sumber harga.

বাংলা — gate-এর পেছনের venue কীভাবে জানায় যে সেটি সক্রিয় এবং কত গভীর: wrapper উল্লেখযোগ্য swap গোনে (MATERIAL_SHIFT), Gate.vitalOf adapter-এর ঘোষিত গভীরতা venue-এর নিজস্ব balance থেকে পড়ে এবং venue যা ধরে রাখে তা দিয়ে সীমিত করে, আর Quoter.gateVitalOf তা দেখায়। 2.0.0 প্রজন্মের আবিষ্কারের সংকেত, দামের উৎস নয়।

Filipino — Paano iniuulat ng venue sa likod ng gate na buhay ito at gaano kalalim: binibilang ng wrapper ang mga makabuluhang swap (MATERIAL_SHIFT), binabasa ng Gate.vitalOf ang lalim na idinedeklara ng adapter mula sa sariling balanse ng venue at nililimitahan ito sa hawak ng venue, at inilalantad ito ng Quoter.gateVitalOf. Isang hudyat ng pagtuklas para sa 2.0.0 generation, hindi pinagmumulan ng presyo.

For a gated venue, the registry's two questions, is it alive and how deep is it, are answered by the BlazePhoenixGate from two readings: a use count the wrapper keeps itself, and a depth the adapter declares from the venue's own balances, capped by what the venue contract holds. Gate.vitalOf returns the three figures (vitality, depth18, psi) in the Hub's units.

These figures are a discovery signal, not a price source. No swap reads them; prices come from quotes, and execution is checked against measured balance changes. The Gate arrives with the 2.0.0 generation, scheduled for 15 December 2026, and is not deployed yet.

What does a wrapper count as use?

A wrapper writes its use counter, vitalSlot, in its swap function and nowhere else, in the slot layout the Hub uses for registered pairs, through Core's tickSlot and stampTs. A swap counts when it delivers a non-zero output and is material on both sides of the venue: the input must be at least 2^-16 of the venue contract's balance of the input token, and the output at least 2^-16 of its balance of the output token, each compared in its own token. That threshold is MATERIAL_SHIFT = 16, about 0.15 basis points.

Dust therefore pays gas and buys no vitality. The count decays in wall-clock time: Core.vitality shifts it right once per 24,576 seconds since the last update, and after 32 steps, about 9.1 days, a slot reads as dead.

How does Gate.vitalOf compute its three numbers?

vitalOf returns zeros unless this Gate created the wrapper and the wrapper's family has a live adapter: a cleared family cannot execute, so it does not rank. Otherwise, v is Core.vitality over vitalSlot. The depth, depth18, is the second return value of the wrapper's quote, called with an input of zero under a gas cap of GATE_QUOTE_GAS (500,000 gas), and a failed call reads as zero.

That declared depth is then capped by BPC.heldMass18: the larger of the venue contract's two token balances, normalised to 18 decimals and read with balanceOf. psi is Core's composite fitness over the slot with the depth bucket of that capped depth, without the bridge or concentration bonus.

v       = Core.vitality(wrapper.vitalSlot, now)
depth18 = min(adapterDeclared18, heldMass18(venue, token0, token1))
psi     = Core.psi(slot with depthBucket(depth18), now, no bonus)
# depthBucket(d) = min(15, floor(log10(d / 1e15)))

How do adapters declare depth18?

Each adapter reads depth in the form its venue answers, and seven of the eight adapters send the result through one producer, ExtAdapterBase._depth18, which calls Core.shortSide18: the shorter of the two sides, each normalised by its token's decimals. The PancakeSwap Infinity CL adapter converts the pool's liquidity at its current price with Core.depthFromL18, the registry's own depth for concentrated pools. The declared depth never reads the trade size: the interface requires depth18 not to depend on the input amount.

VenueWhat the adapter readsProducer
Curve StableSwap-NGcoins(i) and balances(i) at the pair's indices_indexedDepth18
Curve Twocrypto-NG, Tricrypto-NGcoins(i) and balances(i) at the pair's indices_indexedDepth18
Balancer V2Vault.getPoolTokens(poolId)_listedDepth18
Balancer V3Vault.getPoolTokenInfo, raw balances_listedDepth18
PancakeSwap Infinity CLgetSlot0 and getLiquidity of the pool; zero while the Vault is lockedCore.depthFromL18
PancakeSwap Infinity BingetBin at the active bin; zero while the Vault is locked_depth18
Liquidity Book (LFJ v2.1, v2.2, Pharaoh DLMM)getReserves() of the pair_depth18
Algebra Integral (Blackhole)getReserves() of the pool_depth18

Why is the declared depth capped?

A declared depth is the adapter's statement; the cap is a measurement. vitalOf takes the smaller of the two, so an adapter cannot report more mass than the venue contract physically holds. heldMass18 is the same producer the registry applies to concentrated venues, so a declared depth meets the same cap at both doors.

For the Curve adapters the depth is read when the venue's own price probe reports it is not mid-operation. For Balancer, the venue contract a wrapper points at is the Vault, so the cap is what the Vault holds of the pair; the Balancer adapters quote by eth_call (quoteCall), and their view quote declares depth with an output of zero.

How do you read it from outside?

Quoter.gateVitalOf takes the wrapper, the two tokens and the venue key. It checks the wrapper's identity with BPC.gateWrapperLive, the same check the Router applies to a kind 9 leg, and then returns Gate.vitalOf for it. The Quoter adds no figure of its own. Placeholders stand in for addresses until the 2.0.0 deployment is published.

cast call <quoter> "gateVitalOf(address,address,address,uint24)(uint256,uint256,uint256)" <wrapper> <tokenA> <tokenB> <venueKey> --rpc-url <your node>

What vitality does not do

Vitality and depth decide nothing at execution. The wrapper's swap never reads its quote, and the Router's floors come from what it measures in the transaction and from the caller's minimum. In this design the Solver does not plan Gate legs, so gated venues are reached through explicit routes, and these figures describe them for whoever builds those routes.

Do not trust this page — reproduce it

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

git clone https://github.com/blazephoenixxyz-crypto/Blaze-Phoenix-Dex && cd Blaze-Phoenix-Dex && grep -n 'MATERIAL_SHIFT\|function vitalOf' src/BlazePhoenixGate.sol && grep -n 'function gateVitalOf' src/BlazePhoenixQuoter.sol && grep -n 'function _depth18' src/adapters/ExtAdapterBase.sol
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). Gate vitality and adapter depth: asking the venue. BlazePhoenix Engineering. https://blazephoenix.xyz/learn/gate-vitality-adapter-depth/
@misc{blazephoenix_gate_vitality_adapter_depth,
  title  = {Gate vitality and adapter depth: asking the venue},
  author = {BlazePhoenix},
  year   = {2026},
  url    = {https://blazephoenix.xyz/learn/gate-vitality-adapter-depth/},
  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 Adaptive systems · 1 / 2
Memory and measurement: what learned state may change, and what it may never touch ›Two kinds of remembered state with two materially different boundaries. One can only reorder work. The other ranks a candidate list and then truncates it — which reaches route selection by omission, and the stronger formulation of the quarantine does not survive that.12 min

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

Go to APP