<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: BlazePhoenix</title>
    <description>The latest articles on DEV Community by BlazePhoenix (@blazephoenix_0bfac717a952).</description>
    <link>https://dev.to/blazephoenix_0bfac717a952</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4180070%2F9dbaabd2-ca3f-4e59-b99f-9790b1eea7dd.png</url>
      <title>DEV Community: BlazePhoenix</title>
      <link>https://dev.to/blazephoenix_0bfac717a952</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/blazephoenix_0bfac717a952"/>
    <language>en</language>
    <item>
      <title>What is a transaction? Nonces, gas, and confirmation</title>
      <dc:creator>BlazePhoenix</dc:creator>
      <pubDate>Tue, 17 Nov 2026 09:24:09 +0000</pubDate>
      <link>https://dev.to/blazephoenix_0bfac717a952/what-is-a-transaction-nonces-gas-and-confirmation-5389</link>
      <guid>https://dev.to/blazephoenix_0bfac717a952/what-is-a-transaction-nonces-gas-and-confirmation-5389</guid>
      <description>&lt;p&gt;&lt;em&gt;This article was generated with AI and is republished from the BlazePhoenix blog.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;A transaction is a signed instruction from your wallet to the chain, carrying a nonce that orders your transactions and a gas budget that pays for computation; it waits in the mempool until a block includes it and hardens with each confirmation. A stuck transaction is usually a too-low fee or a nonce gap, and a failed one still costs gas, because the network did the work of trying.&lt;/p&gt;

&lt;p&gt;A transaction is a signed instruction from your wallet to the chain: send tokens, call a contract, approve a spend. It carries a nonce, a counter that orders your transactions so none can be replayed or skipped, and a gas budget, the fee you pay for computation. You sign it locally; the network executes it.&lt;/p&gt;

&lt;p&gt;Gas is a unit of computation, not a currency. A plain token transfer costs a fixed 21,000 gas, a multi-step swap can run into the hundreds of thousands, and your fee is gas used multiplied by the gas price at that moment. That is why the same action costs dollars on Ethereum mainnet and cents on a Layer 2 like Base: the computation is identical, the price per unit of it is not.&lt;/p&gt;

&lt;h2&gt;
  
  
  Pending, mined, confirmed
&lt;/h2&gt;

&lt;p&gt;After you sign, the transaction sits in a mempool until a block includes it. Once included it is mined; as more blocks stack on top it becomes progressively harder to reverse, which is confirmation. If a transaction is stuck, it is usually a too-low fee or a nonce gap. A failed transaction still costs gas, because the network did the work of trying.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Verify it yourself:&lt;/strong&gt; Send a tiny swap, copy the tx hash, and watch it move from pending to confirmed on basescan.org — the nonce and gas used are shown on the page&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Originally published by BlazePhoenix at &lt;a href="https://blazephoenix.xyz/learn/what-is-a-transaction" rel="noopener noreferrer"&gt;https://blazephoenix.xyz/learn/what-is-a-transaction&lt;/a&gt;. Text licensed under CC BY 4.0: credit BlazePhoenix with a link to &lt;a href="https://blazephoenix.xyz" rel="noopener noreferrer"&gt;https://blazephoenix.xyz&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>blockchain</category>
      <category>ethereum</category>
      <category>web3</category>
      <category>crypto</category>
    </item>
    <item>
      <title>What is a seed phrase? The one secret that is your wallet</title>
      <dc:creator>BlazePhoenix</dc:creator>
      <pubDate>Mon, 16 Nov 2026 09:23:47 +0000</pubDate>
      <link>https://dev.to/blazephoenix_0bfac717a952/what-is-a-seed-phrase-the-one-secret-that-is-your-wallet-3a2b</link>
      <guid>https://dev.to/blazephoenix_0bfac717a952/what-is-a-seed-phrase-the-one-secret-that-is-your-wallet-3a2b</guid>
      <description>&lt;p&gt;&lt;em&gt;This article was generated with AI and is republished from the BlazePhoenix blog.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;A seed phrase of twelve or twenty-four words mathematically generates every private key in a wallet: whoever holds the words holds the funds, on every chain, with no reset possible. Never type it into a website or share it — no legitimate protocol, support agent or airdrop asks for it, and BlazePhoenix never has custody and will never message you first.&lt;/p&gt;

&lt;p&gt;A seed phrase is a list of twelve or twenty-four words that mathematically generates every private key in your wallet. It is not a password you can reset; it is the wallet itself. Whoever holds the phrase holds the funds, on every chain, forever. That is the whole deal of self-custody: total control, total responsibility.&lt;/p&gt;

&lt;p&gt;The words are not random English: wallets draw them from a fixed list of 2,048 words, and a twelve-word phrase encodes a number with roughly 2^128 possibilities — far beyond what any computer can search. That strength is exactly why there is no reset button: nobody, including the wallet maker, holds a copy, so a lost phrase cannot be recovered and a leaked one cannot be revoked.&lt;/p&gt;

&lt;h2&gt;
  
  
  The rules that matter
&lt;/h2&gt;

&lt;p&gt;Never type your seed phrase into a website, never share it, never store it in a screenshot or a cloud note. No legitimate protocol, support agent or airdrop will ever ask for it. BlazePhoenix never has custody of your funds and will never message you first or ask for a phrase; if an account claiming to be us does, it is not us. Write the words on paper, keep them offline, and treat anyone asking for them as an attacker.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Verify it yourself:&lt;/strong&gt; Confirm the rule in practice: a swap only ever asks you to sign a transaction in your wallet, never to enter your recovery words anywhere&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Originally published by BlazePhoenix at &lt;a href="https://blazephoenix.xyz/learn/what-is-a-seed-phrase" rel="noopener noreferrer"&gt;https://blazephoenix.xyz/learn/what-is-a-seed-phrase&lt;/a&gt;. Text licensed under CC BY 4.0: credit BlazePhoenix with a link to &lt;a href="https://blazephoenix.xyz" rel="noopener noreferrer"&gt;https://blazephoenix.xyz&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>crypto</category>
      <category>security</category>
      <category>wallet</category>
      <category>web3</category>
    </item>
    <item>
      <title>What is a liquidity pool? The two-token pile that sets the price</title>
      <dc:creator>BlazePhoenix</dc:creator>
      <pubDate>Sun, 15 Nov 2026 09:23:41 +0000</pubDate>
      <link>https://dev.to/blazephoenix_0bfac717a952/what-is-a-liquidity-pool-the-two-token-pile-that-sets-the-price-1fpl</link>
      <guid>https://dev.to/blazephoenix_0bfac717a952/what-is-a-liquidity-pool-the-two-token-pile-that-sets-the-price-1fpl</guid>
      <description>&lt;p&gt;&lt;em&gt;This article was generated with AI and is republished from the BlazePhoenix blog.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;A liquidity pool is two token piles a contract holds so anyone can trade against them; the ratio sets the price and real depth decides your cost.&lt;/p&gt;

