Say you want to buy 10 BTC and you pull up the same pair on five exchanges. Four of them show a price within a few dollars of each other, one is a touch lower, and your instinct is to go to the lower one. That instinct is usually wrong, and the reason it's wrong is the whole reason smart order routing exists. The number you're looking at is the top of the book, the best resting offer for the first tiny slice of your order. It tells you almost nothing about what you'll pay for the whole 10.
What you actually pay is fees plus spread plus slippage plus, if it's a perp, funding. Add those up and you get the all-in cost, and the all-in cost for the same asset is different on every single venue. So the job of a router isn't to find the lowest quote. It's to price out each candidate path end to end and pick the one where the total damage is smallest for your specific size.
Why the headline price lies
Top-of-book is a single point on a curve. Behind that best price sits a ladder of resting orders, and each rung is a little worse than the one above it. When you send a market order for size, you don't get filled at the top rung. You walk down the ladder, eating each level until your order is complete, and your average fill is the volume-weighted price of everything you touched. That gap between the quote you saw and the average you got is slippage, and it grows with your order and shrinks with the depth of the book.
On top of that you've got the spread, which is the distance between the best bid and best ask. If you're crossing it to get filled immediately, you're paying half the spread on entry and you'll pay it again on exit. And then the fee, which sounds trivial until you're doing size. A 5 basis point maker fee versus a 10 basis point taker fee is 5 bps of your notional, and on a large order that's real money that has nothing to do with the price on the screen.
Here's the part people miss. A venue can show you the best headline quote and still be the worst place to fill, because its book is thin. You take the top rung at a great price and then the next rung is 40 bps worse and the one after that is worse again. Meanwhile a venue that quoted you slightly wide has a deep book, so your whole order fills within a few basis points of where it started. The thin book looked cheap and ate you alive. That only shows up when you model the fill, not the quote.
How a router actually prices each path
When we route an order at Blockcircle, every eligible venue is a candidate path, and each one gets priced as if we were going to send the whole order there. The router isn't comparing quotes, it's comparing simulated fills. For a centralized exchange that means walking the live order book depth for your size and computing the volume-weighted average, then layering the taker fee on top. Deeper book, less slippage, and the fee is a known constant you just add.
For a DEX the mechanics are different but the question is the same. On an automated market maker there's no order book, there's a pricing curve, and the further you push it with size the more the price moves against you. That's the same slippage idea wearing different clothes. You also have to price the gas cost of the swap and, on a lot of chains, the risk that someone reorders or sandwiches your transaction, which is a cost even if it doesn't show up as a line item. So the all-in for a DEX path is curve impact plus the swap fee plus gas.
For a perpetual future you're not buying the asset, you're taking a leveraged position that tracks it, and the entry cost is spread plus taker fee just like a spot book. But perps carry a cost that spot doesn't, and that's where a lot of "cheaper" venues quietly turn expensive.
- CEX spot: book depth walked for your size, plus the taker fee. Simple to reason about, settles into an asset you actually hold.
- DEX: AMM curve impact for your size, plus swap fee, plus gas, plus whatever haircut you assign for MEV risk on that chain.
- Perp: spread and fee on entry, then funding for every interval you hold the position. Great for short holds, punishing for long ones.
When funding turns a cheap perp into an expensive one
Funding is the periodic payment that keeps a perp's price tethered to spot. When the market is heavily long, longs pay shorts, and that payment clears every few hours, sometimes every hour depending on the venue. If you're going long into a crowded long, you can be paying a funding rate that annualizes into the double digits just to keep the position open.
So a perp venue can win the entry math and still be the wrong choice. Suppose it quotes you a tighter effective entry than the spot books, saving you a handful of basis points to get in. If funding is running high and you're planning to hold for two or three days, that funding bleed can dwarf the entry savings several times over. The router has to know your intended holding period, or at least assume one, because a venue that's the cheapest place to enter and exit in five minutes can be the most expensive place to sit for a week. This is the single biggest reason I tell people not to compare spot and perp on entry cost alone. Funding is a real leg of the all-in and it accrues while you sleep.
One fill or split the order
Once you've priced every path, there's a second decision, and it's a genuine tradeoff rather than a clear win. You can send the whole order to the single best venue, or you can split it across two or three and fill each one only as deep as its book stays cheap.
Splitting wins on price when your order is large relative to any single book. Instead of walking one ladder all the way down into the ugly rungs, you take the good top-of-book depth from several venues at once and stop before any of them gets expensive. For a big order across fragmented liquidity, this can save meaningfully more than picking the one best venue. The catch is that it costs you in other ways. You're now paying fees on multiple venues, you're managing multiple fills that can partially complete and leave you with an awkward remainder, and you've got execution risk on each leg. On a DEX you're paying gas per transaction, so splitting has a real floor cost before it saves you anything.
For a small or medium order, none of that is worth it. The slippage you'd save by splitting is smaller than the extra fees and complexity you'd take on, so one clean fill on the single best all-in venue is the right answer. The crossover point depends on how your size compares to book depth, and that's exactly the thing the router is measuring when it prices each path. Below the crossover, keep it simple. Above it, fragment the order and accept the operational overhead because the price savings have gotten large enough to pay for it.
None of this is exotic. It's just accounting that's annoying to do by hand across 150 venues in the second before a price moves. The quote on the screen is an invitation, not a bill. What you actually pay is the sum of the fee, the spread you cross, the slippage your size drags you through, and the funding you carry while you hold, and the cheapest place to trade is whichever venue keeps that sum smallest for the order you're actually sending.