This article will explain how Coinpanda handles liquidity mining on AMM protocols such as Uniswap, PancakeSwap, and Sushiswap.

By adding liquidity to a pool, you need to deposit one or more tokens to the pool and in return, you will receive an LP token which will accrue value as long as you keep providing liquidity. From a tax perspective, this is considered equal to a trade since you are essentially exchanging one or more tokens for another token. Let's look at an example:

WBTC and BADGER liquidity on Uniswap v2

In this example, we have provided liquidity to the WBTC-BADGER pool on Uniswap v2. You can see the transaction on Etherscan here.

Summary of all token transfers involved in the transaction:

  • 0.723133... WBTC - added liquidity (token sent)

  • 762.715955... BADGER - added liquidity (token sent)

  • 0.000213719... UNI-V2 - LP token received (token received)

  • 0.04407131 ETH - fee paid

Coinpanda will automatically identify this as a liquidity transaction and create two separate Trade transactions with the tag Liquidity In:

Some important notes:

  • The LP token will be saved with a unique ticker symbol that is only associated with this particular pool. The ticker is in this example saved as WBTC/BADGER-U2 which is unique to the WBTC-BADGER pool on Uniswap v2.

  • The LP token amounts on the right side of the transactions are calculated proportionally to the liquidity value using market rates on the same date. If you have provided two-sided liquidity as 50-50 ratio, the LP token amount calculated by Coinpanda will be approximately 50-50 also but can vary due to different market rates considered. This will, however, not affect the total gain/loss in your tax report.

  • The LP tokens received will take on a cost basis equal to the Fair Market Value (FMV) of the tokens sold. This means that the total cost basis for 0.000213719... WBTC/BADGER-U2 received is calculated as the FMV of 0.723133... WBTC + 762.715955... BADGER sent.

  • The gas fee spent will be imported as a separate Send (Cost) transaction as seen in the example above. All costs will be summarized in the tax report so that you can report these as taxable deductions if you are allowed to do that in your country.

Removing liquidity is essentially the reverse operation of adding liquidity. Coinpanda will calculate gain/loss for the LP tokens disposed of using the FMV of the tokens removed from the liquidity pool. These transactions will be tagged as Trade (Liquidity Out) as opposed to Trade (Liquidity In) in the example above.

You can also click the transaction menu (three dots) → Liquidity pool details to see all the details about a specific liquidity transaction on Coinpanda:

Which AMM protocols are supported by Coinpanda?

Coinpanda has support for almost all protocols on all EVM compatible chains today. See this article for a list of the protocols currently supported.

What if Coinpanda does not recognize the liquidity transactions automatically?

Since we have developed a fairly complex algorithm that should detect liquidity transactions automatically, it might still happen that this is not detected correctly in some cases. It can also be that we have not yet added support for the protocol where you have provided liquidity on.

The best way to get help from our support staff is to create a post in our forum here. Make sure that you include the transaction hash in the post so that we can easily debug and update our API integration if necessary.

Did this answer your question?