&lt;p&gt;On an exchange with an order book, you trade against other people. On a DEX, you trade against a pool: a smart contract holding two piles of tokens — say ETH and USDC. Anyone can add tokens (become a liquidity provider) or swap against them. There is no counterparty waiting to take the other side; the pile itself is the market.&lt;/p&gt;

&lt;p&gt;The price is just the ratio of the two piles, kept honest by a rule the contract enforces on every trade. Take ETH out and put USDC in, and ETH gets scarcer in the pool, so its price rises for the next person. Nobody sets that price by hand — it falls out of the arithmetic. That is why a DEX can run 24/7 with no market makers.&lt;/p&gt;

&lt;h2&gt;
  
  
  Depth, yield, and the catch
&lt;/h2&gt;

&lt;p&gt;Liquidity providers earn a cut of every swap's fee, proportional to their share of the pool — that is the yield. In exchange they take on impermanent loss: if the two tokens' prices diverge, they can end up worse off than just holding. Deep pools (lots of tokens) give traders tiny price impact and LPs steady fees; thin pools give brutal impact and volatile returns.&lt;/p&gt;

&lt;p&gt;The number that matters to you as a trader is REAL depth — what the contract actually holds, not what a screener advertises. A pool can display a big number while the tokens have quietly left. Read any pool's true balances on a block explorer — or with a balanceOf call on the token contract — before you trust its depth.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Verify it yourself:&lt;/strong&gt; read a pool's actual pile yourself: cast call  "balanceOf(address)(uint256)"  --rpc-url &lt;a href="https://mainnet.base.org" rel="noopener noreferrer"&gt;https://mainnet.base.org&lt;/a&gt; — that on-chain balance is the number that sets your price&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Originally published by BlazePhoenix at &lt;a href="https://blazephoenix.xyz/learn/what-is-a-liquidity-pool" rel="noopener noreferrer"&gt;https://blazephoenix.xyz/learn/what-is-a-liquidity-pool&lt;/a&gt;. Text licensed under CC BY 4.0: credit BlazePhoenix with a link to &lt;a href="https://blazephoenix.xyz" rel="noopener noreferrer"&gt;https://blazephoenix.xyz&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>defi</category>
      <category>ethereum</category>
      <category>blockchain</category>
      <category>web3</category>
    </item>
    <item>
      <title>What is a honeypot token? The coin you can buy but never sell</title>
      <dc:creator>BlazePhoenix</dc:creator>
      <pubDate>Sat, 14 Nov 2026 09:23:46 +0000</pubDate>
      <link>https://dev.to/blazephoenix_0bfac717a952/what-is-a-honeypot-token-the-coin-you-can-buy-but-never-sell-53am</link>
      <guid>https://dev.to/blazephoenix_0bfac717a952/what-is-a-honeypot-token-the-coin-you-can-buy-but-never-sell-53am</guid>
      <description>&lt;p&gt;&lt;em&gt;This article was generated with AI and is republished from the BlazePhoenix blog.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;A honeypot token lets you buy but not sell — hidden contract logic traps exits while the chart climbs; a ten-second on-chain check exposes most of them.&lt;/p&gt;

&lt;p&gt;A honeypot is a token designed to let you in and never out. The chart looks great, buys go through, the price only rises — because almost nobody can sell. The contract has hidden logic: a sell tax of 100%, a whitelist only the creator is on, a max-transaction rule that blocks exits, or a pause switch. You buy, you watch the number climb, and when you try to take profit the transaction reverts or returns dust.&lt;/p&gt;

&lt;p&gt;It feels safe precisely because it is engineered to. Rising price plus successful buys is the bait. The trap is on the sell side, where you do not look until it is too late.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to catch one in ten seconds
&lt;/h2&gt;

&lt;p&gt;The strongest tell is liquidity that is advertised but not really there — or locked so the creator can pull it. Compare the depth the pool claims against the balance its contract actually holds on-chain: open the pool address on a block explorer and read its token balances next to the screener's number. A big gap means the pool cannot pay out what it promises — exactly what a honeypot looks like from the outside.&lt;/p&gt;

&lt;p&gt;Then do the cheap tests: buy a tiny amount and immediately try to sell it back. If the sell fails or costs a savage tax, you learned everything for pocket change. Check whether liquidity is locked and for how long, and never trust a token by its ticker — anyone can mint one called "USDC" or "ETH". Verify the address, not the name.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Verify it yourself:&lt;/strong&gt; for any suspicious token, read the pool's real balance with cast call  "balanceOf(address)(uint256)"  on a public RPC — if it sits far below the advertised liquidity, the pool claims depth its contract does not hold&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Originally published by BlazePhoenix at &lt;a href="https://blazephoenix.xyz/learn/what-is-a-honeypot" rel="noopener noreferrer"&gt;https://blazephoenix.xyz/learn/what-is-a-honeypot&lt;/a&gt;. Text licensed under CC BY 4.0: credit BlazePhoenix with a link to &lt;a href="https://blazephoenix.xyz" rel="noopener noreferrer"&gt;https://blazephoenix.xyz&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>crypto</category>
      <category>security</category>
      <category>blockchain</category>
      <category>web3</category>
    </item>
    <item>
      <title>Price impact, explained: why your own trade moves the price</title>
      <dc:creator>BlazePhoenix</dc:creator>
      <pubDate>Fri, 13 Nov 2026 09:23:55 +0000</pubDate>
      <link>https://dev.to/blazephoenix_0bfac717a952/price-impact-explained-why-your-own-trade-moves-the-price-968</link>
      <guid>https://dev.to/blazephoenix_0bfac717a952/price-impact-explained-why-your-own-trade-moves-the-price-968</guid>
      <description>&lt;p&gt;&lt;em&gt;This article was generated with AI and is republished from the BlazePhoenix blog.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Price impact is the cost you cause yourself: trading against a finite pool moves the price as you take tokens — and a thin pool punishes size hardest.&lt;/p&gt;

&lt;p&gt;Slippage is the price moving because of everyone else. Price impact is the price moving because of YOU. When you swap against a pool, you are literally buying from a finite pile of tokens — the more you take, the more expensive each remaining token gets. That climb, from the first token you buy to the last, is your price impact. It is not a fee anyone charges; it is the shape of the pool.&lt;/p&gt;

&lt;p&gt;A tiny trade in a deep pool has near-zero impact — you barely dent the pile. The same trade in a shallow pool can cost you 10, 20, 50% because you are eating most of the available liquidity. This is why the exact same swap can be free on one venue and brutal on another: it is not the venue being greedy, it is the pool being thin.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to keep it small
&lt;/h2&gt;

