DEX aggregator swaps: one hash, many hops, one journal
Aggregators split a trade across many pools in a single transaction. Book what entered and left your wallet, once, with fees shown separately.
What this means for you: a swap routed through an aggregator such as 1inch or 0x can produce dozens of token movements on the block explorer, but economically it is usually one disposal and one acquisition. The job is to record one journal per transaction hash, using only the legs that touched your wallet, and to keep integrator fees and gas visible rather than buried in the price.
What an aggregator actually does
An aggregator is a routing layer. It looks at prices across many liquidity sources and builds a route that gives the best net result for the trade size. 1inch describes its Pathfinder engine as able to split a swap between different protocols and between different price depths within the same protocol, while accounting for gas cost [1]. 0x says its Swap API draws on more than 150 liquidity sources and uses smart order routing to split a trade across them [2].
The result arrives as one unsigned transaction that your wallet or multisig signs [2]. Inside it, a router contract may send part of your tokens to one pool, part to another, hop through an intermediate token, wrap native ETH into WETH, and finally send the output token back to you. All of that happens atomically: either the whole route settles or the transaction reverts and only gas is spent.
Why the explorer view is misleading
A transaction receipt for a split route lists every token transfer the contracts made, including transfers between the router and each pool. Most of those never touch an address you control. Intermediate tokens on a multi-hop route are held by the router for a fraction of a block; you never owned them, so they should not create lots, prices or gains in your ledger.
The practical filter is simple: keep only transfers where your wallet is the sender or the recipient, plus the native-token gas charged to the signer. In a typical aggregated swap that leaves three lines: the token you sold, the token you received, and gas. Occasionally you will also see a refund of unused input or a small extra amount of the output token; those belong in the same journal.
| Transfer type | Touches your wallet? | Treatment |
|---|---|---|
| Your sell token to router | Yes | Disposal leg |
| Router to pools, pool to pool, intermediate hops | No | Ignore for the ledger; keep the hash as evidence |
| Output token from router to you | Yes | Acquisition leg |
| Integrator fee taken in sell or buy token | Indirectly | Fee or reduction of proceeds, per policy |
| Native gas paid by signer | Yes | Gas disposal and expense |
Where fees hide
Two kinds of cost sit inside an aggregated swap besides gas. First, the front end you use may charge an integrator fee. In 0x's model, the integrating app sets a fee of up to 10 percent by default, expressed in basis points, and it must be taken in either the buy token or the sell token [3]. Second, 0x lets some integrators on custom plans collect positive slippage, meaning any amount above the quoted output goes to the integrator rather than to you [3]. Neither shows up as a separate line in your wallet unless you look for it.
The quote returned before signing also matters as evidence. 0x quotes include a minimum output amount that reflects your slippage tolerance [2]. Saving the quote, the signed transaction and the receipt together gives an auditor the expected price, the worst acceptable price and the price actually achieved.
One transaction, one journal
Because every hop settles inside a single transaction hash, the cleanest record is one journal entry for that hash, with as many lines as needed. Splitting the route into one journal per pool would create entries for assets you never held and makes reconciliation to the wallet harder. The fair value of the trade is best taken from the leg with the most reliable price; when one side is a recognized stablecoin, many teams use that leg as the anchor rather than an oracle price for the other token.
For US GAAP reporters, crypto assets within the scope of ASU 2023-08 are measured at fair value with changes in net income [7], so the gain or loss on the swap is measured against the carrying amount at the last remeasurement, not original cost. For US tax, the IRS has long treated an exchange of one virtual currency for another as a taxable disposal, with gain measured against the fair market value of what you receive [4]. For digital asset dispositions, Treasury regulations allocate transaction costs, including transaction fees, to the disposition, which reduces the amount realized rather than adding to the basis of the token received [5]. The separate rule that would have made DeFi front ends file broker returns was disapproved by Congress and removed from the regulations effective July 11, 2025 [6], so do not expect an information return from a self-custodied aggregator swap.
| Account | Debit | Credit |
|---|---|---|
| Sell 10 ETH for USDC through a three-route aggregated swap Gross output 30,100 USDC; integrator fee 100 USDC taken in the buy token; 30,000 USDC received. ETH carrying amount 2,200 per ETH. Gas 0.004 ETH at 3,010 = 12.04; carrying amount of gas ETH 8.80. | ||
| Digital assets — USDC | 30,000.00 | |
| Swap fees (or reduction of proceeds, per policy) | 100.00 | |
| Gas expense | 12.04 | |
| Digital assets — ETH (swap) | 22,000.00 | |
| Digital assets — ETH (gas) | 8.80 | |
| Realized gain — ETH swap | 8,100.00 | |
| Realized gain — ETH used for gas | 3.24 | |
Edge cases worth a policy line
- Native token in, wrapped token out (or the reverse): if the router wraps ETH inside the route and you receive the output token directly, no WETH lot exists for you.
- Partial fills or refunds: record the unused input returned to you in the same journal, so the disposal quantity is what actually left.
- Reverted swaps: only gas is spent. Book the gas, and do not record the attempted trade.
- Approvals: a token approval is a separate transaction with gas only; it moves no tokens.
- Intent or RFQ fills: some aggregator orders are filled by a third party who pays gas. The economics are the same two legs, but there may be no gas line for you.
What to do
- Filter every swap hash to transfers to or from your own addresses before classifying it.
- Post one journal per transaction hash; never one per pool or hop.
- Write down where integrator fees and positive slippage go, and whether you show them gross or net.
- Keep the quote, signed payload and receipt together as evidence for each material swap.
- Pick and document the pricing leg, and use the stablecoin leg where one exists.
- Review aggregator front ends your team uses for their fee settings before approving trades.
Sources
- Classic Swap API (Pathfinder) Introduction (1inch)
- Introduction (Swap API) (0x)
- Monetize Your App on EVM (0x)
- Frequently asked questions on virtual currency transactions (IRS)
- 26 CFR § 1.1001-7 - Computation of gain or loss for digital assets (Legal Information Institute, Cornell Law School)
- Gross Proceeds Reporting by Brokers That Regularly Provide Services Effectuating Digital Asset Sales (removal, 90 FR, July 11, 2025) (Federal Register via GovInfo)
- FASB issues ASU on accounting and disclosure of certain crypto assets (RSM US)
General information for finance teams, current as of publication. Not legal, tax or accounting advice.