Even if you've made a technical loss through impermanent loss, if you have a gain when trading tokens in and out of liquidity pools, you may still need to pay Capital Gains Tax.