&lt;p&gt;Three habits: (1) size to the pool, not to your wallet — if a pool holds $20k and you want to move $10k, expect real pain; split it or wait. (2) Check REAL depth first, because a pool can advertise depth it does not hold — open the pool contract on a block explorer and compare its actual token balances against the advertised number, then keep your trade to a small fraction of the real depth (roughly the size that stays under ~1% impact). (3) Prefer an aggregator that routes across several pools, so your order is spread instead of crushing one.&lt;/p&gt;

&lt;p&gt;The honest math: on a constant-product pool, buying a fraction f of a token's reserve costs you roughly f/(1−f) extra on price. Take 1% of the pool and you pay ~1% impact; take 50% and you pay ~100% — the price doubles under you. That curve is why size, not luck, decides your fill.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Verify it yourself:&lt;/strong&gt; quote 100 units of a token, then 10,000 units of the same token — the worsening rate per unit IS your price impact, and it is bigger on thinner pools&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Originally published by BlazePhoenix at &lt;a href="https://blazephoenix.xyz/learn/price-impact-explained" rel="noopener noreferrer"&gt;https://blazephoenix.xyz/learn/price-impact-explained&lt;/a&gt;. Text licensed under CC BY 4.0: credit BlazePhoenix with a link to &lt;a href="https://blazephoenix.xyz" rel="noopener noreferrer"&gt;https://blazephoenix.xyz&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>defi</category>
      <category>crypto</category>
      <category>ethereum</category>
      <category>trading</category>
    </item>
    <item>
      <title>What is a rug pull? How a token dies in one transaction</title>
      <dc:creator>BlazePhoenix</dc:creator>
      <pubDate>Thu, 12 Nov 2026 09:23:44 +0000</pubDate>
      <link>https://dev.to/blazephoenix_0bfac717a952/what-is-a-rug-pull-how-a-token-dies-in-one-transaction-14fj</link>
      <guid>https://dev.to/blazephoenix_0bfac717a952/what-is-a-rug-pull-how-a-token-dies-in-one-transaction-14fj</guid>
      <description>&lt;p&gt;&lt;em&gt;This article was generated with AI and is republished from the BlazePhoenix blog.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;A rug pull is an exit scam: insiders drain liquidity or dump hidden supply, collapsing the price to zero — locked liquidity and real depth are your checks.&lt;/p&gt;

&lt;p&gt;A rug pull is an exit scam. Insiders build hype, attract buyers, then pull the value out from under everyone in a single move. The two common forms: liquidity removal — the team withdraws the pool's tokens so there is nothing left to sell into, and the price craters to zero; and a supply dump — the team holds a huge hidden allocation and sells it all at once, flooding the market.&lt;/p&gt;

&lt;p&gt;A slow rug is the patient version: no single dramatic exit, just insiders bleeding liquidity and selling into every rally while marketing stays loud. By the time the chart makes it obvious, the tokens are already gone.&lt;/p&gt;

&lt;h2&gt;
  
  
  The checks that protect you
&lt;/h2&gt;

&lt;p&gt;Is the liquidity locked, and for how long? Unlocked liquidity can be removed at any second — treat it as a countdown. How concentrated is the supply? A few wallets holding most of the tokens is a loaded gun. Is the pool's advertised depth actually on-chain? Read the pool contract's real balances on a block explorer: if they sit far below the reported liquidity, value has already left the building.&lt;/p&gt;

&lt;p&gt;None of these guarantees safety — plenty of tokens with locked liquidity still fail honestly. But they turn a blind gamble into an informed one. The single highest-signal habit: verify the contract address from an official source, and check real liquidity before you send anything you cannot afford to lose.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Verify it yourself:&lt;/strong&gt; compare a token's reported liquidity to the balances its pool contract holds on a block explorer — a collapsing real balance under a steady advertised number is a rug in progress&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Originally published by BlazePhoenix at &lt;a href="https://blazephoenix.xyz/learn/what-is-a-rug-pull" rel="noopener noreferrer"&gt;https://blazephoenix.xyz/learn/what-is-a-rug-pull&lt;/a&gt;. Text licensed under CC BY 4.0: credit BlazePhoenix with a link to &lt;a href="https://blazephoenix.xyz" rel="noopener noreferrer"&gt;https://blazephoenix.xyz&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>crypto</category>
      <category>security</category>
      <category>blockchain</category>
      <category>web3</category>
    </item>
    <item>
      <title>What is finality? When a transaction is truly done</title>
      <dc:creator>BlazePhoenix</dc:creator>
      <pubDate>Wed, 11 Nov 2026 09:23:36 +0000</pubDate>
      <link>https://dev.to/blazephoenix_0bfac717a952/what-is-finality-when-a-transaction-is-truly-done-7h6</link>
      <guid>https://dev.to/blazephoenix_0bfac717a952/what-is-finality-when-a-transaction-is-truly-done-7h6</guid>
      <description>&lt;p&gt;&lt;em&gt;This article was generated with AI and is republished from the BlazePhoenix blog.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Finality is the guarantee that a transaction can no longer be reversed: probabilistic right after inclusion, hardening as blocks stack on top, which is why exchanges wait for several confirmations on large deposits. Layer 2s like Base, Optimism and Arbitrum confirm fast locally and then settle to Ethereum, where the strongest finality lives — the explorer shows exactly where a transaction stands.&lt;/p&gt;

&lt;p&gt;Finality is the guarantee that a transaction is permanent and cannot be undone. Right after inclusion a transaction is probabilistically final: it is done, but a chain reorganisation could in principle replace that block. With each additional block on top, the chance of reversal falls toward zero, which is why exchanges wait for several confirmations on large deposits.&lt;/p&gt;

&lt;p&gt;Finality matters for prices, not only for deposits. A BlazePhoenix quote is an eth_call answered against the latest block, so it is a measurement of one specific moment of chain state — a reorg, or simply the next block, can change the state underneath it. That is why the Router re-derives the minimum-output floor at execution instead of trusting a stale plan: if the world moved between your quote and your fill, the swap reverts rather than filling worse.&lt;/p&gt;

&lt;h2&gt;
  
  
  Layer 2 and settlement
&lt;/h2&gt;

