Connect ›
Cover: Hostile venues and the sandwich curve: ten pathologies, two doors, and the attacker’s side of the floor

Hostile venues and the sandwich curve: ten pathologies, two doors, and the attacker’s side of the floor

Ten venue pathologies crossed with two doors settle or refuse with a selector of ours — 20 of 20, no third outcome. Then the floor from the attacker’s side: on a 1 %-of-depth trade a sandwich takes about 2.7 % of the trade at most, the floor refuses beyond about 3 % of manipulation.

Known formally as The Hostile-Venue Matrix and the Sandwich Curve in the BlazePhoenix whitepaper.

BlazePhoenix Engineering · updated 2026-09-06 · data through 2026-10-11 · 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 — Ten venue pathologies crossed with two doors settle or refuse with a selector of ours — 20 of 20, no third outcome. Then the floor from the attacker’s side: on a 1 %-of-depth trade a sandwich takes about 2.7 % of the trade at most, the floor refuses beyond about 3 % of manipulation, and past that edge the attacker’s round trip is negative.

Português — Dez patologias de local cruzadas com duas portas liquidam ou recusam com um selector nosso — 20 of 20, sem terceiro desfecho. Depois o piso visto do lado do atacante: numa troca de 1 %-of-depth um sandwich leva no máximo cerca de 2.7 % da troca, o piso recusa para lá de cerca de 3 % de manipulação, e passada essa aresta a ida-e-volta do atacante é negativa.

Español — Diez patologías de sede cruzadas con dos puertas liquidan o rechazan con un selector nuestro — 20 of 20, sin tercer resultado. Después, el suelo desde el lado del atacante: en una operación de 1 %-of-depth un sandwich se lleva como mucho un 2.7 % de la operación, el suelo rechaza más allá de cerca de 3 % de manipulación, y pasado ese borde el viaje de ida y vuelta del atacante es negativo.

Français — Dix pathologies de place croisées avec deux portes règlent ou refusent avec un sélecteur à nous — 20 of 20, pas de troisième issue. Ensuite le plancher vu du côté de l’attaquant : sur un échange de 1 %-of-depth, un sandwich prend au plus environ 2.7 % de l’échange, le plancher refuse au-delà d’environ 3 % de manipulation, et passé ce bord l’aller-retour de l’attaquant est négatif.

Deutsch — Zehn Pathologien von Handelsplätzen, gekreuzt mit zwei Türen, rechnen ab oder lehnen mit einem unserer Selektoren ab — 20 of 20, kein drittes Ergebnis. Dann die Untergrenze von der Seite des Angreifers: bei einem Handel von 1 %-of-depth nimmt ein Sandwich höchstens etwa 2.7 % des Handels, die Untergrenze lehnt jenseits von etwa 3 % Manipulation ab, und hinter dieser Kante ist der Round Trip des Angreifers negativ.

Русский — Десять патологий площадок, скрещённых с двумя дверями, либо рассчитываются, либо отказывают нашим селектором — 20 of 20, третьего исхода нет. Затем пол со стороны атакующего: на сделке размером 1 %-of-depth сэндвич забирает самое большее около 2.7 % сделки, пол отказывает за пределами примерно 3 % манипуляции, и за этой гранью круговая сделка атакующего убыточна.

Türkçe — İki kapıyla çaprazlanan on borsa patolojisi ya kapanır ya da bize ait bir seçiciyle reddeder — 20 of 20, üçüncü bir sonuç yok. Sonra tabanın saldırgan tarafından görünüşü: 1 %-of-depth büyüklüğünde bir işlemde bir sandwich işlemin en fazla 2.7 % kadarını alır, taban yaklaşık 3 % manipülasyonun ötesinde reddeder ve bu kenardan sonra saldırganın gidiş-dönüşü zarardadır.

العربية — عشر أمراض للمنصات مضروبة في بابين إمّا تُسوّى أو تُرفض بمُحدِّد من عندنا — 20 of 20، ولا نتيجة ثالثة. ثم الحد الأدنى من جهة المهاجم: في صفقة بحجم 1 %-of-depth يأخذ الساندويتش 2.7 % من الصفقة على الأكثر، ويرفض الحد الأدنى بعد نحو 3 % من التلاعب، وبعد تلك الحافة تصبح رحلة المهاجم ذهابًا وإيابًا خاسرة.

हिन्दी — दस वेन्यू विकृतियाँ दो दरवाज़ों से गुणा होकर या तो निपटती हैं या हमारे अपने सिलेक्टर के साथ मना करती हैं — 20 of 20, कोई तीसरा परिणाम नहीं। फिर हमलावर की तरफ़ से न्यूनतम सीमा: 1 %-of-depth के व्यापार पर एक sandwich अधिक से अधिक व्यापार का लगभग 2.7 % लेता है, न्यूनतम सीमा लगभग 3 % हेरफेर के आगे मना कर देती है, और उस किनारे के बाद हमलावर की आवाजाही घाटे की है।

