Reply to Al1001:
Thanks for attaching the screen shot. I think I see where you are perhaps getting confused. When Koinly shows the cost base of 52,505.73 under the USD S/C being traded it is not adding the fee cost to the cost base of the USD S/C. Rather it is combining the cost basis of the USD S/D and the cost base of the ETH fee that you also disposed of. (I think this causes confusion in a tx like this where there are 2 different coins being disposed of but only one coin is shown on Spend side.)
Note that there are 2 crypto disposals in your transaction (USD S/C and ETH) so you have to calculate the capital gain or loss on each tx separately.
If you look at the columns and rows in the cost analysis, you can see how Koinly is calculating a capital loss on the USD S/C as follows: 51,743.70 (value of DAI received) less 52,486.55 (USD S/C cost base) equals -742.85.
Separately, you can see how Koinly has calculated a small capital gain of 24.29 - 19.18 = +5.11 on the disposal of the ETH to pay the tx fee.
The net capital loss on the 2 crypto disposals is -742.85 + 5.11 = 737.74. This is what is carried through to your capital gains tax report.
The key point here is that the transaction fee that you paid in ETH is not an allowable charge to add to the cost base of the USD S/C being disposed of. However, it should be an allowable charge that can be added to the cost base of the DAI you acquired in the tx. I believe this is what Koinly has done in assigning a cost base of 52,046.16 to your DAI holding. I can’t show you this in the screen shot because you have other DAI that had a cost base before this tx.
BTW, the ETH fee will not show up in your Koinly expenses report as it is not a separate Spend transaction that can be labelled a Cost. It is not a deductible expense for income tax purposes in any event so it should not be tagged as a Cost or otherwise deducted from any income for income tax purposes.
I hope this is helpful.