Moving funds from personal wallet to yield farming Dapps

I have a couple questions relating to “yield farming” Dapps and taxation.

I’ve been holding my crypto for over a year and have recently started swing trading a small portion of it, never more than 1/3. I’d like to use a LIFO method for my capital gains calculation so that when I eventually sell all my crypto, 2/3 of it will be taxed as long term gains.

I’d like to move some coins into a defi dapp like Aave to earn interest while holding. If I move 1/3 of my coins onto that platform, will capital gains calculations consider that an “Out” event in the logic of LIFO? That is, will that deposit be seen as the 1/3 I used for trading or can it be counted as some of my long term hold coins? I’d like to be able to deposit 1/3 from my long term held coins into Aave to earn interest while continuing to trade with my 1/3 that now register as short term holds.

I’m also curious if anyone knows how yield farming is considered by US tax law. When you send your funds to a Dapp smart contract like with Aave, it’s probably not considered you moving funds between two of your own wallets, which is untaxed. So is it considered a sale? or a gift? By depositing into a defi app is that a taxable even or are you merely taxed on the interest you make?

I should mention for anyone not familiar with yield farming: when you deposit funds into a Defi platform like Aave, technically your deposit goes into one large liquidity pool managed by smart contracts and is lent out to one or many borrowers who post different amounts of collateral depending on the nature of their loan. I imagine that this is a tax grey area due to that the fact that your funds don’t just sit in some wallet and then you pull them out with some added interest— they actually change hands and what you withdraw is not actually the same coins you deposited.

Curious if anyone has crossed this bridge yet.

Atm Koinly would treat the deposits/withdrawals to/from Aave as regular taxable transactions. However if you dont want to declare taxes on these then you can just delete them and add a single transaction with the combined interest you received from Aave.