Odos

Odos routing paths and settled outputs before shutdown

Odos routing searched token-swap combinations and non-linear paths before the service shutdown. Past swaps can be traced through encoded paths, executor calls, and final transfers. Router V3 enforced specified minimum outputs, and the operating company announced permanent service closure for July 30, 2026.

updated

In short: Router V3 checked the final output against its minimum after fee deductions and any configured retention of positive slippage.

Locate the historical swap and its receipt

For a Router V3 swap, the network, transaction hash, and receipt identify the execution and its recorded status. Locate that record before interpreting a route. On Ethereum, eth_getTransactionByHash retrieves the transaction, while eth_getTransactionReceipt returns its receipt. A successful status belongs to the complete transaction. Decode a direct Router V3 call from transaction data; use an execution trace to locate a nested call and check its outcome. A hash without a receipt leaves execution unresolved. The router call could also sit inside an enclosing transaction that invoked it through another contract.

Router V3's call format belonged to Ethereum Virtual Machine (EVM) deployments. The separately announced Solana router used the Solana Virtual Machine (SVM) and required different instruction decoding. The deployed version governs how its call is decoded.

An approval record concerned spending permission. A successful receipt for that call did not establish that an exchange followed.

What did a selected Odos path describe?

A selected Odos path described the contract interactions that an executor was instructed to attempt for the requested token exchange. The routing search considered token combinations and non-linear paths across liquidity sources. The selected path did not provide a catalogue of every alternative that the search considered. Intermediate transfers need interpretation within that execution, with declared inputs and final outputs kept distinct.

The outer router parameters named the executor, inputs, and required outputs; pathDefinition carried executor-specific instructions. Decoding the outer call did not automatically decode that byte sequence. Its interpretation required the path format used by the actual executor. Compact calldata changed how outer parameters were represented. That encoding choice did not identify liquidity sources or establish a better route.

What did a selected Odos path describe? (Odos routing) - illustration

View full-size image

Follow the executor's calls through the route

An execution trace revealed the calls that followed the selected path, including their order and the contract addresses involved. Router V3 invoked executePath on the specified executor and supplied the encoded path, input amounts, and swap caller. The executor's interactions show whether and how the inputs produced output proceeds. A token-transfer summary shows movements, while a call trace adds the contract interactions surrounding them. Several transfers within one execution did not imply several independently submitted swaps.

Input destinations also needed their own interpretation. The inputReceiver field selected the ERC-20 single-swap input's destination; the executor argument selected the contract that received executePath . Those parameters had different jobs, even when their addresses matched. A transfer into an intermediate contract could not alone establish delivery of the final output.

Input permissions belonged to the executed call

Successful input handling depended on the authorization method used by that historical call. A direct ERC-20 allowance enabled the router to transfer the requested input; Permit2 entry points required signed transfer permissions and an ERC-20 allowance to Permit2. Their authorization data belonged to the swap caller and the actual input token. Historical reconstruction therefore needed the applicable permissions at execution time. Today's balances or allowances could describe a different state. Native input on payable swap entry points followed the call's value handling, so an ERC-20 approval record could not explain it.

Which output amount did Router V3 settle?

Router V3 settled the output remaining after applicable referral-fee deductions and its configured treatment of positive slippage. It measured proceeds as the router's output-token balance increase during executor execution. The quote, minimum, and final amount had separate meanings: the quote described the expected output, the minimum set a settlement floor, and the final amount reflected the router's accounting.

A nonzero referral fee reduced the output available for settlement. Positive slippage meant fee-adjusted proceeds exceeded the encoded quote. The positive-slippage flag in the referral code determined whether that excess remained in the router or passed through. A zero referral fee therefore did not establish that the recipient received every unit produced by the executor. These fields must be read from the actual historical call.

The amountOut value in a successful Swap event recorded the router's settled single-swap output. Recipient transfers tied that amount to its destination. Contract balances could also contain earlier revenue, which belonged outside the current swap's balance increase. Treating the router's entire balance as swap proceeds would inflate the amount attributed to that execution. For a token with nonstandard transfer behavior, the router's instructed amount could differ from the recipient's balance increase. Recipient-side transfer records and balance changes resolve that distinction; the swap event reports the router's amount.

Multi-token routes had a minimum for each output

Each output in Router V3's multi-token routine carried its own quote, minimum, and recipient. Router V3 reverted a multi-output swap if any final output fell below that token's specified minimum. Surplus in one token could not satisfy another token's shortfall. The SwapMulti event associated output amounts with output-token addresses in corresponding arrays. Native and ERC-20 outputs also required different transfer evidence. A combined monetary estimate could conceal a deficient token output, so settlement analysis kept the outputs separate.