日本語 — 十種類の取引所の病理を二つのドアと掛け合わせると、決済するか、当方の selector で拒否するかのどちらかになる — 20 of 20、第三の結末はない。次に攻撃者側から見た下限。1 %-of-depth の取引に対してサンドイッチが取れるのはせいぜい取引の約 2.7 %、下限はおよそ 3 % の操作を超えると拒否し、その縁を越えると攻撃者の往復は赤字になる。

中文 — 十种场所病态与两扇门交叉,要么结算,要么用我们自己的 selector 拒绝 — 20 of 20,没有第三种结果。接着从攻击者一侧看下限:在一笔 1 %-of-depth 的交易上,三明治攻击最多拿走该笔交易的约 2.7 %;操纵超过约 3 % 时下限就会拒绝;越过那条边界,攻击者的往返是负的。

한국어 — 열 가지 거래소 병리를 두 개의 문과 교차하면 정산되거나 우리 쪽 selector로 거절된다 — 20 of 20, 제3의 결과는 없다. 다음은 공격자 쪽에서 본 하한. 1 %-of-depth 규모의 거래에서 샌드위치가 가져가는 몫은 많아야 거래의 약 2.7 %이고, 하한은 약 3 %의 조작을 넘어서면 거절하며, 그 경계를 넘으면 공격자의 왕복은 손실이다.

Bahasa Indonesia — Sepuluh patologi bursa disilangkan dengan dua pintu: menyelesaikan atau menolak dengan selector milik kami — 20 of 20, tanpa hasil ketiga. Lalu batas bawah dari sisi penyerang: pada perdagangan sebesar 1 %-of-depth sebuah sandwich paling banyak mengambil sekitar 2.7 % dari perdagangan itu, batas bawah menolak di atas sekitar 3 % manipulasi, dan melewati tepi itu perjalanan pulang-pergi penyerang menjadi rugi.

বাংলা — দশটি ভেন্যু-ব্যাধি দুটি দরজার সঙ্গে গুণিত হয়ে হয় নিষ্পত্তি করে, নয়তো আমাদের নিজস্ব selector দিয়ে প্রত্যাখ্যান করে — 20 of 20, তৃতীয় কোনো ফল নেই। তারপর আক্রমণকারীর দিক থেকে নিম্নসীমা: 1 %-of-depth মাপের একটি লেনদেনে একটি sandwich বড়জোর লেনদেনের প্রায় 2.7 % নেয়, নিম্নসীমা প্রায় 3 % কারসাজির পরে প্রত্যাখ্যান করে, আর সেই প্রান্ত পেরোলে আক্রমণকারীর যাওয়া-আসা ক্ষতির।

Filipino — Sampung patolohiya ng venue na kinrus sa dalawang pinto ay nag-se-settle o tumatangging may selector na sa amin — 20 of 20, walang ikatlong kalabasan. Pagkatapos, ang sahig mula sa panig ng umaatake: sa isang kalakalang 1 %-of-depth, ang isang sandwich ay kumukuha ng humigit-kumulang 2.7 % ng kalakalan sa pinakamataas, tumatanggi ang sahig lampas sa mga 3 % na manipulasyon, at lampas sa gilid na iyon ay negatibo ang balikang biyahe ng umaatake.

What you gain from this page is two measurements of the same guarantee from opposite sides. The hostile-venue matrix asks what a pool that misbehaves can do to a settlement; the sandwich curve asks what an adversary who orders the block can take from one. Both are answered under one rule, the covering array’s: a swap either settles with the delivered amount equal to the balance delta and nothing left on the Router, or it is refused with a selector of ours. Anything else is a third way, and a third way fails the row.

The victim’s loss against the quote and the attacker’s round trip by fraction of depth moved, with the refusal region from 3 %
The sandwich from the attacker’s side on a 1 %-of-depth trade: the victim’s loss against the quote and the attacker’s round trip, by fraction of depth moved ahead; from 3 % the floor refuses and the attacker’s round trip is negative. Source: ASSURANCE.md §4j.

The ten pathologies

Token pathologies had their tests; venue pathologies had none in a matrix. test/regime/HostileVenues.sol holds one misbehaviour per venue, and HostileVenueMatrix.t.sol crosses each with the calldata door and the solve-in-transaction door. Two cells carry a sharper oracle than the rule: a venue that under-pays must be refused, and the re-entering pool records whether the Router ever let its nested swap run.

