All Collections
Platform Guides
Handling LP transactions
Handling LP transactions

A guide about how to handle the transactions when providing liquidity

Layla Huang avatar
Written by Layla Huang
Updated over a week ago

CryptoTaxCalculator supports Defi LP transactions. Usually, we can auto-categorize these transactions when sufficient information is provided on-chain. Sometimes, when the transactions are not auto-categorized or are manually imported, you can follow the below steps to categorize the transactions.

The LP-related categories

  • You have received tokens for adding coins into a liquidity pool.

  • You have returned tokens for removing coins from a liquidity pool.

  • You have added these coins to a liquidity pool

  • You have removed these coins from a liquidity pool.

  • You deposited these coins into a staking pool. This acts similar to a withdrawal.

  • You withdrew these coins from a staking pool. This acts similar to a deposit. Must not exceed the quantity of the total staking deposit.

  • You earned interest from staking.

Read more:

How an LP transaction flow might look like

Note: Keep in mind that this is the general guidance on using CryptoTaxCalculator to sort out your tax. Always speak to your accountant or local tax professional for your specific tax situation.

Let’s say you participated in an A and B token liquidity pool to earn the yields. The potential flow would look like the below.

1. Buy

You should have the 'buy' transactions for A and B tokens to ensure they have a cost base.

Note: If you don't have the purchase prices for the assets, you will see a 'Missing Purchase History' warning pop up when you provide the liquidity. This will cause incorrect reports.

2. Add liquidity and Receive LP token

You add liquidity to the pool and receive LP tokens. 'Add liquidity' and 'Receive LP token' usually happen in the same transaction (with the same Tx ID). They look like the below image:

When they are not auto-categorized, they might be shown as:

  • Outgoing: A token

  • Outgoing: B token

  • Incoming: A-B-LP token,

where you can categorize them as

  • Add liquidity: A token

  • Add liquidity: B token

  • Receive LP token: A-B-LP token.

If the 'received LP token' value is missing, you can enter the combination of the liquidity values.

3. Staking deposit or Trade LP token for the receipt token

This step differs depending on how the token contracts are designed. We discuss a few types below. You can filter the 'A-B-LP token' you received from the previous step on the Transactions page to find the token.

Type a - Some LP flow doesn't have this step

No further step to farm yields after you received the A-B-LP token. In this case, you don't have to worry about this step. You can skip it and jump to the next one.

Type b - Staking deposit

You stake the A-B-LP token to generate yields. In this case, you should have an outgoing of the A-B-LP token. It should look similar to th below image.

When it is not auto-categorized, it might be shown as:

  • Outgoing: A-B-LP token,

where you can categorize it as

  • Staking deposit: A-B-LP token.

Type c - Trade for another token

You deposit your A-B-LP token and receive another token in return. It usually happens in the same transaction (with the same Tx ID). The usage of this new token differs, we do not discuss this further here. The transaction looks similar to the below image.

When it is not auto-categorized, it might be shown as:

  • Outgoing: A-B-LP token

  • Incoming: new token,

where you can categorize them as

  • Sell: A-B-LP token

  • Buy: new token.

You claim yields from staking LP tokens. This step differs depending on how the token contracts are designed. If you have claimed the yields, you can categorize them as a 'Staking reward'.

You withdraw/unstake your A-B-LP token. You should only need to do this if you have gone through Step 3. The transaction looks similar to the below image.

When it is not auto-categorized, it might be shown as:

  • Incoming: A-B-LP token,

where you can categorize it as

  • Staking withdrawal: A-B-LP token.

6. Send LP token and Remove liquidity

This is opposite to Step 2. You send LP tokens back to the pool to remove liquidity from the pool. 'Send LP token' and 'Remove liquidity' usually happen in the same transaction (with the same Tx ID). They look similar to the below image:

When they are not auto-categorized, they might be shown as:

  • Outgoing: A-B-LP token

  • Incoming: A token

  • Incoming: B token,

where you can categorize them as

  • Send LP token: A-B-LP token.

  • Remove liquidity: A token

  • Remove liquidity: B token.

If the 'send LP token' value is missing, you can enter the combination of the liquidity values. For example,

  • Remove liquidity: A token at the time is worth $100

  • Remove liquidity: B token at the time is worth $50

and

  • Send LP token: A-B-LP token price is missing. You can enter the price as $150.

Did this answer your question?