A token swap is in general not considered a taxable event since you have practically not sold the coins. Instead, the token has simply been swapped/migrated to another blockchain or contract address, or the ticker symbol and/or total supply have changed.
The token swap ratio is most commonly 1:1, which means that if you owned 100 tokens prior to the swap, you will own 100 tokens also after the swap. However, some projects have done token swaps with a ratio different than 1:1 and it's important that this is tracked correctly and that the cost basis is carried over without realizing any capital gains. Here are a few examples of prior token swaps:
EOS (June 2018, 1:1 ratio)
VeChain - VEN → VET (July 2018, 1:100 ratio)
Elrond - ERD → EGLD (November 2020, 1000:1 ratio)
Let's look at Elrond as an example:
You bought 25,000 ERD tokens and paid 0.01 BTC on July 15th, 2020. The tokens were automatically swapped on Binance on September 10th, 2020. After the swap, you have now 25 EGLD tokens which take on the original cost basis.
To track this correctly, all you need to do is add a manual Trade (Swap) transaction so that Coinpanda will track the cost basis correctly. You can do this by first adding the manual transaction, and then change the transaction tag to Swap.
This is how it looks like after the transaction has been tagged as a Swap:
The original cost basis will now be tracked correctly for the EGLD tokens received after the swap and no gains will be realized.