How to treat IMX, imxB, and imxC transactions (more in comments)?

I have imported from my Polygon wallet and I’m trying to understand how to treat/fix transactions made with Impermax tokens/contracts. imxB is the “borrowable” token and imxC is the “collateral” token. I think that most of my problem is that Koinly is splitting transactions that should remain as one logical unit. Here I will give an example and two more in separate posts because I can only put one media link in per post.

Example 1
Here are three Koinly “transactions” that map to a single Polygon txn that is withdrawing USDC from an Impermax lending pool into my wallet:

As you can see, the USDC withdrawal is considered a “deposit” by Koinly. OK, that makes sense. The cost txn in MATIC is also present. Finally, we have an imxB send to the Impermax Borrowable address. As you can see in the transfers, this quantity of imxB gets burned. Now there’s a 4th transfer of imxB that I suppose goes to the protocol (maybe a fee?). This is not recorded anywhere by Koinly because it’s not to/from my wallet. My big question for this is whether I should just delete all imxB txns under a certain amount. I have no way to calculate their value, if they even have value. Or should I instead merge the imxB txns and ignore the rate/cost warnings?

Rest of post in comments (I can only post one media link here).

Here are the token transfers on Polygonscan:

Example 2
Here is a deposit into a lending pool. In this case, miMATIC is swapped for some amount of imxB (clearly not 1:1 but not far off) and some imxB is also paid to the protocol, though as in the other case, not recorded by Koinly:

And here are the transfers:

Is this considered a 1:1 swap for another token such that cost basis info is not required? Or is it still required for when the imxB is finally withdrawn and swapped again for some other token? Unsure.

Example 3
I think this is an example of exiting a collateralized borrowing pool where I had deposited IMX/WETH LP pairs. Essentially, you provide collateral and then borrow some multiple of the currency pair and re-lend it to earn fees and IMX rewards. The earned fees for other protocols (Quickswap or Uniswap here I think) are redeposited into the LP. But I don’t know how to value imxC or if it’s even necessary.

Here is the long list of token transfers for this one:

My biggest issue I think is determining how and whether to assign cost basis to txns involving imxB and imxC, how to calculate it, whether I need to add txns that Koinly may not have picked up, etc. I recognize that burns or txns between addresses other than my wallet(s) don’t need to be included.