Most "safety checks" in swap interfaces are a colour on a number. The Phoenix Check is a function, and you can read it in one sitting.
Every quote returned by the BlazePhoenix SDK carries a checks object, and its first field is a verdict: ok, caution, danger or blocked. The file that decides it is src/checks.ts: 64 lines. Its header comment is a fair summary of the design: "Everything is derived from the on-chain preview: no oracle, no third-party price, no fabrication. Fails closed."
The whole decision
Three inputs come from the Quoter's preview, read by eth_call on your own node:
-
canExecute: does the Quoter say the route can settle right now? -
Route consistency: does the first hop start in your
tokenIn, does the last hop end in yourtokenOut, does each hop chain into the next, and does every hop have at least one leg? -
Price impact of the route, in basis points.
Then the code does this:
export const HARD_IMPACT_BPS = 2_000; // 20%: a bad fill
export const CAUTION_IMPACT_BPS = 200; // 2%
const impact = impactBps >= HARD_IMPACT_BPS ? 'danger'
: impactBps >= CAUTION_IMPACT_BPS ? 'caution' : 'ok';
const verdict = !pv.canExecute || !consistent ? 'blocked' : worst(impact);
That is it. Severity is ranked ok < caution < danger < blocked. Impact can only produce the first three. blocked comes from the other two inputs: a route that cannot execute, or a route that is not the swap you asked for.
Why "fails closed" is not decoration
If any step cannot be established (no route, an inconsistent route, an execution flag that says no), the answer is blocked, not a best guess. Consider the alternative design: a checker that returns ok unless it finds a problem. Every gap in its knowledge becomes a green light. This one starts from "refuse" and requires the preview to earn each step.
You can see the neighbouring behaviour when there is no path at all. I asked for WETH → BZPX on Base (BZPX is not launched yet) and the SDK did not return a verdict. It threw:
no_route quote: SolverE(5) — no route: no executable path for this pair and size
An absent route is an error, not an ok with zeros.
What a real verdict looks like
For 1 WETH → USDC on Base, read on 29 October 2026 (values will differ at another block):
{
"verdict": "ok",
"priceImpact": { "bps": 17, "verdict": "ok", "hardLineBps": 2000, "cautionBps": 200 },
"ironFloor": { "enforcedOnChain": true, "armed": true,
"ironFloor": "2080693681", "effectiveMinOut": "2080693681" },
"routeShape": { "consistent": true, "hops": 1, "legs": 5 },
"crossCheck": { "basis": "Quoter preview via eth_call on YOUR RPC", "reproducible": true }
}
Four sub-checks, each explainable:
-
priceImpactcarries its own thresholds, so a consumer never has to hard-code 200 and 2000. The note in the code says it is the governing price impact of the on-chain route, not a market price. -
ironFloorreports the floor the Router derives for itself at execution time. The code's comment says the Router "re-derives its own output floors at execution and hard-clamps them; a caller can only tighten, never relax." This field tells you the floor is armed; the enforcement happens on-chain, not in the SDK. -
routeShapeis the consistency test, with hop and leg counts. -
crossChecksays plainly what the basis is and that the result is reproducible. Its note adds that to spot depth on venues this route does not read, you should compare against an independent price source. A verdict from the preview is not a claim to have seen the whole market.
What the verdict is not
-
Not a market price.
okdoes not mean "best price". It means the route is consistent, executable and below the impact thresholds. -
Not a token review. A fee-on-transfer or honeypot token is a different question. The project publishes a separate scanner for that, and the exact mode of the Quoter measures the pool rather than the token's own transfer behaviour.
-
Not advice. The object's own
disclaimersays: deterministic checks derived from on-chain state, not financial advice. -
Not a substitute for the signed minimum. The protective boundary is the minimum you sign, because the Router reverts if you would receive less. The verdict is advice to the caller. The minimum is enforcement.
Using it in your own code
const q = await blaze.quote({ chain: 'base', tokenIn: 'WETH', tokenOut: 'USDC', amount: '1' });
if (q.checks.verdict === 'danger' || q.checks.verdict === 'blocked') {
throw new Error(`refusing: ${q.checks.verdict}`); // a closed vocabulary is easy to branch on
}
A closed four-value field is a good interface for humans, scripts and language models alike. Nobody has to parse a sentence to decide whether to stop.
BlazePhoenix is an on-chain DEX aggregator on Base, Ethereum, Optimism, Arbitrum and Robinhood Chain. It is pre-launch, and an independent external audit is scheduled before launch. SDK: npm i @blazephoenix/sdk · blazephoenix.xyz · llms.txt