v3.22.0.1
Income Taxes (Tables)
12 Months Ended
Dec. 31, 2021
Income Tax Disclosure [Abstract]  
Schedule of Income before Income Tax, Domestic and Foreign
The domestic and foreign components of income (loss) before income taxes were as follows (in thousands):

 Year Ended December 31,
 201920202021
Domestic$(153,154)$(4,509,519)$(390,652)
Foreign(258,549)(172,419)90,445 
Loss before income taxes$(411,703)$(4,681,938)$(300,207)
Schedule of Components of Income Tax Expense (Benefit)
The components of the provision for (benefit from) income taxes were as follows (in thousands):

 Year Ended December 31,
 201920202021
Current
Federal$223,673 $(91,094)$4,704 
State5,930 (976)2,238 
Foreign38,660 14,449 33,950 
Total current provision for (benefit from) income taxes268,263 (77,621)40,892 
Deferred
Federal(1,563)47 98 
State(248)55 — 
Foreign(3,816)(19,703)10,837 
Total deferred benefit for income taxes(5,627)(19,601)10,935 
Total provision for (benefit from) income taxes$262,636 $(97,222)$51,827 
Schedule of Effective Income Tax Rate Reconciliation
The following is a reconciliation of the statutory federal income tax rate to the Company’s effective tax rate:

 Year Ended December 31,
 201920202021
Expected income tax expense at federal statutory rate21.0 %21.0 %21.0 %
State taxes, net of federal benefits(0.2)— (0.7)
Foreign tax rate differential(19.5)(0.5)(5.1)
Stock-based compensation(0.9)7.1 282.4 
Acquisition related expenses(0.3)— — 
Deferred tax impacts of restructuring— 6.5 (9.7)
Other statutorily non-deductible expenses(2.6)(0.3)(1.1)
Non-deductible warrant revaluations— (3.9)(20.4)
Research and development credits(0.9)4.3 51.0 
Uncertain tax positions—prior year positions(53.0)(0.1)(3.1)
Uncertain tax positions—current year positions(4.2)(0.2)(1.0)
Other0.2 0.3 1.3 
Change in valuation allowance(3.4)(32.1)(331.9)
Effective tax rate(63.8)%2.1 %(17.3)%
Schedule of Deferred Tax Assets and Liabilities
The components of deferred tax assets and liabilities consisted of the following (in thousands):

 As of December 31,
 20202021
Deferred tax assets:
Net operating loss carryforwards$1,078,070 $1,987,606 
Tax credit carryforwards333,991 568,468 
Accruals and reserves70,130 105,530 
Non-income tax accruals71,706 64,757 
Stock-based compensation211,216 156,726 
Operating lease liabilities94,840 86,690 
Intangible assets274,396 210,057 
Other53,477 155,020 
Gross deferred tax assets2,187,826 3,334,854 
Valuation allowance(2,053,069)(3,263,823)
Total deferred tax assets134,757 71,031 
Deferred tax liabilities:
Property and equipment basis differences(33,503)(7,834)
Operating lease assets(72,659)(48,628)
Other(3,091)— 
Total deferred tax liabilities(109,253)(56,462)
Total net deferred tax assets$25,504 $14,569 
Schedule of Unrecognized Tax Benefits Roll Forward
A reconciliation of the beginning and ending amount of the Company’s total gross unrecognized tax benefits was as follows (in thousands):

 Year Ended December 31,
 201920202021
Balance at beginning of period$69,837 $336,726 $507,865 
Gross increases related to prior year tax positions237,972 2,223 13,568 
Gross decreases related to prior year tax positions(5,029)(5,970)(1,772)
Gross increases related to current year tax positions36,502 196,492 84,990 
Reductions due to settlements with taxing authorities(2,296)(21,240)(1,313)
Reduction due to lapse in statute of limitations(260)(366)(6,776)
Balance at end of period$336,726 $507,865 $596,562