&lt;p&gt;Layer 2 networks like Base, Optimism and Arbitrum give fast local confirmation and then settle to Ethereum, where the strongest finality lives. For everyday swaps the local confirmation is enough; for large or bridging moves it is worth understanding that full settlement to the base layer takes longer. Either way, the explorer shows you exactly where your transaction stands.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Verify it yourself:&lt;/strong&gt; Watch a fresh transaction gain confirmations on an explorer: the block depth counter is the plain-English version of how final it is&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Originally published by BlazePhoenix at &lt;a href="https://blazephoenix.xyz/learn/what-is-finality" rel="noopener noreferrer"&gt;https://blazephoenix.xyz/learn/what-is-finality&lt;/a&gt;. Text licensed under CC BY 4.0: credit BlazePhoenix with a link to &lt;a href="https://blazephoenix.xyz" rel="noopener noreferrer"&gt;https://blazephoenix.xyz&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ethereum</category>
      <category>blockchain</category>
      <category>layer2</category>
      <category>web3</category>
    </item>
    <item>
      <title>Why splitting a trade across pools costs less: the convexity behind route splitting</title>
      <dc:creator>BlazePhoenix</dc:creator>
      <pubDate>Tue, 10 Nov 2026 09:23:46 +0000</pubDate>
      <link>https://dev.to/blazephoenix_0bfac717a952/why-splitting-a-trade-across-pools-costs-less-the-convexity-behind-route-splitting-po8</link>
      <guid>https://dev.to/blazephoenix_0bfac717a952/why-splitting-a-trade-across-pools-costs-less-the-convexity-behind-route-splitting-po8</guid>
      <description>&lt;p&gt;&lt;em&gt;This article was generated with AI and is republished from the BlazePhoenix blog.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Price impact is convex in size, so one large fill is never cheaper than the same size split across independent pools — that is Jensen's inequality, not a heuristic. The optimal split equalises marginal price across venues, which means shares proportional to real depth, never an even division.&lt;/p&gt;

&lt;p&gt;Send an order to one pool and you pay for every unit of depth you consume, at a price that gets worse as you go. Send the same order across several independent pools and each one is asked for a smaller bite, at a price that stays closer to the top of its book. The difference is not a routing trick or a marketing claim: it is a mathematical property of the cost curve, and it can be stated precisely enough to compute.&lt;/p&gt;

&lt;h2&gt;
  
  
  Impact is convex, and convexity is the whole argument
&lt;/h2&gt;

&lt;p&gt;For a constant-product pool the output for an input x against a reserve R is a strictly concave function of x — each additional unit buys less than the one before it. The cost you pay, price impact, is therefore CONVEX in size: it does not grow linearly, it accelerates. Doubling the order more than doubles the impact.&lt;/p&gt;

&lt;p&gt;Once you know the cost function is convex, the result follows from a theorem rather than from intuition. Jensen's inequality states that for a convex cost, the cost of the average is no greater than the average of the costs — equivalently, splitting a quantity into parts and paying each part's cost is never worse than paying the cost of the whole at once, and is strictly better whenever the curve is genuinely curved. Splitting cannot lose. That is a proof, not a preference.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;equation: C(Σxᵢ) ≥ Σ C(xᵢ) for C convex, xᵢ ≥ 0 — The convexity argument: paying the cost of one large fill is never cheaper than paying the sum of the costs of its parts across independent pools — Jensen's inequality, applied to price impact.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  The optimum: equalise the marginal price, not the share
&lt;/h2&gt;

&lt;p&gt;Knowing that splitting helps does not say how to split. The naive answer — divide equally across the candidates — is usually wrong and can be catastrophic: an even split between a deep pool and a near-empty one sends half the order into a book that cannot fill it, destroying more value than routing to the deep pool alone would have.&lt;/p&gt;

&lt;p&gt;The correct condition comes from constrained optimisation. Maximise total output subject to the shares summing to the order size, and the first-order condition says every pool that receives a non-zero share must have the SAME marginal output at its allocation. If one venue is still paying a better rate at the margin than another, you are allocating wrongly: move a unit from the worse margin to the better one and the total rises. The optimum is reached exactly when no such move helps — when the marginal prices are equal.&lt;/p&gt;

&lt;p&gt;The practical consequence is that shares must be proportional to real depth, not to venue count. A pool holding ten times the capital absorbs roughly ten times the size before its marginal price degrades to the same level. Allocating by depth is the discrete approximation of equalising the margin; allocating evenly is an approximation of nothing.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;equation: ∂fᵢ/∂xᵢ = λ for every i with xᵢ &amp;gt; 0, Σ xᵢ = X — The Lagrangian condition for an output-maximising split: at the optimum every used venue pays the same marginal rate λ. Unequal margins mean value is still on the table.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Why the gains die off — the case for a bounded leg budget
&lt;/h2&gt;

&lt;p&gt;If splitting is free improvement, why not split across everything? Because the benefit is concave in the number of venues while the cost is linear in it. The first split removes the most expensive part of the curve — the tail of the single fill where impact accelerates hardest. The second removes less. By the fourth or fifth the marginal saving is small, while every additional leg adds a fixed execution cost and one more pool whose state can move against you between quote and inclusion.&lt;/p&gt;

&lt;p&gt;So the leg budget is an optimisation, not a limitation: extend it until the expected marginal saving from one more venue falls below that venue's marginal cost, then stop. A small bounded budget captures nearly all of the available amortisation; an unbounded one pays real costs for diminishing arithmetic.&lt;/p&gt;

&lt;h2&gt;
  
  
  Independence is the load-bearing assumption
&lt;/h2&gt;

&lt;p&gt;The argument above quietly assumes the pools are INDEPENDENT — that filling one does not move the price of another. When that holds, the splits genuinely see fresh books. When it does not, the assumption fails and the maths goes with it: two venues that are really the same liquidity wearing different clothes, or two pools an arbitrage bot keeps welded together within the same block, do not offer two independent bites of depth. A splitter that counts them twice believes it has diversified when it has concentrated.&lt;/p&gt;

&lt;p&gt;This is why depth must be measured as capital that actually exists rather than as advertised numbers, and why the split should be computed against what each venue can really absorb. The convexity result is only as good as the independence of the curves you are summing over — a statistical assumption, and one worth testing rather than assuming.&lt;/p&gt;

&lt;h2&gt;
  
  
  Slippage, separately
&lt;/h2&gt;

&lt;p&gt;Splitting reduces IMPACT — the cost you cause yourself against finite depth, which is knowable before you sign. It does not, by itself, reduce SLIPPAGE — the market moving between quote and inclusion, which is a random variable nobody can predict. But it changes that variable's shape: the realised outcome becomes an average across several venues rather than a single draw, so extreme deviations partially cancel and the variance of the fill narrows even when its mean is unchanged. That is diversification, in the ordinary statistical sense, applied to execution.&lt;/p&gt;

