Skip to main content
Skip to content
Crypto Trading

Unused DEX Swap Inputs in 2027: Find the Refund Before Calling the Trade Complete

An EVM swap can complete with input-token residue inside a router. The DN input-spend-refund ledger distinguishes executed swaps from verified SWEEP refunds.

Premium dark amber liquid-glass forms representing unused input tokens and refund routing
Reading options: audio, text size & sections

Decentralised News · 2027 planning edition · Evidence reviewed 24 November 2026

What Matters

A routed swap can succeed without proving every unused input unit was refunded. Uniswap’s Universal Router supports partial paths and recommends cleanup using SWEEP. Reconcile actual token transfers and recipients, not only the buy-token quote.

The Signal

Uniswap’s September 2026 router-balance mode adds bridge-funded inputs that need a separate custody trail.

DN Alpha Thesis

Conservation of input token A is a native-unit identity: input equals swap spend plus refunds plus other payments plus residual. A refund requires a verified recipient transfer, not just arithmetic balance.

DN Input–Spend–Sweep Conservation Ledger

Synthetic 1,000 units A: 875 consumed, 125 returned and none retained, so the illustrative ledger balances. Actual refund remains unverified.

No wallet addresses, execution receipts or swaps are queried.

A successful transaction does not prove every token returned

A trader authorizes a route that can use up to 1,000 units of token A. The actual exchange consumes 875. The remaining 125 tokens could be untouched in the source wallet, held by a router, returned by a cleanup operation or directed to another address under the route’s configuration. A successful EVM transaction receipt only demonstrates that the overall transaction completed without an unhandled revert; it is not proof that all authorized token A units reached their expected final destination.

Proper accounting begins with the actual token movements rather than the maximum approved amount. A 1,000-token allowance is not a 1,000-token debit. The router’s received amount, executed swap spend, payments to other recipients, refunded amount and ending holdings must be reconciled in native token A units.

The Uniswap Universal Router explicitly supports partial paths

Uniswap’s Universal Router documentation describes an execution engine combining v2/v3/v4 swaps, WETH wrapping, transfers and other commands. A command with the allow-revert flag can fail while the rest of the plan continues. The official guide warns that integrators using this pattern should include a cleanup such as SWEEP to prevent tokens remaining inside the router.

That warning creates a concrete audit target: was the cleanup command present, what asset and destination did it name, did it execute, and what transfer actually posted? A generic positive transaction status cannot answer those questions. A user should not infer a refund merely because the interface displays final buy-token output.

SWEEP, TRANSFER and balance-check commands are different

The Universal Router command list includes SWEEP, TRANSFER, PAY_PORTION, UNWRAP_WETH and BALANCE_CHECK_ERC20. The first moves a router-held balance to a named recipient; a transfer can move a defined amount; balance checks can enforce postconditions. The exact command bytes and required inputs must be read for the deployed router version and network.

If a third-party integrator chooses a refund recipient different from the wallet that supplied the tokens, the actual transfer may be economically unacceptable even though a valid contract instruction was followed. The route should preserve that recipient decision explicitly. Wallet approval scope remains a separate security matter from the final destination of leftover principal.

Bridge-funded swaps add another source of input balances

Uniswap’s 28 September 2026 router-balance update introduced an optional swapSource value allowing a bridge to deposit tokens into a Universal Router before a destination-chain swap. The swap then consumes the router’s token balance rather than pulling a fresh allowance from the user’s destination-chain wallet.

An auditor who only examines the local user wallet’s debit may mistakenly conclude that no input funded the trade. The bridge release, contract address and router balance must be part of the same conservation chain. The provider cautions integrators to read the route details to avoid losing assets. This mechanism is specific to supported versions and chains, not evidence that all bridges behave identically.

An original 1,000-unit input ledger

