To determine your basis in virtual currency received for services you’ve provided, your basis is the fair market value of the virtual currency, in U.S. dollars, at the time the virtual currency is received. This is consistent with the general tax principles applicable to property transactions.
The fair market value is determined by converting the virtual currency into U.S. dollars at the exchange rate, in a reasonable manner that is consistently applied, as of the date of receipt. This basis is used to calculate any future gain or loss when you sell or exchange the virtual currency.
For more detailed information on basis, you can refer to IRS Publication 551, Basis of Assets.
Sources:
Notice 2014-21
Rev. Rul. 2019-24