&lt;p&gt;Reduced variance is not protection, though — the tail still exists. The bound on the worst case has to come from somewhere else: an enforced minimum-output floor, re-derived from the real trade at execution, that reverts rather than settles below it. Splitting lowers the expected cost and tightens the distribution; the floor is what caps the tail.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Verify it yourself:&lt;/strong&gt; Quote a size against a single pool, then quote the same size split across several independent pools of comparable total depth, and compare outputs — the split is never worse and improves with size, exactly as convexity predicts; then split evenly instead of by depth and watch the advantage collapse&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Originally published by BlazePhoenix at &lt;a href="https://blazephoenix.xyz/learn/split-routing-convexity" rel="noopener noreferrer"&gt;https://blazephoenix.xyz/learn/split-routing-convexity&lt;/a&gt;. Text licensed under CC BY 4.0: credit BlazePhoenix with a link to &lt;a href="https://blazephoenix.xyz" rel="noopener noreferrer"&gt;https://blazephoenix.xyz&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>defi</category>
      <category>math</category>
      <category>trading</category>
      <category>optimization</category>
    </item>
    <item>
      <title>What is impermanent loss? The cost of being a liquidity provider</title>
      <dc:creator>BlazePhoenix</dc:creator>
      <pubDate>Mon, 09 Nov 2026 09:23:38 +0000</pubDate>
      <link>https://dev.to/blazephoenix_0bfac717a952/what-is-impermanent-loss-the-cost-of-being-a-liquidity-provider-276g</link>
      <guid>https://dev.to/blazephoenix_0bfac717a952/what-is-impermanent-loss-the-cost-of-being-a-liquidity-provider-276g</guid>
      <description>&lt;p&gt;&lt;em&gt;This article was generated with AI and is republished from the BlazePhoenix blog.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Providing liquidity to an AMM leaves you holding more of the losing token and less of the winner than simply holding both; that gap versus holding is impermanent loss, and it becomes permanent the moment you withdraw while prices are still divergent. For a constant-product pool, a 2x price move costs roughly 5.7% versus holding — fees are the offset, not free yield.&lt;/p&gt;

&lt;p&gt;When you provide liquidity to an automated market maker, you deposit two tokens and the pool rebalances them as people trade. If the price of one token moves a lot relative to the other, the pool ends up holding more of the loser and less of the winner than if you had just held both. That gap versus holding is impermanent loss.&lt;/p&gt;

&lt;p&gt;The size of the gap depends only on how far the price ratio moved, and for a constant-product pool the arithmetic is fixed. A 1.25x move costs about 0.6% versus holding, a 2x move about 5.7%, and a 4x move about 20% — the loss grows slowly at first and then steeply, which is why calm pairs are gentler on liquidity providers than volatile ones.&lt;/p&gt;

&lt;h2&gt;
  
  
  When impermanent becomes permanent
&lt;/h2&gt;

&lt;p&gt;It is called impermanent because if the price ratio returns to where you entered, the gap closes. It becomes permanent the moment you withdraw while prices are still divergent. Trading fees are the offset: a pool that earns enough in fees can more than cover the loss. The lesson for a beginner is simple: providing liquidity is not free yield, it is a position with its own risk profile.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Verify it yourself:&lt;/strong&gt; Model it yourself: for a constant-product pool, compare holding two tokens versus the pool value after a 2x price move — the difference is roughly 5.7%&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Originally published by BlazePhoenix at &lt;a href="https://blazephoenix.xyz/learn/what-is-impermanent-loss" rel="noopener noreferrer"&gt;https://blazephoenix.xyz/learn/what-is-impermanent-loss&lt;/a&gt;. Text licensed under CC BY 4.0: credit BlazePhoenix with a link to &lt;a href="https://blazephoenix.xyz" rel="noopener noreferrer"&gt;https://blazephoenix.xyz&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>defi</category>
      <category>amm</category>
      <category>crypto</category>
      <category>liquidity</category>
    </item>
    <item>
      <title>Token approvals, explained: the permission you forget you gave</title>
      <dc:creator>BlazePhoenix</dc:creator>
      <pubDate>Sun, 08 Nov 2026 09:23:37 +0000</pubDate>
      <link>https://dev.to/blazephoenix_0bfac717a952/token-approvals-explained-the-permission-you-forget-you-gave-oe9</link>
      <guid>https://dev.to/blazephoenix_0bfac717a952/token-approvals-explained-the-permission-you-forget-you-gave-oe9</guid>
      <description>&lt;p&gt;&lt;em&gt;This article was generated with AI and is republished from the BlazePhoenix blog.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;An approval is standing permission for a contract to move your token — it outlives the trade, so infinite approvals are a live risk you should review and revoke.&lt;/p&gt;

&lt;p&gt;ERC-20 tokens do not let a contract just take them — you have to grant permission first, called an approval or allowance. When you swap a token for the first time, your wallet asks you to sign two things: the approval (permission for the router to move that token) and then the swap itself. That is normal. What is easy to miss is that the approval does not expire when the trade ends — it stays live until you change it.&lt;/p&gt;

&lt;p&gt;Many apps request an INFINITE approval by default, so you never have to approve that token again. Convenient, but it means the contract can move all of that token, forever, from your wallet. If that contract is later exploited or was malicious, your standing allowance is the door it walks through — even long after the one trade you cared about.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to stay safe
&lt;/h2&gt;

&lt;p&gt;Two habits shrink the risk. First, prefer an exact-amount approval when your wallet offers it — approve only what this trade needs, so nothing is left standing afterwards. It costs slightly more gas over time but closes the door behind you. Second, review and revoke: periodically look at what you have approved and cancel allowances you no longer use.&lt;/p&gt;

&lt;p&gt;You can revoke from your wallet's token-approval screen or a public revoke tool; revoking is just another approval set back to zero. Treat approvals like keys you handed out — the fewer copies live in the world, the smaller your attack surface. And as always: only approve contracts you reached by typing the real URL, never from a DM or ad.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Verify it yourself:&lt;/strong&gt; read your allowance for any token/spender with cast call  "allowance(address,address)(uint256)"   — a huge number is an infinite approval still live&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Originally published by BlazePhoenix at &lt;a href="https://blazephoenix.xyz/learn/token-approvals-explained" rel="noopener noreferrer"&gt;https://blazephoenix.xyz/learn/token-approvals-explained&lt;/a&gt;. Text licensed under CC BY 4.0: credit BlazePhoenix with a link to &lt;a href="https://blazephoenix.xyz" rel="noopener noreferrer"&gt;https://blazephoenix.xyz&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ethereum</category>
      <category>security</category>
      <category>erc20</category>
      <category>web3</category>
    </item>
    <item>
      <title>The mathematics of every AMM family, compared</title>
      <dc:creator>BlazePhoenix</dc:creator>
      <pubDate>Sat, 07 Nov 2026 11:53:44 +0000</pubDate>
      <link>https://dev.to/blazephoenix_0bfac717a952/the-mathematics-of-every-amm-family-compared-3dej</link>
      <guid>https://dev.to/blazephoenix_0bfac717a952/the-mathematics-of-every-amm-family-compared-3dej</guid>
      <description>&lt;p&gt;&lt;em&gt;This article was generated with AI and is republished from the BlazePhoenix blog.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Constant product, concentrated liquidity and the stable invariants are three geometries, not three implementations of one idea: closed-form and honest, closed-form only inside a band and able to over-promise beyond it, and no closed form at all. Their depth figures are not even the same unit.&lt;/p&gt;

