Cost basis is calculated based on the fair market value of the asset being disposed in any transaction.
For example, if you paid $1,000 USD for 1 ETH, your cost basis in that 1 ETH is the fair market value of $1,000 USD at the time of the disposal ($1,000).
For a crypto-crypto trade, the same applies.
If you traded 1 BTC for 10 ETH on March 12 2020, the system will perform a lookup as to the fair market value of 1 BTC at the time of this trade. The fair market value of the disposed asset (in this case BTC) becomes the cost basis in your 10 ETH moving forward.
FIFO, LIFO, and HIFO
FIFO (first-in-first-out), LIFO (last-in-first-out), and HIFO (highest-in-first-out) are different accounting methods used to calculate cryptocurrency gains and losses. You can change which method you use within your Settings.
CoinLedger defaults new accounts to use HIFO, which minimizes capital gains.
To learn more about how these costing methods work, refer to our blog on FIFO, LIFO, and HIFO Methods Explained.