TL;DR: Vault transactions (e.g. depositing collateral into an AAVE vault) usually involve several steps: depositing funds, converting the deposited coin into a receipt/collateral token, sending collateral, borrowing a loan, and repaying it. Use Swap when a coin is converted 1:1 into a receipt token (like AWETH or aPolUSDC) that represents your deposit. This keeps the transaction tax-free and carries over the cost basis and holding period. Use Send Collateral only when the borrowed asset is different from the collateral asset. Both transaction types are non-taxable, but Swap avoids the need to manually adjust the value of the receipt token.
In this article, we're going to show you how to properly enter vault transactions in CoinTracking.
There is more than just one type of vault, but we used one specific example, since it is very prominent.
Here's a guide on how to enter vault transactions, using an AAVE vault as an example:

- Deposit of funds (2.00009484 ETH) into your wallet

- Bridging over ETH to AWETH into the AAVE vault
There are two different options to bridge ETH to AWETH
Please note: The decision on what option to use should be made in consultation with a tax advisor.
Important: Some types of vaults don't convert their coins into another coin when locking them.
a) Entering a Swap transaction to convert ETH to AWETH
To avoid capital gains or losses, as well as a restart of holding periods, we recommend using the transaction type "Swap". This will classify the operation as tax-free and transfer the cost base as well as the holding period to the new coin.

b) Entering a Trade transaction to convert ETH to AWETH
If it's a taxable transaction, the transaction type "Trade" should be used. By using the transaction type "Trade" the holding periods will be restarted. Furthermore, your old coin gets removed from your purchase pool and the tax relevant value difference between its purchase and sale values gets calculated. The new coin begins its holding period on the day of the trade and adopts the asset value from that day.

- Send Collateral of 2 AWETH to AAVE vault

- Borrowing Fee of 0.00002626 ETH

- Receive Loan of 12570 USDT from AAVE vault
Important: For some types of vaults, you can receive more than one loan at a time.

- Trade 12570 USDT for AWETH

- Send Collateral of 4.00004343 AWETH to AAVE vault

Should I use Swap or Send Collateral for my receipt token?
When you supply an asset to a lending protocol (e.g. Aave) and receive a receipt/aToken in return (such as AWETH or aPolUSDC) that represents your supplied collateral, this should be entered as a Swap, not as Send Collateral. The receipt token is essentially a 1:1 representation of the coin you deposited, so a Swap correctly transfers the cost basis and holding period without triggering a taxable event.
Send Collateral is intended for situations where the collateral you provide is a different asset from the loan you borrow (as shown in steps 3 and 7 above, where AWETH collateral is sent to secure a USDT loan).
Both Swap and Send Collateral are treated as non-taxable transaction types. However, using Swap for receipt tokens is preferable, since it avoids having to manually adjust the value of the receipt token afterwards.
This logic also applies to Aave V3 Supply and Withdraw operations, which mint or burn aTokens representing your deposited collateral. These should likewise be entered as Swap transactions.
Please note: If you want to learn more about how to enter loans and their repayments in general, please see the following article: Loans and their repayments