&lt;p&gt;An automated market maker replaces the order book with a curve. Every design in production is a choice of curve, and that choice determines three things at once: the output you receive for a given input, how depth should be measured, and where the design fails. Treating the families as interchangeable is the most common source of integration error, because the arithmetic genuinely differs.&lt;/p&gt;

&lt;h2&gt;
  
  
  Family one: constant product
&lt;/h2&gt;

&lt;p&gt;The oldest and simplest: the product of the two reserves is held constant across a swap. Its output function is closed-form and needs only the two reserve balances, which makes it cheap to quote and impossible to get subtly wrong. Fee is applied to the input before the curve is walked.&lt;/p&gt;

&lt;p&gt;Its properties follow directly. Liquidity is spread over every price from zero to infinity, so it never runs out but is thin everywhere; depth is naturally measured by the smaller reserve; and price impact is a smooth, convex function of size with no discontinuities. Nothing about it can lie to you — the reserves are the state, and the state is the price.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;equation: out = (Δin · f · R_out) / (R_in + Δin · f), f = 1 − fee — Constant-product exact output. Two reserves and a fee are the entire model; no other state exists.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Family two: concentrated liquidity
&lt;/h2&gt;

&lt;p&gt;Providers place liquidity inside a chosen price band rather than across the whole curve. Within a band, the pool behaves like a constant-product pool with a much larger virtual reserve — the same capital, deeper where it matters. State is a square-root price and an active liquidity figure, and the swap walks the price along that curve.&lt;/p&gt;

&lt;p&gt;This is where the arithmetic becomes dangerous, and the danger is specific. The single-band formula models the CURRENT liquidity as though it extended across every price. It does not. When the swap is large enough to leave the band, real execution crosses into ranges where liquidity may be far thinner or absent, while the single-band formula happily quotes a number that assumes the deep band continues forever.&lt;/p&gt;

