Skip to content

Research notes

Crypto transaction cost analysis: reconcile the whole order

A low fee is only one part of the bill. Reconcile the original trading intention, actual fills and unfinished quantity against one declared benchmark.

Two ivory blocks under a measuring frame with thin lime slivers separated into dark trays.
Illustration for research notes; examples in this article are educational.

Crypto transaction cost analysis compares the outcome of an intended trade with a price benchmark chosen before execution, then accounts for actual fees and any unfinished quantity. Preserve the original size, side, market and timestamps. Reconstruct distinct fills, use one stated denominator for basis points, and distinguish measured price differences from claims about what caused them.

A fee receipt answers how much the venue charged. It does not answer how much the execution differed from the original decision. A useful analysis connects those two records without counting the same cost twice.

Define the transaction and benchmark first

For this article, the transaction is a trading instruction on one spot market, including any child orders used to complete it. A blockchain transfer has a different cost record. A perpetual position also has carrying costs beyond its entry and exit orders. Keep these scopes explicit rather than calling every account debit an execution fee.

Write down the intended quantity, buy or sell direction, exchange, account, instrument, quote currency and decision time. Then select the benchmark: for example, the midpoint of that market's best bid and ask at the decision time. A midpoint is a comparison reference, not an offer at which the entire quantity could have traded.

Joel Hasbrouck's transaction cost analysis chapter describes comparing actual execution with a hypothetical benchmark portfolio and distinguishes explicit charges from implicit price differences and nonexecution. That framework comes from securities market analysis; applying it here does not imply that crypto has a consolidated equity-style best-price system.

Keep a decision benchmark and an arrival benchmark separate. The first measures the whole implementation interval. The second begins when the order reaches the execution stage. If arrival was not observed reliably, label it unavailable. A later quote cannot reconstruct a missing earlier observation. The market-data freshness guide explains why event time and receipt time need separate treatment.

A candle's closing price is not automatically the quote at the decision instant. Verify its actual aggregation window before using a candle-derived benchmark.

Rebuild one order from its fills

Use actual executed quantities, rather than requested order sizes. Group fills under the original trading intention and retain their exchange identities. Deduplicate repeated records, retrieve all result pages and reconcile the filled total against the final order state before calculating an average.

Coinbase's Advanced Trade List Fills documentation illustrates the necessary distinction: fill records expose order identifiers, trade time, price, size and commission, with pagination. Interpret each venue's units and fields from its own documentation; do not assume a field called size always means base-asset units.

Here is an entirely hypothetical spot purchase. All quantities are base-asset units, prices are USD per unit, and fees are paid in USD. The intended purchase is 10 units. The decision midpoint is $100.00 and the observed arrival midpoint is $100.10. Both fills are assumed to pay a made-up 0.10% fee; this is not a current venue quotation.

Execution recordQuantityFill priceExecuted valueAssumed fee
First distinct fill6$100.20$601.20$0.60120
Second distinct fill4$100.30$401.20$0.40120
Total10—$1,002.40$1.00240

The quantity-weighted execution price is $1,002.40 ÷ 10 = $100.24. An unweighted average of the two prices would give $100.25 and misstate the result because the quantities differ.

For a completed buy, benchmark price difference in dollars is filled quantity × (average fill − decision benchmark). For a completed sell, reverse the subtraction. Positive means adverse cost; negative means price improvement. Add explicit charges net of rebates, converted into the same currency under a recorded conversion policy.

ComponentCalculationDollarsBasis points of the $1,000 decision value
Decision-to-arrival difference10 × ($100.10 − $100.00)$1.0010.000
Arrival-to-fill difference10 × ($100.24 − $100.10)$1.4014.000
Explicit fees$0.60120 + $0.40120$1.0024010.024
Total benchmark difference plus fees$2.40 + $1.00240$3.4024034.024

Every basis-point figure uses component dollars ÷ $1,000 × 10,000. Using a different denominator for each component would prevent this direct addition. Rounded display values should not replace full-precision inputs in the underlying ledger.

Do not subtract the spread twice

The $2.40 execution-price difference already captures whatever spread crossing, price movement and depth consumption affected these fills relative to the selected midpoint. Adding a separate spread estimate to that same difference would count overlapping costs again.

