v3.22.2.2
Condensed Consolidated Statements of Cash Flows (unaudited) - USD ($)
$ in Thousands
9 Months Ended
Sep. 30, 2022
Sep. 30, 2021
Cash flows from operating activities:    
Net income (loss) $ 1,574,337 $ (406,535)
Adjustments to reconcile net income (loss) to cash provided by operating activities:    
Depreciation and amortization 68,052 107,475
Bad debt expense 32,647 16,959
Stock-based compensation expense 676,392 673,126
(Gain) loss on investments, net 4,232 (9,581)
Change in fair value of warrant liability 0 291,987
Amortization of debt discount and debt issuance costs 3,122 7,402
Noncash interest expense, net 8,199 7,471
Foreign exchange loss 83,380 7,345
Impairment of long-lived assets 88,850 112,545
Loss from extinguishment of debt 0 377,248
Other, net 11,043 6,361
Changes in operating assets and liabilities:    
Prepaids and other assets (184,985) (57,168)
Operating lease right-of-use assets 27,224 28,502
Accounts payable 39,219 18,034
Accrued expenses and other liabilities 261,056 299,461
Operating lease liabilities (44,084) (34,365)
Unearned fees 318,618 484,497
Net cash provided by operating activities 2,967,302 1,930,764
Cash flows from investing activities:    
Purchases of property and equipment (16,606) (20,864)
Purchases of marketable securities (3,015,006) (3,628,566)
Sales of marketable securities 709,463 1,233,696
Maturities of marketable securities 2,439,647 1,393,215
Other investing activities, net (2,227) 0
Net cash provided by (used in) investing activities 115,271 (1,022,519)
Cash flows from financing activities:    
Taxes paid related to net share settlement of equity awards (491,366) (154,633)
Proceeds from exercise of stock options 19,122 104,588
Proceeds from the issuance of common stock under employee stock purchase plan 20,330 25,464
Repurchases of common stock (1,000,000) 0
Principal repayment of long-term debt 0 (1,995,000)
Prepayment penalty on long-term debt 0 (212,883)
Proceeds from issuance of convertible senior notes, net of issuance costs 0 1,979,166
Purchases of capped calls related to convertible senior notes 0 (100,200)
Change in funds payable and amounts payable to customers 1,527,344 1,809,225
Net cash provided by financing activities 75,430 1,455,727
Effect of exchange rate changes on cash, cash equivalents, and restricted cash (625,910) (159,006)
Net increase in cash, cash equivalents, and restricted cash 2,532,093 2,204,966
Cash, cash equivalents, and restricted cash, beginning of period 9,727,289 7,668,252
Cash, cash equivalents, and restricted cash, end of period 12,259,382 9,873,218
Supplemental disclosures of cash flow information:    
Cash paid for income taxes, net of refunds 51,795 14,299
Cash paid for interest $ 7,624 $ 47,717