The probability of a bad fill: execution as a distribution, not a number

Known formally as Execution Risk in the BlazePhoenix whitepaper.

BlazePhoenix Engineering · updated 2026-07-29 · 10 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 · 摘要 · 要旨 · ملخص

EnglishA quote is a point estimate; a fill is a draw from a distribution. Impact is deterministic and reducible by sizing and splitting; the market term is stochastic with an adversarially fat left tail — and only a hard enforced floor bounds that tail, converting an open-ended loss into fill-or-revert.

PortuguêsUma cotação é uma estimativa pontual; um preenchimento é um sorteio de uma distribuição. O impacto é determinístico e reduzível por tamanho e divisão; o termo de mercado é estocástico com cauda esquerda adversarialmente gorda — e só um piso rígido limita essa cauda, tornando a perda ilimitada num enche-ou-reverte.

EspañolUna cotización es una estimación puntual; una ejecución es una extracción de una distribución. El impacto es determinista y reducible; el término de mercado es estocástico con cola izquierda adversarialmente gruesa — y solo un suelo estricto acota esa cola, convirtiendo la pérdida abierta en llenar-o-revertir.

FrançaisUne cotation est une estimation ponctuelle ; une exécution est un tirage dans une distribution. L'impact est déterministe et réductible ; le terme de marché est stochastique avec une queue gauche épaisse par adversité — seul un plancher strict borne cette queue, transformant la perte ouverte en exécuter-ou-annuler.

DeutschEin Quote ist eine Punktschätzung; eine Ausführung ist eine Ziehung aus einer Verteilung. Impact ist deterministisch und reduzierbar; der Marktterm ist stochastisch mit adversarisch fettem linken Rand — nur ein harter Floor begrenzt diesen Rand und macht aus offenem Verlust ein Füllen-oder-Zurücksetzen.

РусскийКотировка — точечная оценка; исполнение — выборка из распределения. Влияние детерминировано и снижаемо; рыночный член стохастичен с состязательно тяжёлым левым хвостом — и только жёсткий порог ограничивает этот хвост, превращая открытый убыток в исполнить-или-откатить.

TürkçeKotasyon bir nokta tahminidir; dolum bir dağılımdan çekilen örnektir. Etki belirlenimcidir ve azaltılabilir; piyasa terimi olasılıksaldır ve düşmanca kalın bir sol kuyruğu vardır — bu kuyruğu yalnızca sert bir taban sınırlar, açık ucu zararı doldur-ya-da-geri-al haline getirir.

العربيةالتسعيرة تقدير نقطي؛ والتنفيذ سحبة من توزيع. الأثر حتمي وقابل للتقليل؛ أما حد السوق فعشوائي بذيل أيسر سمين عدائيًا — وحده أرضية صارمة تحدّ ذلك الذيل، محوِّلة الخسارة المفتوحة إلى تنفيذ-أو-تراجع.

हिन्दीकोट एक बिंदु-अनुमान है; फिल एक वितरण से निकाला गया प्रतिदर्श। प्रभाव नियतात्मक और घटाने योग्य है; बाज़ार पद प्रसंभाव्य है जिसकी बाईं पूँछ विरोधी रूप से मोटी है — और उस पूँछ को केवल एक कठोर फ़्लोर बाँधता है, असीमित हानि को भरो-या-पलटो में बदलकर।

日本語見積もりは点推定、約定は分布からの一つの引きです。インパクトは決定的で削減可能、市場項は確率的で左裾が敵対的に厚い — その裾を縛れるのは強制フロアだけで、青天井の損失を「約定するか差し戻すか」に変えます。

中文报价是点估计,成交是从分布中抽样。冲击是确定性的、可通过拆分降低;市场项是随机的,且左尾因对手行为而肥厚——只有强制下限能约束该尾部,把无上限的亏损变成成交或回滚。

한국어견적은 점추정이고 체결은 분포에서 뽑은 표본입니다. 임팩트는 결정적이며 줄일 수 있고, 시장 항은 확률적이며 좌측 꼬리가 적대적으로 두껍습니다 — 그 꼬리를 묶는 것은 강제 하한뿐이며, 무한한 손실을 체결-또는-되돌림으로 바꿉니다.

Bahasa IndonesiaKuotasi adalah estimasi titik; eksekusi adalah tarikan dari distribusi. Dampak bersifat deterministik dan bisa dikurangi; suku pasar bersifat stokastik dengan ekor kiri gemuk secara adversarial — hanya lantai keras yang membatasi ekor itu, mengubah kerugian tanpa batas menjadi isi-atau-batal.

বাংলাকোট একটি বিন্দু-অনুমান; ফিল একটি বণ্টন থেকে নেওয়া নমুনা। ইমপ্যাক্ট নিশ্চায়ক ও কমানো যায়; বাজার পদটি সম্ভাব্য এবং তার বাঁ-দিকের লেজ প্রতিদ্বন্দ্বীভাবে মোটা — সেই লেজ বাঁধে কেবল কঠোর ফ্লোর, অসীম ক্ষতিকে ভরাও-বা-ফেরাও-তে বদলে।

