To calculate cost basis we look at the fair market value of the amount being paid for each transaction converted to the selected Base currency.
Example: if you pay $4,000 USD for 1 BTC, then the cost basis is $4,000. If you are paying 2 BTC for 25 ETH, then your cost basis is the fair market value of 2 BTC at the time when the transaction happened.
For fiat-to-crypto transactions, it is quite easy because we can always use the fiat value directly for the cost basis. For crypto-to-crypto transactions, we will look up the fair market value of the coin sold.