← Back to blog

Published on Fri Aug 14 2026 00:00:00 GMT+0000 (Coordinated Universal Time) by Jacob Cavazos

The Difference Between Quote and Execution

You request a swap quote. You receive an expected output amount. The swap executes. You receive an actual output amount. These two numbers are not always the same. The difference is called surplus. What happens to that surplus determines your real cost.

Surplus arises for several reasons. The routing engine may find a better path than the initial quote suggested. A pool that was not queried at quote time may have better reserves by execution time. A multi-hop route through an intermediate token may produce a better effective price than the direct route. Price impact may be lower than estimated if the swap is split across multiple pools. An RFQ market maker may offer a firm quote that beats the AMM price. The market may move in your favor between quote and execution.

On Base, block times are 2 seconds. The window between quote and execution is small. But it is not zero. Within that window, conditions change. Surplus is the positive difference. Slippage is the negative difference. Both are real. Both affect what you actually receive.

Who Keeps the Surplus

This is where aggregators differ. This is not always transparent.

Some aggregators keep the surplus. The user receives the quoted amount. Or the minimum received after slippage tolerance. The aggregator retains any excess as additional revenue. This is common with aggregators that charge 0% or low advertised fees. The surplus is how they actually make money. The headline fee looks low. The effective cost is higher. The aggregator is capturing value the user could have received.

Some aggregators return the surplus to the user. The user receives the actual executed output. The executed output may be higher than the quoted amount. The aggregator’s revenue is limited to the stated platform fee. This is less common. It requires the aggregator to forgo a revenue source. It is more transparent. The fee you see is the fee you pay.

The difficulty for users is that surplus retention is invisible. The swap interface shows quoted: 3.33 WETH, received: 3.33 WETH. But if the execution actually produced 3.35 WETH and the aggregator kept 0.02 WETH, the user has no way to know. The received amount matches the quote. Everything looks correct. The surplus extraction is hidden in the gap between execution and display. The construct hides the cost. The territory shows the cost.

How to Tell the Difference

The only reliable way to know whether an aggregator returns surplus is to compare the actual executed output against the received amount. The actual executed output is visible on the block explorer. The received amount is visible in your wallet. If the block explorer shows the swap produced 3.35 WETH but you received 3.33 WETH, the aggregator kept 0.02 WETH. If the block explorer shows 3.35 WETH and you received 3.35 WETH, the aggregator returned the surplus.

This requires checking every swap on a block explorer. Most users do not do this. For institutional users doing large swaps, the difference is material. A 0.2% surplus on a $100,000 swap is $200. Whether the aggregator keeps it or returns it is a $200 question that most users never know they are asking.

The TVMExecutor Design

TVMExecutor is the contract we deployed on Base mainnet. It is designed to be transparent about this. The contract takes a fixed 9 bps fee from the output. The contract forwards the remainder to the user. The fee is deducted on-chain. The fee is visible in the transaction events. The fee is verifiable on Basescan.

Whatever the execution produces, the user receives the output minus 9 bps. There is no hidden surplus retention. The contract’s fee logic is in the verified source code. Anyone can trace the exact flow of tokens through the transaction. Anyone can verify that the user received the executed output minus 9 bps. Anyone can verify that the aggregator did not keep the surplus.

This does not mean every swap produces surplus. Most swaps execute close to the quoted price. Slippage is more common than positive surplus during volatile periods. But when surplus does occur, it goes to the user. Not to the aggregator. The 9 bps fee is the total platform cost. There is no second layer of value extraction hidden in the execution. There is no dynamic fee. There is no surplus retention. There is one fee. It is fixed. It is on-chain. It is verifiable.

Why This Matters for Cost Comparison

When comparing aggregator costs, the advertised fee is only part of the picture. The total cost is: pool fees plus platform fee plus gas plus MEV exposure minus surplus returned. An aggregator that charges 0% platform fee but keeps surplus may have a higher effective cost than an aggregator that charges 9 bps but returns surplus. The only way to know is to measure the actual received amounts. Not the quoted amounts. The actual received amounts.

We have written before about how performance is the new trust layer in DeFi infrastructure. Surplus handling is part of that. A system that claims 0% fees but silently retains surplus is not actually cheaper. It is less transparent about what it costs. A system that charges a fixed, verifiable fee and returns surplus to the user is more expensive on paper. It is potentially cheaper in practice.

The construct says free. The territory says 9 bps. The construct hides the surplus. The territory returns the surplus. The construct says trust the interface. The territory says check the block explorer. The construct says the fee is zero. The territory says the fee is what you actually paid, not what the interface displayed.

The contract is public. The fee is fixed. The source code is verified. That is the level of transparency that lets users verify their actual costs. Not the quoted costs. The actual costs. The costs that leave your wallet. The costs that the construct hides. The costs that the territory shows.

Launch Orkid Swap →

Related: TVMExecutor: Nine Basis Points, No Exceptions · Performance Is The New Trust Layer · Why Base’s Liquidity Graph Leaks Value

Written by Jacob Cavazos

← Back to blog

Research to next step

Turn this research into a usable next move

Reading the post is only step one. The stronger move is to route it into the asset or commercial lane that matches what your team needs next.

Try it now

Swap on Orkid

9 bps flat fee, gasless, MEV-protected. Live on Base, Ethereum, and Unichain. No ETH needed — the solver pays gas.

Open swap →

Launch overview

Read the launch brief

Start with the launch brief when the team needs the fastest summary of fit, trust, and the right next route through the site.

Read launch brief →

Technical packet

Review the Protocol Packet

If the post raised technical questions, move into the packet for the forwardable version of the core framework.

Review packet →

Shortlist and fit

Use comparisons or alternatives

When the question is no longer category education but shortlist fit, use the comparison surfaces to support an honest vendor evaluation.

See comparisons →
  • ZK Proving Systems Compared: Halo2, SP1, Plonky2, and STARKs

    ZK Proving Systems Compared: Halo2, SP1, Plonky2, and STARKs

    Eight zero-knowledge proving systems compared across proving time, proof size, verification, trusted setup, and ecosystem. A developer's guide to choosing a ZK system.

  • What Is Tokenized Credit Infrastructure?

    What Is Tokenized Credit Infrastructure?

    Tokenized credit is more than putting a loan on-chain. It is a full stack: SPV, token registry, compliance layer, and distribution. Here is how it works and why ERC-6909 matters.

  • What Is Surplus in DEX Aggregation?

    What Is Surplus in DEX Aggregation?

    When an aggregator routes your swap better than the quoted price, the difference is surplus. Some aggregators keep it. Some return it. Here is why that matters for your total cost.

  • What Is MEV and How to Protect Against It

    What Is MEV and How to Protect Against It

    Maximal extractable value costs DEX users millions. Here is what MEV is, how sandwich attacks work, and the four approaches to protection — private mempools, batch auctions, intent-based execution, and threshold encryption.

  • What Is ISO 20022 and Why It Matters for Blockchain

    What Is ISO 20022 and Why It Matters for Blockchain

    ISO 20022 is the global messaging standard for payments. Here is what it is, how it works, why banks are migrating to it, and what it means for blockchain settlement.

  • What Is Intent-Based Swap Execution?

    What Is Intent-Based Swap Execution?

    Intent-based execution lets users sign a message describing what they want, and solvers compete to fill it. Here is how the model works and why it's different from traditional DEX trading.

LLM Resource Index llms.txt