Fix a swap problem

How to identify your actual input and output in a swap receipt

Trace the assets that actually left and entered your account without double counting router and pool transfers.

Read a swap from the perspective of your account first. An aggregator can create many transfers between pools and routers; adding them all together can greatly exaggerate how much you traded.

Build an account-level reconciliation

Write down the chain, your sender address and the intended output recipient. For each relevant token contract, identify transfers out of and into those addresses. ERC-20 specifies Transfer events, while Etherscan explains how token transfers appear in explorer activity.

Hypothetical example: your account sends 100 units of token A. A router then transfers those units to a pool, and another pool returns token B through the router. You spent 100 A; the router-to-pool movement is not another 100 A expense for you.

Keep these entries separate

  • Input refund: subtract it when calculating net input spent.
  • Network fee: reconcile native-coin gas separately from ERC-20 transfers.
  • Wrapped coin: a wrapped token transfer is not automatically a native-coin transfer.
  • Approval event: this changes permission, not token ownership.

Verify token contracts before using symbols or fiat estimates. A fabricated token can emit familiar-looking events; a transfer label alone is not an authenticity check. For unusual tokens, compare the relevant onchain balance as well as logs.

Finally, distinguish the transaction’s router destination from the encoded output recipient. If you deliberately selected another recipient, your own wallet balance should not increase. This account-level method answers “what did I give and receive?” before deeper route analysis becomes necessary.

Sources & verification (2)

Source-check date is recorded in the article details. URLs are provided for manual verification. Use Copy to keep this page open.

  1. ERC-20: Token Standard

    Allowance, spender, transferFrom, metadata and approval event semantics.

    https://eips.ethereum.org/EIPS/eip-20
  2. Understanding an Ethereum Transaction

    Explorer transaction classification, token transfers and execution details.

    https://info.etherscan.com/understanding-an-ethereum-transaction/

Continue reading

Swap succeeded but the output token is missing from my wallet Does a successful transaction receipt prove my swap completed?