Skip to main content

Settings > Cost basis migrations

Written by Carl

Koinly offers a powerful migration feature, which can be used to migrate between cost-basis methods, as well as cost-tracking methods. The feature can be found under the 'Cost basis' section in your settings.

Why use migrations?

Migrations allow you to apply different tax settings to different time periods. This can be useful if you want to change your settings without affecting your previous years tax reports. If you were to simply change your setting without using a migration, then the new setting would apply to your entire transaction history.

If you're from the US and looking for more information on IRS's requirement to migrate to wallet-based tracking, check also:


Cost tracking migration

Note that Koinly only supports migrating from the "universal" cost-tracking method to wallet-based tracking. It's not currently possible to migrate from wallet-based tracking to universal tracking.

If you are a US-based taxpayer and want to learn more about the 2025 IRS requirements for cost-tracking, see this article.

To set up a cost-tracking migration, follow these steps:

  1. Go to SettingsCost basis and switch to "Migrations" tab

  2. Click "+ Add migration"

  3. Select the Date and Migration type

  4. Click Save to confirm the migration

  5. To activate the migration, enable wallet-based cost tracking

Once the migration is activated:

  • Transactions prior to the migration date use universal tracking

  • Transactions on and after the migration date use wallet tracking

  • All unspent lots on the migration date were allocated to wallets with balances


Lot allocation method

Using the Lowest Cost → Biggest Wallet allocation method, Koinly assigns your lowest-cost tax lots to the wallets with the highest balance as of the migration date. This method assumes that wallets with highest balances (most crypto held) are "vault" wallets for long-term holding, hence why we assign lots with lowest cost basis there.

This ensures that cost lots are distributed efficiently while maintaining consistency across your portfolio.

🚨 Negative balances will affect lot allocation

Negative balances ("missing purchase history" errors) create $0-cost lots. Those lots will be allocated to your wallets during the migration, which may cause unexpected results.

We strongly recommend that you fix any negative balances in your account, as you may otherwise be over-reporting your capital gains.

Lot allocation report

​Once the migration is activated, you can download a report showing which lots were allocated to which wallets from the "Migrations" tab:


Cost basis method migration

Cost-basis migrations can be added if you would like to apply different methods to different time periods.

☝️ You can only migrate between FIFO, LIFO, HIFO and OpHIFO

To set up a cost-basis method migration, follow these steps:

  1. Go to SettingsCost basis

  2. On the "Cost basis" tab, click "+ Add migration"​

  3. Select the Date and Migration type

    • When creating the migration, you should select the previous cost-basis method that you would like to apply to transactions before the migration date

  4. Select Save to confirm the migration

  5. After saving the migration, you can set a new current cost-basis method on the "Cost basis" tab

Once the cost basis migration is created:

  • All disposals taking place on or after the last migration date will use the method that you selected in your settings

  • Older disposals will use the method set as "From" in the migration

Adding multiple cost basis migrations

It's possible to add multiple migrations (up to three), ie. have a different cost basis calculation method for different years. For example, if you want to:

  • Use FIFO for 2025

  • Use HIFO in 2024 and 2023

  • Use LIFO for 2022 and before

You need to:

  • Create a migration "From LIFO" on Jan 1st 2023

  • Create a migration "From HIFO" on Jan 1st 2025

  • Set FIFO as your current cost basis method

"Migrations" tab would then look as below:

You can create up to 3 cost basis migrations in your account. This means that you can have up to 4 different cost basis method used across years (three from which you migrated + the current one).

Did this answer your question?