Assume a synthetic router begins the sequence with 1,000 token A units. It spends 875 A on an allowed swap and returns 125 A to the user’s wallet. With no transfers to other recipients and no router-held residue, the conservation identity is 1,000 = 875 + 125 + 0. The final buy-token amount is a separate asset, not something to add to the token A equation.

If the cleanup fails but the router retains 125 A, the identity can still balance as 1,000 = 875 spent + 125 held. But the user did not receive those 125 A units. That difference is the precise reason a conservation ledger must name the destination and whether the transfer event occurred, rather than merely checking that numerical totals add up.

A nonzero router balance is an investigation, not a theft finding

A positive ending balance at a router after execution may indicate missing cleanup, a deliberately retained working balance, an unrelated user’s funds, a subsequent bridge transfer or another contract-specific condition. It cannot be classified as recoverable by the current user from the aggregate balance alone. The full chain of asset movements and contract rules is necessary.

Any recovery claim would need to establish authorized control of the relevant assets and the router’s withdrawal functionality. DN’s calculator asks only for manually entered amounts. It neither inspects live router balances nor recommends calling an unverified administrative method to recover funds.

Refunding principal differs from revoking an approval

After leftover token A returns to the wallet, an ERC-20 approval or Permit2 permission may still authorize future spending by a contract. Conversely, a spending approval can exist when the router has no current token balance. The recipient should treat cashflow reconciliation and authorization state as independent audits.

DN’s permission revocation analysis deals with token spending powers. This page owns the actual movement of unused input token units from a particular swap route. It does not promise that a SWEEP cancels any outstanding signatures or approvals.

Transfer-tax and rebasing tokens complicate the identity

In the synthetic calculation, token units are assumed conserved without deductions. A fee-on-transfer token can deduct units during routing, while a rebasing balance can change without an ordinary transfer event. In such cases, the standard input-spent-refund equation needs additional rows for token-level deductions or index-based balance changes. A missing quantity is not automatically a router refund.

Use a specific token contract and timestamped before/after balances for an actual audit. A successful swap quote is not a reliable source of the exact final wallet change, particularly when the token’s internal accounting diverges from ordinary ERC-20 transfer behavior.

The proof standard for a completed route

  1. Identify exact chain, token contract and deployed router version.
  2. Capture source-wallet transfers or bridge-funded router receipts.
  3. Preserve the actual maximum input authorization separately from token A delivered.
  4. Read each executed swap command and any allow-revert flags.
  5. Verify the cleanup command and the recipient it names.
  6. Reconcile token A spent, refunded, sent elsewhere and retained in the router.
  7. Cross-check buy-token receipt and all unrelated fees in their native units.

A trustworthy platform should report an actual refund only when transfer evidence supports it. Successful processing without proof of the recipient is an incomplete settlement record.

Sources, methodology and disclosure

Technical references: Universal Router overview, command reference and September 2026 router balance mode. Reviewed 24 November 2026. The 2027 title is an edition; the tool uses synthetic token quantities and cannot establish that an actual router holds or can recover assets.

Disclosure: No swap provider is promoted by this source-based analysis. A real financial action needs an authorized wallet and contract review. Corrections: press@decentralised.news.

FAQ

Does a successful swap guarantee every unused input token returned?

No. Actual router cleanup and token transfer events must be verified.

What does the Uniswap Universal Router SWEEP command do?

It moves router-held token balances to a specified recipient under the encoded command.

Can the router receive funds from a bridge rather than my wallet?

Yes. A documented 2026 route mode permits swaps against tokens deposited directly into the router by a bridge.

Is a refund the same as revoking a token approval?

No. The refund moves token units, while approvals are separate spending authorizations.

Does the DN tool trace a real swap?

No. It checks synthetic input-asset conservation using manually declared amounts.

Related research

Our Products

Tokenized Trillions bookBlockchain Applied book

Bestseller

Best Seller Books

Follow us

Get the most talked about stories directly in your inbox

Join the Decentralised News briefing for independent crypto, DeFi and AI analysis. No spam, unsubscribe anytime.