A failed replay of a completed legacy swap

Router V3 applied its minimum to the settled output. In this hypothetical legacy swap, the ERC-20 output follows standard transfer behavior. Its encoded quote is 1,235 output-token base units, the minimum is 1,215, and the referral fee is zero. Assume distinct input and output tokens, valid spending permission, and a historical receipt that records successful execution.

A replay mistakenly uses later liquidity conditions and produces 1,205 output-token base units. That falls 10 units below the minimum and triggers a slippage-limit failure. The replay produces no successful settlement, even though the assumed historical receipt records one. Its failure describes the substituted state.

Pause the replay when it conflicts with the recorded receipt. Retry the unchanged transaction locally against its original pre-execution state. Keep the encoded amounts and recipients. Restoring the relevant pool state, balances, and permissions addresses the changed liquidity; reducing the minimum would create a different request.

The corrected replay produces 1,225 output-token base units. With no referral fee and proceeds below the quote, the amount clears the minimum by 10 units. The historical Swap event and transfer to the configured recipient each record 1,225 units. They agree with the reconstructed settlement.

An unavailable original state would leave the replay unconfirmed. A later allowance change could invalidate another reconstruction before execution reached settlement. Retrying the local analysis changes no onchain balance or permission. The receipt remains evidence of the original transaction, while a mismatched simulation cannot replace it.

Malformed requests and hooks changed the interpretation

Before settlement, request validation could reject a route whose parameters violated Router V3's constraints. Single-swap logic required different input and output tokens, a positive minimum, and a minimum no greater than the quote. Multi-token logic additionally rejected duplicate inputs, duplicate outputs, and overlap between input and output token sets. A failure in these checks identified an invalid request structure. Path execution had not reached the stage needed to assess settlement output. The trace location of the failure helps distinguish that case from an executor error.

Hook entry points added a call after the swap routine returned its settled output amounts. The hook received those amounts and the original caller, with its own target and encoded data. If a hook error reverted the whole transaction, earlier swap transfers rolled back with it. An inner error had to be interpreted alongside the enclosing call's status. The router's temporary output calculation alone could not establish a completed transaction.

Transaction tracing after the announced shutdown date

The operating company announced permanent service closure for July 30, 2026, with the app scheduled to become read-only on July 27. Historical routing analysis now concerns already submitted transactions and surviving chain records. A deployed router or public contract code did not establish continued availability of the quote service, executor infrastructure, or team maintenance. Nor did surviving code identify a current replacement interface.

Compared with an old interface screenshot, a transaction trace exposes the contracts actually called and the order in which execution reached them.

Things people ask about Odos routing

Does the sender in a Swap event identify the output recipient?

A Router V3 Swap event's sender identified the swap caller, who could differ from the output recipient. The event omitted the output receiver. When outputReceiver was zero, the router sent the output to its caller; otherwise, it used the encoded receiver. The corresponding transfers confirmed the destination. The settled amount needed to be assigned to that recipient before interpreting the caller's balance.

How did token decimals affect amounts in an Odos routing record?

Token amounts in a routing record were integers in each token's base units. Human-readable amounts used that token's decimal setting: divide the raw amount by 10 raised to the decimal count. ERC-20 defines decimals as optional, so missing metadata does not justify assuming a decimal count.

What happened to gas when a routing transaction reverted?

An onchain routing transaction that reverted still incurred charges for the gas it consumed. The reversal removed the failed execution's token-transfer effects, not its computation cost. Unused gas was not automatically exhausted by a normal REVERT. A local simulation, by contrast, did not submit a fee-paying transaction.

Could an output hook prove that a bridge transfer had arrived on another chain?

A successful hook that initiated bridging established a source-chain operation, not destination-chain delivery. Router V3 allowed post-swap hooks that could initiate a bridge transaction. Destination delivery depended on the bridge's separate mechanism and records. A successful source-chain swap alone did not establish that the intended recipient received bridged assets.

Was Router V3's minimum-output check a form of front-running protection?

Router V3's minimum-output check constrained acceptable settlement; it did not prevent transaction reordering. Front-running protection concerned how transactions were submitted and exposed to other participants. The recorded settled amount could demonstrate that the encoded minimum held, without establishing private submission or a particular protection service. The transaction's submission method required separate evidence.

Why could a saved route fail to prove that the quote was globally optimal?

A saved Odos quote described one proposed outcome under its request parameters and liquidity conditions. Establishing global optimality would require comparison with every relevant feasible alternative under equivalent conditions. The chosen path and its successful receipt showed execution of that route. They did not establish that no better route existed.