&lt;p&gt;The consequence is that a concentrated pool can quote an output larger than the entire balance it holds — a promise it is physically unable to keep. The correct treatment is therefore twofold: bound any single-band quote by what the pool actually holds, and, when precision matters, obtain the number from the pool's own execution path rather than from a re-implementation of its tick mathematics.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;equation: zeroForOne: √P' = (L·√P) / (L + Δin·√P/Q96), out = L·(√P − √P')/Q96 — Concentrated-liquidity single-band step in square-root price space. Valid only while the swap stays inside the active band.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Family three: the stable invariants
&lt;/h2&gt;

&lt;p&gt;For assets that should trade near parity, the constant-product curve wastes capital: it charges meaningful impact for a trade between two things worth the same. The stable families replace it with a curve that is nearly flat near the balance point and steepens sharply away from it, concentrating depth exactly where the assets are supposed to sit.&lt;/p&gt;

&lt;p&gt;Two shapes dominate. One blends a constant-sum and a constant-product term with an amplification coefficient controlling the flatness. The other uses a quartic invariant. Both share a defining property: neither has a clean closed-form solution for the output, so the answer must be found by iteration — and the iteration is where implementations diverge from each other and from the pool itself.&lt;/p&gt;

&lt;p&gt;A naive iteration seeded at the wrong starting point converges to a subtly wrong answer on lopsided pools, silently. There are two defensible responses: solve properly, seeding the iteration where convergence is provable and clamping the step so it cannot overshoot; or do not solve at all and ask the pool for its own number, since the code that computes it is the code that will settle the trade.&lt;/p&gt;

&lt;h2&gt;
  
  
  Depth is not one quantity
&lt;/h2&gt;

&lt;p&gt;This is the practical trap that survives every correct output formula. Each family reports "depth" in a unit that is not comparable with the others: constant-product reports reserve balances, concentrated liquidity reports a liquidity constant that is not denominated in tokens at all, and pool-quoted families report an output figure. These are different dimensions.&lt;/p&gt;

&lt;p&gt;Any allocator that ranks candidates by comparing these numbers directly is comparing apples with square roots of oranges — and it will systematically over-allocate to whichever family happens to produce the largest raw figure. The only measure comparable across all families is the one that requires capital to fake: the real token balance the pool holds, read from the chain.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why one formula cannot serve them all
&lt;/h2&gt;

&lt;p&gt;Summarised as a table you can act on: constant product is closed-form and honest; concentrated liquidity is closed-form only inside a band and can over-promise beyond it; stable invariants have no closed form and must be iterated or asked. The fee model differs too — some charge a fixed fraction, some read a dynamic fee that changes with conditions, and using a stale fee produces a quote the pool will reject outright.&lt;/p&gt;

&lt;p&gt;The engineering conclusion is not that one family is better. It is that a system quoting across all of them needs a dispatcher: closed-form mathematics where the formula IS the truth, bounded by real holdings where the formula can over-promise, and ask-the-pool where re-implementing the curve would risk diverging from the code that settles. Anything simpler is a bug waiting for the right pool.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Verify it yourself:&lt;/strong&gt; Take one pool from each family, quote the same size against all three with a single generic formula, then compare each answer against the pool's own quoting function — the divergence is not noise, it is the family difference this article describes&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Originally published by BlazePhoenix at &lt;a href="https://blazephoenix.xyz/learn/amm-math-taxonomy" rel="noopener noreferrer"&gt;https://blazephoenix.xyz/learn/amm-math-taxonomy&lt;/a&gt;. Text licensed under CC BY 4.0: credit BlazePhoenix with a link to &lt;a href="https://blazephoenix.xyz" rel="noopener noreferrer"&gt;https://blazephoenix.xyz&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>defi</category>
      <category>amm</category>
      <category>blockchain</category>
      <category>ethereum</category>
    </item>
    <item>
      <title>Intent-based vs on-chain routing: do you need UniswapX?</title>
      <dc:creator>BlazePhoenix</dc:creator>
      <pubDate>Thu, 29 Oct 2026 01:52:00 +0000</pubDate>
      <link>https://dev.to/blazephoenix_0bfac717a952/intent-based-vs-on-chain-routing-do-you-need-uniswapx-2mm9</link>
      <guid>https://dev.to/blazephoenix_0bfac717a952/intent-based-vs-on-chain-routing-do-you-need-uniswapx-2mm9</guid>
      <description>&lt;p&gt;&lt;strong&gt;TL;DR: UniswapX makes you sign an outcome and lets fillers compete to deliver it. On-chain routing makes you send a transaction whose route is computed where it settles. They trade different things: gas and failure cost on one side, verifiability and composability on the other.&lt;/strong&gt;&lt;br&gt;
This is a neutral read of both designs from their own documentation (consulted 2026-10-29). I'm on the team that builds the second one, so every claim about UniswapX below links to Uniswap's docs and every claim about ours links to code you can read.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F97e7i87osv917x1g3o5j.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F97e7i87osv917x1g3o5j.png" alt="Two swap flows side by side: a UniswapX signed order settled by fillers, and an on-chain route solved inside one transaction" width="800" height="420"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  What does UniswapX actually do?
&lt;/h2&gt;

&lt;p&gt;Per the &lt;a href="https://docs.uniswap.org/contracts/uniswapx/overview" rel="noopener noreferrer"&gt;UniswapX overview&lt;/a&gt;, swappers sign orders that specify the outputs they want, and fillers compete to satisfy them. You don't submit the order on-chain yourself: you sign a message using Permit2, it is broadcast, and any filler can settle it when it is economically viable. The docs list gas-free swapping and no cost for failed transactions among the properties.&lt;/p&gt;

&lt;p&gt;The auction itself, from &lt;a href="https://developers.uniswap.org/docs/liquidity/uniswapx/concepts/auction-types" rel="noopener noreferrer"&gt;Auction Types&lt;/a&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;On Ethereum the flow is RFQ plus an exclusive Dutch auction. Uniswap Labs asks a set of quoters for a price; the docs say that set is permissioned and known to Labs. The winner gets a short exclusivity window (about 24 seconds, 2 blocks), then the order decays in an open Dutch auction down to the minimum you signed.&lt;/li&gt;
&lt;li&gt;Base, Arbitrum and Robinhood Chain (among others) use the same model with timing counted in blocks (the DutchV3 reactor). As of my reading, Optimism does not appear in that table.&lt;/li&gt;
&lt;li&gt;Gas is wrapped into the final price and paid by the filler.&lt;/li&gt;
&lt;li&gt;Cosigners adjust auction parameters inside your signed limits; the docs say the Uniswap Interface and API currently set the cosigner to Uniswap Labs.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;One more detail from &lt;a href="https://developers.uniswap.org/docs/trading/swapping-api/amm-vs-uniswapx-routing" rel="noopener noreferrer"&gt;AMM vs UniswapX Routing&lt;/a&gt;: through the Uniswap API, UniswapX is included when the order is worth more than 300 USDC equivalent, or when it improves on the AMM route by at least 0.2%, and UniswapX quotes "may be unavailable when solvers cannot or choose not to fill".&lt;/p&gt;
&lt;h2&gt;
  
  
  What does on-chain routing do instead?
&lt;/h2&gt;

&lt;p&gt;In BlazePhoenix the quote is a free &lt;code&gt;eth_call&lt;/code&gt; to a Quoter contract (&lt;code&gt;previewPlan&lt;/code&gt; is a &lt;code&gt;view&lt;/code&gt; function). The 2.0.0 Router source also has an entry point, &lt;code&gt;swapBestExactIn&lt;/code&gt;, that takes &lt;strong&gt;no route at all&lt;/strong&gt;: it calls the Solver inside the same transaction and then executes against the same block state. The contract comment says it plainly, &lt;em&gt;"solve and execution read the same block state, atomically"&lt;/em&gt;, and also says what it does not fix: &lt;em&gt;"in-tx solving removes plan staleness, not sandwich exposure"&lt;/em&gt;. That is why &lt;code&gt;userMinOut&lt;/code&gt; is mandatory there, and zero reverts.&lt;/p&gt;

&lt;p&gt;Status, so nobody is misled: the &lt;a href="https://blazephoenix.xyz/api/deployments?utm_source=devto&amp;amp;utm_medium=article&amp;amp;utm_campaign=intent-vs-onchain-routing-uniswapx" rel="noopener noreferrer"&gt;deployment registry&lt;/a&gt; lists 2.0.0 as &lt;strong&gt;pending&lt;/strong&gt; (its addresses are zero today). What is deployed is 1.0.0, where the Quoter works as described but the route travels as calldata. The protocol is pre-launch and an independent external audit is scheduled.&lt;/p&gt;

&lt;p&gt;Here is everything a user commits to in that entry point. It runs offline:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;decodeFunctionData&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;parseUnits&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;size&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kd"&gt;type&lt;/span&gt; &lt;span class="nx"&gt;Address&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;viem&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;ROUTER_ABI&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;encodeSwapBestExactIn&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;@blazephoenix/sdk&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;WETH&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;Address&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;0x4200000000000000000000000000000000000006&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;USDC&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;Address&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;me&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;Address&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;0x000000000000000000000000000000000000dEaD&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;data&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;encodeSwapBestExactIn&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
  &lt;span class="nx"&gt;WETH&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;USDC&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nf"&gt;parseUnits&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;0.5&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;18&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
  &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="nx"&gt;_000_000_000n&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;                                   &lt;span class="c1"&gt;// userMinOut: 1,000 USDC (6 decimals), YOUR number&lt;/span&gt;
  &lt;span class="nx"&gt;me&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nc"&gt;BigInt&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;Math&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;floor&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;Date&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;now&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="mi"&gt;1000&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mi"&gt;120&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;  &lt;span class="c1"&gt;// recipient, deadline&lt;/span&gt;
&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;functionName&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;args&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;decodeFunctionData&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;abi&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;ROUTER_ABI&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;data&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;
&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;functionName&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;`(&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nf"&gt;size&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;)}&lt;/span&gt;&lt;span class="s2"&gt; bytes)`&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;tokenIn&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;tokenOut&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;amountIn&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;userMinOut&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;recipient&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;deadline&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="nf"&gt;forEach&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;n&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;i&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt;
  &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt; &lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;n&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;padEnd&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; &lt;span class="nc"&gt;String&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;args&lt;/span&gt; &lt;span class="kd"&gt;as &lt;/span&gt;&lt;span class="k"&gt;readonly&lt;/span&gt; &lt;span class="nx"&gt;unknown&lt;/span&gt;&lt;span class="p"&gt;[])[&lt;/span&gt;&lt;span class="nx"&gt;i&lt;/span&gt;&lt;span class="p"&gt;])));&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;swapBestExactIn (196 bytes)
  tokenIn    0x4200000000000000000000000000000000000006
  tokenOut   0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913
  amountIn   500000000000000000
  userMinOut 1000000000
  recipient  0x000000000000000000000000000000000000dEaD
  deadline   1793236722
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;(&lt;code&gt;npm i @blazephoenix/sdk viem tsx&lt;/code&gt;, save as &lt;code&gt;order.mts&lt;/code&gt;, run &lt;code&gt;npx tsx order.mts&lt;/code&gt;. The deadline is "now + 120 s", so yours will differ.)&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F1jruw4sn9nbxu7zw9e8h.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F1jruw4sn9nbxu7zw9e8h.png" alt="Decoded swapBestExactIn calldata: tokenIn, tokenOut, amountIn, userMinOut, recipient, deadline" width="800" height="420"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Who do you trust in each design?
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;&lt;/th&gt;
&lt;th&gt;UniswapX (per its docs)&lt;/th&gt;
&lt;th&gt;On-chain routing (BlazePhoenix source)&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;What you sign&lt;/td&gt;
&lt;td&gt;A Permit2 order with outputs and auction parameters&lt;/td&gt;
&lt;td&gt;A transaction with six arguments&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Who finds the price&lt;/td&gt;
&lt;td&gt;Quoters (permissioned) and fillers, in an auction&lt;/td&gt;
&lt;td&gt;A Solver contract, in your transaction&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Who pays gas&lt;/td&gt;
&lt;td&gt;The filler, priced into the order&lt;/td&gt;
&lt;td&gt;You&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Cost of a failed swap&lt;/td&gt;
&lt;td&gt;None (per the docs)&lt;/td&gt;
&lt;td&gt;The gas of the reverted transaction&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Who settles&lt;/td&gt;
&lt;td&gt;Any filler, after the exclusivity window&lt;/td&gt;
&lt;td&gt;You, in your own transaction&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;What you can replay&lt;/td&gt;
&lt;td&gt;The signed order and the on-chain fill&lt;/td&gt;
&lt;td&gt;The quote, at any block, with &lt;code&gt;eth_call&lt;/code&gt; on your RPC&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Services in the default path&lt;/td&gt;
&lt;td&gt;Uniswap Labs' API, cosigner and quoter set&lt;/td&gt;
&lt;td&gt;Your RPC node&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Status&lt;/td&gt;
&lt;td&gt;Documented for many chains&lt;/td&gt;
&lt;td&gt;Pre-launch; audit scheduled, not done&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fw00lszi5m021nueynko3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fw00lszi5m021nueynko3.png" alt="Table of what you trust and what you can verify in each design" width="800" height="420"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Where does UniswapX win?
&lt;/h2&gt;

