This is often correct and expected. As cryptocurrencies are not a legal tender, it is assumed that you first sell the asset, and then use the acquired fiat to cover the cost in question. As such, this is a taxable disposal.
Let's say you bought 100 EOS for $100 and a few days later the value of your EOS has doubled to $200. Now your exchange charges you a fee of 10 EOS. These transactions can be seen in the above screenshot.
Even though this transaction is a cost Koinly will still show you a gain of $10 on it since it's technically a disposal too. Think of it like this; you have incurred a cost of $20 and are paying it using crypto that you bought for $10 - a profitable deal!
Basically, a transaction labeled as a Cost is no different than a sale of crypto. The "Cost" tag just tells Koinly to show this transaction in your "Costs" report:
Depending on your tax laws you may be able to deduct this cost from your final gains. For the above example this would mean that even though you make a $10 profit, you will be deducting $20 as a cost later on, so the gain cancels out.
🟡 Note Koinly does not make any cost deductions automatically, it simply shows you the total costs so you can make a deduction on your tax forms - if allowed by your tax authorities.