The Monoslot: a routing engine's whole memory in one storage word

Known formally as The Monoslot in the BlazePhoenix whitepaper.

BlazePhoenix Engineering · updated 2026-07-17 · 5 min · written from the deployed bytecode

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

EnglishA pool's entire working state packs into one 256-bit word, so scoring a candidate costs a single SLOAD — measured on a Base fork: ~38% gas saved on every warm swap. Cheap truth is truth that keeps being read.

PortuguêsTodo o estado útil de um pool cabe numa única palavra de 256 bits, pelo que pontuar um candidato custa um único SLOAD — medido num fork da Base: ~38% de gas poupado em cada swap quente. Verdade barata é verdade que continua a ser lida.

EspañolTodo el estado útil de un pool cabe en una sola palabra de 256 bits, así que puntuar un candidato cuesta un solo SLOAD — medido en un fork de Base: ~38% de gas ahorrado en cada swap caliente. La verdad barata es la que se sigue leyendo.

FrançaisTout l'état utile d'un pool tient dans un seul mot de 256 bits : noter un candidat coûte un unique SLOAD — mesuré sur un fork de Base : ~38 % de gaz économisé à chaque swap chaud. Une vérité bon marché est une vérité qu'on continue de lire.

DeutschDer gesamte Arbeitszustand eines Pools passt in ein einziges 256-Bit-Wort; einen Kandidaten zu bewerten kostet einen einzigen SLOAD — gemessen auf einem Base-Fork: ~38 % Gas gespart bei jedem warmen Swap. Billige Wahrheit ist Wahrheit, die weiter gelesen wird.

РусскийВсё рабочее состояние пула упаковано в одно 256-битное слово, поэтому оценка кандидата стоит один SLOAD — замер на форке Base: ~38% газа экономится на каждом тёплом свопе. Дешёвая истина — та, которую продолжают читать.

TürkçeBir havuzun tüm çalışma durumu tek bir 256 bitlik kelimeye sığar; adayı puanlamak tek SLOAD'a mal olur — Base çatalında ölçüldü: her sıcak takasta ~%38 gaz tasarrufu. Ucuz hakikat, okunmaya devam eden hakikattir.

العربيةحالة المجمّع العاملة كلها تُحزم في كلمة واحدة من 256 بت، فيكلف تقييم المرشح قراءة SLOAD واحدة — قياس على تفريعة Base: توفير ~38% من الغاز في كل مبادلة دافئة. الحقيقة الرخيصة هي التي يستمر الجميع في قراءتها.

हिन्दीपूल की पूरी कार्यशील स्थिति एक 256-बिट शब्द में समा जाती है, इसलिए उम्मीदवार का स्कोर एक ही SLOAD में मिलता है — Base फोर्क पर मापा गया: हर वार्म स्वैप पर ~38% गैस बचत। सस्ता सच वही है जो पढ़ा जाता रहे।

日本語プールの全稼働状態が1つの256ビットワードに収まり、候補の採点はSLOAD一回で済みます。Baseフォークでの実測:ウォームスワップごとに約38%のガス節約。安く読める真実こそ、読まれ続ける真実です。

中文资金池的全部工作状态打包进一个 256 位字,为候选者打分只需一次 SLOAD——在 Base 分叉上实测:每次热交换节省约 38% 的 gas。便宜的真相才是持续被读取的真相。

한국어풀의 전체 작동 상태가 256비트 워드 하나에 담겨 후보 채점이 SLOAD 한 번이면 됩니다. Base 포크 실측: 웜 스왑마다 약 38% 가스 절약. 값싼 진실이 계속 읽히는 진실입니다.

Bahasa IndonesiaSeluruh status kerja sebuah pool terkemas dalam satu kata 256-bit, sehingga menilai kandidat hanya butuh satu SLOAD — terukur di fork Base: hemat gas ~38% pada tiap swap hangat. Kebenaran yang murah adalah kebenaran yang terus dibaca.

বাংলাএকটি পুলের সম্পূর্ণ কার্যকরী অবস্থা একটি ২৫৬-বিট শব্দে প্যাক হয়, তাই প্রার্থীর স্কোরিং লাগে একটিমাত্র SLOAD — Base ফর্কে পরিমাপকৃত: প্রতিটি ওয়ার্ম সোয়াপে ~৩৮% গ্যাস সাশ্রয়। সস্তা সত্যই সেই সত্য যা পড়া চলতে থাকে।

FilipinoAng buong working state ng isang pool ay nakasiksik sa iisang 256-bit na salita, kaya isang SLOAD lang ang gastos sa pag-iskor ng kandidato — sinukat sa Base fork: ~38% na tipid sa gas bawat warm swap. Ang murang katotohanan ang katotohanang patuloy na binabasa.

On-chain routing dies by a thousand SLOADs. The split allocator scores every candidate pool for every leg of every route it evaluates — and if each score needed a handful of storage reads, on-chain routing would be a luxury nobody pays for. The Monoslot is the answer: a pool's ENTIRE working state packed into one 256-bit word — active flag, bridge bit, fee tier, kind, risk tier, concentration bonus, depth bucket, last-update timestamp, volume EMAs, swap count, registration and last-touch blocks.

Reading a pool's fitness is therefore ONE cold SLOAD, and the scoring loop becomes a tight arithmetic kernel over single words. Measured on a Base mainnet fork: the first discovery of a pair pays to learn it, and every subsequent swap reads the cached Monoslot for a consistent ~38% gas saving. This is the difference between a routing engine that is affordable to run on-chain and one that is not.

Packing as protocol design, not micro-optimization

The bit layout is load-bearing: the concentration bonus is masked to 12 bits so it can never bleed into the depth bucket's 4 bits; the vitality decay reads swap count and last-block from the same word it will write back; the bridge bit is stamped at registration so the fitness read needs no second lookup. Every field earns its bits by being needed in the same computation.

The deeper doctrine: state that is expensive to read is state that will eventually be read less honestly — cached off-chain, approximated, or skipped. Making the truth cheap to read on-chain is what keeps the whole system reading the truth.

Do not trust this page — reproduce it

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

cast call <hub> "getSlot(bytes32)(uint256)" <key> --rpc-url https://mainnet.base.org — one word, decode the fields yourself

Contracts 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

Related engineering