Calculating the cost basis of cryptocurrency for tax purposes involves considering purchase prices, transaction fees and events such as hard forks or staking rewards.
Source: https://cointelegraph.com/news/determine-crypto-cost-basis-for-accurate-tax-filings