&lt;p&gt;Be honest about this, because it is a lot:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Gasless for the swapper&lt;/strong&gt;, and failed attempts cost nothing. On-chain routing offers neither.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Fillers can bring their own liquidity&lt;/strong&gt; and "their own filling strategies" (overview), not only what sits in public pools.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Competition over price&lt;/strong&gt; is the point of the auction. If your priority is the last basis point on a large order, measure both designs on your trade; don't take either side's word.&lt;/li&gt;
&lt;li&gt;It is documented by Uniswap Labs for many chains, with filler tooling and an orders API.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Where does on-chain routing win?
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Composability.&lt;/strong&gt; &lt;code&gt;swapBestExactIn&lt;/code&gt; is an ordinary external function, so a contract can call it and use the result in the same transaction. A signed order that some filler settles later is not something you can await mid-call. (This follows from the function signature; I have not built that integration for this article.)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Nothing off-chain to trust for the price.&lt;/strong&gt; Quote and execution are the same bytecode; anyone can recompute a quote on their own node, with no key and no signup.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Predictable failure.&lt;/strong&gt; &lt;code&gt;userMinOut&lt;/code&gt; is yours; below it, the transaction reverts. The cost is gas, which is the price of that guarantee.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Fewer moving parts for scripts and agents&lt;/strong&gt;, which need an RPC URL rather than an order pipeline.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  So, do you actually need UniswapX?
&lt;/h2&gt;

&lt;p&gt;Use it if most of these are true:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Your users should not need the chain's gas token.&lt;/li&gt;
&lt;li&gt;A failed swap must cost them nothing.&lt;/li&gt;
&lt;li&gt;Your orders are large enough that filler inventory could beat pool prices, and you will measure that.&lt;/li&gt;
&lt;li&gt;You are fine with Uniswap Labs' services being in the default path.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Use on-chain routing if most of these are true:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;A contract of yours must perform the swap and continue in the same transaction.&lt;/li&gt;
&lt;li&gt;You want to re-derive the quote yourself, at a block of your choice.&lt;/li&gt;
&lt;li&gt;Your caller is a script or an agent that holds a key and an RPC, not a UI.&lt;/li&gt;
&lt;li&gt;You accept paying gas for a bounded, verifiable outcome, and you accept an unaudited, pre-launch protocol.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;They are not mutually exclusive: nothing stops an application from offering both and letting the user choose.&lt;/p&gt;

&lt;h2&gt;
  
  
  FAQ
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Is UniswapX gasless?&lt;/strong&gt;&lt;br&gt;
For the swapper, per the docs: gas is wrapped into the price and paid by the filler, and failed swaps incur no fees.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Can I quote a swap without an API key?&lt;/strong&gt;&lt;br&gt;
With BlazePhoenix, yes: the quote is an &lt;code&gt;eth_call&lt;/code&gt; on your own RPC. The Uniswap API examples in the docs send an &lt;code&gt;x-api-key&lt;/code&gt; header.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Does in-transaction solving prevent sandwiches?&lt;/strong&gt;&lt;br&gt;
No. The source says so itself: it removes stale plans, not ordering risk, which is why &lt;code&gt;userMinOut&lt;/code&gt; is mandatory.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Is BlazePhoenix on-chain routing available today?&lt;/strong&gt;&lt;br&gt;
The Quoter (&lt;code&gt;previewPlan&lt;/code&gt;) is readable on the deployed 1.0.0. &lt;code&gt;swapBestExactIn&lt;/code&gt; is in the 2.0.0 source, listed as pending. The protocol is pre-launch.&lt;/p&gt;

&lt;h2&gt;
  
  
  Verify it yourself
&lt;/h2&gt;

&lt;p&gt;Read the UniswapX pages linked above (consulted 2026-10-29; docs change), then compare with the &lt;a href="https://gitlab.com/blazephoenix-group/dex" rel="noopener noreferrer"&gt;Router source&lt;/a&gt; and the longer &lt;a href="https://blazephoenix.xyz/learn/intents-vs-onchain-routing/?utm_source=devto&amp;amp;utm_medium=article&amp;amp;utm_campaign=intent-vs-onchain-routing-uniswapx" rel="noopener noreferrer"&gt;intents vs on-chain routing&lt;/a&gt; note. The design is specified in the &lt;a href="https://doi.org/10.5281/zenodo.23084091" rel="noopener noreferrer"&gt;whitepaper&lt;/a&gt; (DOI 10.5281/zenodo.23084091).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Try the read side:&lt;/strong&gt; connect an agent to the &lt;a href="https://blazephoenix.xyz/mcp?utm_source=devto&amp;amp;utm_medium=article&amp;amp;utm_campaign=intent-vs-onchain-routing-uniswapx" rel="noopener noreferrer"&gt;MCP server&lt;/a&gt; (no key) and call &lt;code&gt;prepare_quote&lt;/code&gt;, or run the snippet above. Tell me in the comments which of your swaps needs gasless and which needs composability.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;I'm on the BlazePhoenix team. BlazePhoenix is pre-launch; an independent external audit is scheduled before launch. UniswapX is a product of Uniswap Labs; this is an architectural comparison, not a price or security ranking, and not advice.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>defi</category>
      <category>ethereum</category>
      <category>web3</category>
      <category>architecture</category>
    </item>
  </channel>
</rss>