The bid-ask spread explanation covers the quote itself; the slippage and depth worksheet covers a pretrade size estimate. This analysis instead reconciles the resulting execution against the original instruction.

Nor is the $1.40 arrival-to-fill difference proof that the order moved the market by $1.40. Other participants can trade or cancel during the interval. A price decomposition is accounting; causal market-impact attribution requires more evidence and a specified model.

Use the recorded fees rather than applying today's account tier retrospectively. Coinbase documents that Advanced fees depend on the tier at order time, and an order's immediate and resting portions can incur different maker/taker treatment. Those are Coinbase product rules, not universal rates.

The best-looking fill may leave the expensive part unfinished

Consider a separate hypothetical buy intention: 10 units at a $100 decision benchmark. Only 8 fill at $100.20. The remaining 2 are canceled. At a review endpoint fixed by the analysis policy, the market midpoint is $102.00. Assume the same invented 0.10% fee.

The executed part has 8 × $0.20 = $1.60 of adverse price difference and $801.60 × 0.001 = $0.80160 of fees. The fill rate is 80%.

For a policy that measures the unfilled purchase at that endpoint, the opportunity-cost comparison is 2 × ($102 − $100) = $4. Including it gives $1.60 + $0.80160 + $4 = $6.40160, or 64.016 basis points of the original $1,000 intention.

The $4 is not an exchange debit or a realized loss. It describes foregone exposure under a stated counterfactual. A falling endpoint could make that comparison favorable instead. Fix the endpoint policy before reviewing outcomes, disclose cancellations caused by a changed investment decision, and show executed cost and opportunity cost separately. Otherwise, selecting a convenient endpoint can manufacture a flattering result.

If the remaining order's status is unknown, first follow the partial-fill management guide. An unresolved remainder is not a verified cancellation and may still execute.

Keep other costs in the appropriate ledger

Fees paid in another token need both the actual token quantity and a timestamped conversion into the reporting currency. A rebate is a signed credit, not a reason to erase adverse execution prices. Preserve native amounts so another reviewer can reproduce the conversion.

For an on-chain swap, define whether the comparison covers approval transactions, routing charges and reverted execution as well as the successful swap. Ethereum's gas documentation states that computational work consumes gas even when included execution fails; a rejected transaction that never enters execution is a different case. Use the receipt's actual charge rather than a wallet's maximum fee allowance.

For perpetuals, keep the funding settlement ledger alongside execution costs. Funding belongs to the held position and applicable settlement times. It should not silently become a maker or taker fee.

A record that supports the next decision

Keep this compact worksheet for each original intention:

FieldEvidence to preserveIf missing
BenchmarkMarket, source, bid/ask or other definition, timestampBenchmark comparison remains unverified
Intended workSide, original quantity, deadline and child-order mappingCompletion cannot be assessed
Actual executionDistinct fill IDs, quantities, prices and final statusReconcile before reporting a final cost
Explicit chargesNative fee/rebate amounts and conversion policyReport an incomplete total
Unfinished workRemaining quantity, reason and fixed endpoint policyShow the limitation beside fill rate
Comparison groupSimilar instrument, size, urgency and market conditionsAvoid declaring one method superior

Across multiple orders, divide summed comparable dollar costs by summed benchmark values; do not simply average order basis points when sizes differ. Retain the distribution and unfinished orders so a few large adverse outcomes do not disappear inside a mean.

When these costs feed a strategy benchmark comparison, apply the same reporting currency and valuation policy to the alternatives while charging each for its own actual trading activity.

A useful finding names an actionable dependency: “Fees are reconciled, but decision-time quotes are missing for three orders.” This is more defensible than declaring the cheapest execution from a low average fee. It identifies which evidence would improve the analysis.

Method and limits

This AI-assisted editorial explanation uses linked primary documentation and an academic teaching chapter. Both numerical examples and the worksheet are original educational constructions, checked with decimal arithmetic. No live execution sample, venue ranking, causal impact estimate or KLINEO transaction-cost reporting feature was tested or claimed. The method evaluates implementation evidence; it does not establish that a strategy will be profitable.

Keep the context with the example.

Each worked example is illustrative, with its sources and assumptions in the article. Read our editorial standards for authorship, verification and corrections.