If you think that cost basis shown on one of your disposals looks wrong, it's good to check how Koinly calculated it. This article explains what steps to take to accurately assess if cost basis calculated by Koinly is correct or not.
๐จ If your imported data is inaccurate, your calculations will be as well.
โ
There's usually no point in analyzing specific transactions if you have outstanding warning/issues in your account. For a complete step-by-step flow to fix your imported data, see:
How should my cost basis be calculated?
In order to check if cost basis is correct, you need to know how it should be calculated - this, in turn, depends on your country's regulations.
๐ Review our country-specific tax guides
Which cost basis method should be used?
Are there any special rules that need to be applied (e.g. wash sales)
โ
๐ข Review general rules for how to calculate crypto taxes
โ๐งโ๐ผ Consult with your tax advisor or reach out to your tax office if unsure
How is Koinly calculating my cost basis?
Once you know how cost basis should be calculated, check if your Settings in Koinly are aligned with this. If they aren't - consider changing them. The most important settings to look at are:
๐งฎ Cost basis method
A set of rules that decide which lot is selected for a disposal
๐ Cost basis calculation method
โ
๐ Gains on crypto-crypto
When OFF, gains (or losses) accumulate in assets traded
๐ง Gains on LPing
When OFF, exiting LP may redistribute cost basis
๐ซง Cost tracking
Cost tracking defines the reach (scope) of the cost basis method selected
โ๏ธ All settings affect your calculations
Check our articles in the Portfolio settings section for a detailed description of what each setting/toggle does. The list above contains settings that are the most common reason for debating Koinly's calculations, but all settings affect the cost basis
Troubleshooting a specific transaction
Once you know by which rules cost basis is calculated, you can review your transactions to confirm what might be causing issues. This usually requires following the "trail" of transactions (trades, transfers) that lead to the disposal you want to analyze.
In order to understand which transactions affected the calculation of cost basis:
๐ Find the transaction on the "Transactions" page
โ๐ฌ Review the "Cost Analysis" and "Ledger" tab
Check how cost basis was derived on the "Cost Analysis" tab
Confirm order of transactions on the "Ledger" tab
โ
๐๏ธ Review previous transactions with this token
Find transactions that preceded the disposal
โ
๐ช๏ธ Filter by token to view transactions across all wallets
If "Wallet-based cost tracking" is OFF, transactions on other wallets can affect each other
There is no "step-by-step" approach you can use to analyze the transactions - there are too many variables that might be affecting the calculations. Check the examples below to get an idea about most common causes ๐
Common scenarios
0๏ธโฃ Cost basis is zero/low
Trace previous transactions with this token. There can be multiple reasons but most common are:
Missing transactions (usually deposits/transfers)
"Missing purchase history" warning (possibly on another wallet)
Swap
tag used on one of the acquisitions (assets disposed had $0 cost basis)Implausible transfers/trades merged (chronology is obscured by merging)
๐ต Example: Zero cost basis on a disposal
๐ต Example: Zero cost basis on a disposal
Disposal of ETH shows $0 cost basis
But there is no "Missing purchase history" warning and the Ledger is not negative
๐ข Solution: review previous transactions
Asset has $0 cost basis because it was transferred from a wallet where it was never acquired ("Missing purchase history" warning on the transfer)
๐ต Stablecoins with non-pegged cost basis
There are multiple reasons for stablecoins to have a non-pegged cost basis - check Transactions in stablecoins show gains. Here just one example:
๐ต Example: USDT has cost basis of $2 per USDT
๐ต Example: USDT has cost basis of $2 per USDT
A disposal of USDT creates a large loss
You noticed that cost basis of USDC is $2 per USDC, while this token should be pegged to $1 USDT (as it turns out - not always!)
"Realize gains on crypto-to-crypto" was OFF on this account
๐ข Solution: review previous transactions
No loss was calculated when selling LINK for USDT
The loss (in the form of a high cost basis) USDT "inherited" from LINK was only realized when USDT was sold for fiat
There is nothing wrong in this calculation - Koinly transferred the original cost basis of LINK to USDT, as per settings selected
๐ Missing acquisition on the date
The token was acquired on this date - but it may have had a different symbol! Later, it was traded for the final asset but since Swap
was used, the original date of acquisition (and cost basis) was retained.
Checking the exact timestamp (hour/minute) on the "Cost Analysis" tab helps in determining which exact token was bought on that day (and later swapped)
Filtering by
Swap
tag often helps as well
๐ต Example: No acquisition of ARB on the date
๐ต Example: No acquisition of ARB on the date
You check the "Cost Analysis" tab to see when the lot was acquired
You go to this date, but there are no transactions with this token
๐ข Solution: review transactions tagged as Swap
ARB wasn't acquired on this date, but ETH was
Later, ETH was sold for ARB and the trade was tagged as
Swap
ARB inherited the original cost basis and date of acquisition of ETH
There is nothing to fix here, apart from deciding if
Swap
tag was used correctly for a trade like this (for most countries - it wasn't).
๐ Zero cost but trade is there
This might happen when implausible transfers (or trades) are merged together. Splitting them will reveal the true order of transactions imported and make the issue more obvious. This issue is more common if "Wallet-based cost tracking" is ON.
๐ต Example: SOL shows "missing cost" but purchase is there
๐ต Example: SOL shows "missing cost" but purchase is there
There's a "Missing purchase history" warning on sale of 15 SOL
But acquisition of 15 SOL is right below this warning
๐ข Solution: review ledger entries
The purchase of 15 SOL shows before the sale of 15 SOL only because it's a merged trade (multiple trades merged together)
When checking the ledger entries, you can see that part of this trade was executed after the sale of 15 SOL
If you split this exchange, it's more clear where the issue comes from, as the acquisition of 12 SOL would show after the sale
In this example, it's not certain what the solution is - maybe some trade is missing, maybe the sale of 15 SOL has the wrong timestamp and should have happened later - it would need to be confirmed with the data on the exchange
โ๏ธ Exiting liquidity pool redistributes cost basis
When "Realize gains on liquidity transactions" is OFF, Liquidity In and Liquidity Out act as if Swap
tag was applied on those trades, so the assets received are accumulating the gain/loss (basically - impermanent loss) when you exit the liquidity pool. Some cost basis methods may affect this even more (especially ACB).
๐ต Example: Accumulated loss in AAVE-USDT pool
๐ต Example: Accumulated loss in AAVE-USDT pool
"Realize gains on liquidity transactions" is OFF
Entered LP in April 2022 with 2346.60 USDT and 9.96 AAVE
Left LP in January 2023 with 1131.60 USDT and 20.57 AAVE
When trading USDT for USDC, USDT has almost double cost basis
๐ข Solution: Review liquidity transactions
Impermanent loss was accumulated in USDT when exiting the liquidity pool
This showed up only when a taxable event happened - here, a trade of USDT for USDC
๐งผ Loss is not calculated at all
This is most commonly reported by users from United Kingdom, Canada or Ireland - countries that have special anti-wash sale rules.
๐ต Example: Loss on selling BONK is not calculated
๐ต Example: Loss on selling BONK is not calculated
Cost basis method used is "Adjusted Cost Basis/Canada"
BONK was bought in March 2024
BONK was sold on April 4th to realize losses
Even though cost basis is 5000.00 CAD and value only 3200.00 CAD, no loss is calculated by Koinly
BONK was bought on April 23rd
๐ข Solution: Review "Cost Analysis"
Loss is not calculated because it was retained
Since the asset was repurchased, the loss, instead of realizing, was added to the cost basis of the acquired lot
This loss isn't completely nullified - it's postponed in time and may be realized in a later disposal
Wash sale is indicated on the "Cost Analysis" tab