FilipinoAng quote ay point estimate; ang fill ay isang bunot mula sa distribusyon. Ang impact ay deterministiko at nababawasan; ang market term ay stochastic na may adversarial na makapal na kaliwang buntot — tanging matigas na floor ang nakakapigil doon, ginagawang fill-o-revert ang walang-hanggang lugi.

Traders read a quote as a number. It is more useful, and more honest, to read it as the centre of a distribution. What you receive is a random variable whose mean is set by things that are knowable before you sign, and whose spread is set by things that are not. Almost every bad execution outcome comes from confusing the two — or from managing the mean while ignoring the tail.

Decomposing the fill

Realised output decomposes cleanly into three terms. First, the deterministic cost you cause yourself by consuming finite depth: price impact. It is computable in advance from pool state, it is convex in size, and it is not random at all. Second, the stochastic term: the market moving between the instant of the quote and the instant of inclusion — ordinary volatility plus, in an adversarial mempool, the deliberate reordering of trades around yours. Third, fixed costs: gas and protocol fees, which are small and knowable.

These require completely different treatment. The first is an optimisation problem: choose the allocation that minimises it. The second is a risk problem: you cannot predict a draw, you can only shape its distribution and bound its tail. Treating the second like the first — "set slippage to 5% and hope" — is not risk management; it is an unpriced option written to whoever is watching the mempool.

out = quote · (1 − impact(x)) · (1 + ε) − costs, ε ~ D(0, σ²)
Impact is deterministic and convex in size; ε is the stochastic term with mean around zero and a fat, adversarially-shaped left tail. Different terms, different remedies.

Why the tail is not Gaussian

It is tempting to model ε as symmetric noise. It is not. Ordinary volatility is roughly symmetric, but the adversarial component is one-sided by construction: an actor who can observe pending transactions and choose ordering profits only by moving the price AGAINST the pending trade. Nobody is spending gas to give you a better price.

That asymmetry has a practical consequence. The distribution of realised outcomes has a left tail that is both fatter and more responsive to your own parameters than a naive model suggests — because a wide tolerance does not merely permit a bad outcome, it INVITES one. A published willingness to accept, say, five per cent worse tells any observer exactly how much value can be extracted before the trade stops settling. The tolerance is not a passive safety margin; it is a bid, and the market will meet it.

What splitting actually buys

Distributing an order across independent venues lowers the mean cost, because impact is convex and the sum of the parts is cheaper than the whole. It also does something distinct to the risk term: the realised outcome becomes an average of several draws rather than a single one, so independent deviations partially cancel and the VARIANCE of the fill narrows even when its mean is unchanged.

The size of that benefit depends entirely on independence. Averaging over venues whose prices move together buys almost nothing — correlation is the enemy of diversification here exactly as it is in a portfolio, and two venues that arbitrage keeps welded together within a block are one venue wearing two names. And variance reduction is not tail protection: narrowing the body of a distribution leaves the extreme quantiles largely intact. Splitting improves the expected outcome and the typical outcome. It does not save you in the bad case.

Bounding the tail: the floor as a hard constraint

The only instrument that acts on the tail rather than the body is a hard minimum-output constraint enforced at settlement: below this amount, do not settle — revert. Its effect on the distribution is qualitative rather than incremental. Instead of an unbounded loss with some small probability, the outcome becomes bimodal: either a fill within the acceptable region, or no trade at all and the cost of gas.

This is worth stating precisely, because it changes what "risk" means for the transaction. Without the constraint, the quantity at risk is the trade size and the exposure is open-ended in the left tail. With it, the maximum loss is capped by construction and the residual risk is a small, known execution cost on the reverted path. You have converted an open-ended downside into a bounded one, and paid for it with a probability of not trading.

Two design consequences follow. First, the constraint must be derived from the real trade AT EXECUTION rather than read from data the caller supplied, or it is not a constraint at all — anyone who can widen it can widen it to nothing. Second, tightness has a real cost: a floor set close to the quote will occasionally revert on ordinary volatility, and that revert rate is the premium you pay for the bound. Choosing it is a genuine trade-off between fill probability and tail protection, and it should be chosen deliberately rather than defaulted to whatever number makes the reverts stop.

Reading a quote like a statistician

The practical upshot is a short list. Ask what the quote is a point estimate OF — a number computed by the same code that will execute is a far tighter estimator than one computed by a separate pricing service that may diverge from settlement. Ask which part of the spread is your own impact (reducible by sizing and splitting) and which is market risk (only boundable). Ask what the tolerance advertises to an observer, because it is public information the moment the transaction is pending. And ask what happens in the bad case: if the answer is "you receive whatever arrives", there is no bound, and the distribution has no floor under it.

A protocol that shows you a number is telling you about the centre. A protocol that also tells you the enforced worst case is telling you about the tail — and the tail is the part that decides whether a strategy survives repetition.

Do not trust this page — reproduce it

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

Quote the same pair and size repeatedly across a few minutes and record the realised outputs — the spread you observe is the stochastic term, the gap from the ideal price is your impact, and the enforced floor is the only number that bounds the left tail

Contracts are verified on every chain we deploy to — addresses in the protocol manifest. Deeper formal treatment: the whitepaper (PDF). Standards cited: EIP-20

Share this article · join the discussion

Related engineering