venuecalldata doorsolve door
pays nothing / pays halfrefused RouterE(5)refused RouterE(5)
returndata bomb on the reserve read (64 KiB)settlessettles
reserve read burns all gasrefused RouterE(8)the planner never selects it
swap burns all gaswhole transaction reverts, balance untouchedwhole transaction reverts, balance untouched
decimals() burns all gassettlessettles
payment callback fired twicerefused RouterE(6)refused RouterE(6)
re-enters the Router before payingsettles; the nested swap never ransettles; the nested swap never ran
slot0() revertssettles on the attested quotethe planner never selects it
factory answers with a pool on other tokensnever listednever listed

Source: ASSURANCE.md §4i; forge test --match-path test/regime/HostileVenueMatrix.t.sol — ten pathologies × two doors, 20 of 20, 0 third way

Two rows deserve their own sentence. A swap that burns all forwarded gas is the one cell no caller can decide for its callee; the transaction reverts whole and the user’s balance is untouched, which is asserted rather than assumed. And the last row is what the matrix’s first run changed. Discovery listed a pool a curator-admitted factory answered with, the planner ranked it, and the executor refused it at the seam that pays — funds never at risk, the pair refused while the impostor won the split. An asked pool now proves its own token0 and token1 before discovery lists it, with the reads the executor already makes, so a pool that would be refused at execution is never listed, planned or ranked. A derived address is a theorem over the pair and needs no proof.

The limit of the matrix

The ten pathologies are the ones named. Classes nobody has named are outside the denominator by construction, which is the same limit every catalogue in this repository carries and prints. What the matrix does establish is narrower and worth having: for each named misbehaviour, through each door, there is exactly one of two outcomes, and the outcome is the same one the covering array asserts on every honest row.

The sandwich, from the attacker’s side

Every floor test asks whether a bad fill is refused. test/regime/SandwichCurve.t.sol asks the other question: what can an adversary who orders the block extract before it is? The victim’s route and floor are fixed at quote time, as in a pending transaction; the attacker trades a fraction of the pool’s depth ahead of the victim, the victim executes, the attacker trades back. The venue is a constant-product pair — the shape every sandwich model uses — so the curve is a property of the Iron-Law floor Φ, not of a venue.

attacker movesvictimvictim’s loss vs the quoteattacker’s round trip
0.1 % of depthsettles0.47 %+13.9
0.5 %settles1.26 %+68.9
1 %settles2.22 %+136.7
2 %settles4.12 %+268.7
3 % and beyondrefused0−174.5 … −544.9

Source: ASSURANCE.md §4j; forge test --match-path test/regime/SandwichCurve.t.sol -vv — a 1 %-of-depth trade, 10,000 against 1,000,000 a side, constant-product mocks

Read the last settled row. The attacker’s best round trip against a 10,000-unit trade is +268.7, about 2.7 % of the trade; one step further, at 3 % of depth, the victim is refused and the attacker is left holding the price they moved, at a loss between 174.5 and 544.9. Two properties are asserted at every point of the grid. A settled victim never receives less than the floor attested at quote time, so the loss is bounded by the distance between the attested quote and the attested floor. And the refusal region is closed upward: past the edge, every larger manipulation is refused. There is no point on the curve where a bigger push buys the attacker a fill.

What the curve does and does not say

Reproduce

forge test --match-path test/regime/HostileVenueMatrix.t.sol       # ten pathologies × two doors
forge test --match-path test/regime/SandwichCurve.t.sol -vv         # the curve, row by row

Do not trust this page — reproduce it

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

forge test --match-path test/regime/SandwichCurve.t.sol -vv  # prints the five rows above, victim and attacker sides, on a fresh run
Cite this article

Licensed CC BY 4.0 — quote, translate and reuse freely, including commercially, with attribution and a link. Copy a ready-made citation:

BlazePhoenix (2026). Hostile venues and the sandwich curve: ten pathologies, two doors, and the attacker’s side of the floor. BlazePhoenix Engineering. https://blazephoenix.xyz/learn/hostile-venues-and-the-sandwich-curve
@misc{blazephoenix_hostile_venues_and_the_sandwich_curve,
  title  = {Hostile venues and the sandwich curve: ten pathologies, two doors, and the attacker’s side of the floor},
  author = {BlazePhoenix},
  year   = {2026},
  url    = {https://blazephoenix.xyz/learn/hostile-venues-and-the-sandwich-curve},
  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 Adversarial robustness · 1 / 2
The capital anchor: converting a statistical defence into an economic one, and the price of doing it ›Why the believability band is centred on the deepest candidate rather than on the median, what that buys against a Sybil-populated candidate set, and the limit stated in the same breath: selecting by maximum is an argmax, and an argmax has a breakdown point of zero.11 min

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