Next funding settles in --:--:--Same $10,000 PEPE long, one week: $66 more on Bitget than on OKXOpen OKX →

· four exchange APIs · rebuilt daily

How crypto tax cost basis fails when reading raw exchange exports

How crypto tax cost basis fails when reading raw exchange exports

The finding

An exchange export measures position PnL, not your crypto tax cost basis, leaving missing acquisition costs and uncaptured funding events across every trade.

Tax authorities calculate capital gains relative to the fiat purchase value of collateral and the precise entry and exit price of derivatives contracts.

Rules differ by country, and exchange CSV downloads track margin balances rather than tax liability. This analysis is structural mechanism, not tax advice.

Mechanics of taxable events in derivative trading

A taxable event occurs when you dispose of an asset, trade one asset for another, or realize a financial gain or loss. In spot trading, calculating cost basis is straightforward: the fiat amount spent to acquire the token, plus transaction fees, forms the baseline. Selling that token subtracts the original basis from the gross sale proceeds to establish the capital gain or loss.

Perpetual futures complicate this structure because positions are contracts settled in margin assets rather than direct physical transfers of the underlying token. When holding a perpetual contract, three separate flows alter tax liability: the opening and closing trade prices, transaction fees charged by the exchange, and periodic funding rate settlements.

Where this goes wrong

Relying on the realized PnL column from an exchange export ignores the original fiat cost of the collateral used to back the margin, causing capital gains software to miscalculate total tax obligations.

Tax authorities treat collateral assets used to settle margin losses as disposals. If you deposit USDT that was purchased at 0.98 USD and it is consumed to pay a perpetual contract loss when USDT is worth 1.00 USD, that collateral movement triggers a reportable taxable disposal on the underlying stablecoin alongside the loss on the contract trade.

Calculating crypto tax cost basis on perpetual positions

To establish an accurate crypto tax cost basis on a leveraged derivative position, open fees must be added to the contract entry price or treated as deductible expenses, depending on local tax jurisdiction rules. Entry fees reduce the net profit or expand the net loss of the final trade.

Consider an order for 1 BTC on Bybit at an entry price of 70,000 USDT. Using Bybit futures taker fee of 0.00055, the initial fee is calculated as:

70000 x 0.00055 = 38.50 USDT

The effective acquisition outlay for the contract becomes 70,038.50 USDT for a long position. If the position is held for 24 hours while Bybit BTC funding rate sits at +0.0081% per 8-hour interval, the long position pays funding three times:

70000 x 0.000081 x 3 = 17.01 USDT

If the contract is closed at 72,000 USDT with a taker fee of 0.00055, the exit fee is calculated as:

72000 x 0.00055 = 39.60 USDT

The gross price movement yields 2,000 USDT. The net trade result accounting for trade fees and cash flows is:

2000 — 38.50 — 39.60 — 17.01 = 1,904.89 USDT

Exchange realized PnL screens frequently display 1,921.90 USDT because funding payments are recorded in a separate cash flow ledger rather than inside the trade execution history.

Worth knowing

Funding payments are treated in several jurisdictions as income or income-deductible cash flows rather than capital adjustments, requiring funding ledger items to be separated from capital gain calculations.

VenueFutures Maker FeeFutures Taker FeeBTC 8h Funding RateETH 8h Funding Rate
Bitget0.00020.0003+0.0088%+0.0011%
Bybit0.00020.00055+0.0081%-0.0015%
MEXC0.00000.0002+0.0100%-0.0022%
OKX0.00020.0005+0.0000%+0.0000%

Why exchange exports fail as direct tax reports

Exchange exports export raw operational logs designed for internal balance reconciliation. They present three structural barriers when calculating crypto tax cost basis:

  1. Cash flows are fragmented across separate CSV files. Executions, realized funding payments, and account adjustments land in different data exports.
  2. Internal transfers between spot, cross-margin, and isolated-margin accounts appear as withdrawals and deposits, which generic tax software interprets as taxable disposals or income.
  3. Liquidations record trade losses but often hide liquidation engine penalty fees inside internal account deductions, misstating the final cost basis.

On MEXC, where futures maker fees are 0.0 and taker fees are 0.0002, trade executions carry lower entry friction, but negative ETH funding at -0.0022% generates cash distributions to long positions every 8 hours. If these distribution events are omitted from tax software imports, taxable income received in margin collateral goes unreported.

What to do instead

Download full unified transaction logs rather than trade execution history alone to ensure funding settlements and fee deductions are captured in your cost basis calculations.

Accounting for liquidations and collateral disposal

When a position is liquidated, the exchange force-closes the contract at the bankruptcy price or mark price. The loss consumed from the collateral wallet terminates the position.

If a trader opens a 10 ETH position on OKX at 3,000 USDT with a 0.0005 taker fee, the position value is 30,000 USDT and the entry fee is 15 USDT. A liquidation event wiping out a 1,500 USDT collateral deposit records a total loss of margin on the trade execution tab. However, if that 1,500 USDT was initially acquired in a spot market at a cost basis of 1,200 USD, disposing of that collateral during liquidation triggers a capital gain of 300 USD on the stablecoin alongside the 1,500 USDT derivative loss.

An exchange export only records the removal of 1,500 USDT from the account. It lacks visibility into the original acquisition cost of the collateral asset, leaving the true capital loss or gain underreported.

How do funding payments affect crypto tax cost basis?

Funding payments are recorded as separate cash flow events outside the trade execution contract price. Depending on jurisdiction, they are treated either as immediate ordinary income/expense or as ongoing cost basis adjustments to the position margin.

Why does exchange realized PnL differ from tax report gains?

Exchange displays subtract trade fees from gross price differences but exclude collateral acquisition costs and historical funding cash flows. Tax tracking requires calculating gains against the fiat value of collateral when acquired.

Are perpetual trading fees tax deductible?

Taker and maker fees paid to open or close futures positions increase the cost basis or reduce the gross proceeds of a trade. This reduces overall capital gains liability in most jurisdictions.

Read next

Perpetual Futures Funding Rates Vary by Up to 0.0123 PercentPerpetual futures tether contract prices to spot without expiration dates using peer-to-peer…Insolvency Filings Convert Exchange Crypto Claims into Fixed Dollar DebtBankruptcy filings from 2014 to 2022 show exchange collapses legally convert user token…Exchange Liquidation Feeds Reveal Friction Costs and FailuresPublic market data shows cluster liquidations, fee drag, and survivorship bias limit long-term…