XML 19 R6.htm IDEA: XBRL DOCUMENT v3.22.4
Consolidated Statements of Cash Flows - USD ($)
$ in Thousands
12 Months Ended
Dec. 31, 2022
Dec. 31, 2021
Dec. 31, 2020
Operating Activities      
Net loss $ (321,143) $ (109,613) $ (18,527)
Adjustments to reconcile net loss to net cash (used in) provided by operating activities:      
Depreciation and amortization 64,907 46,906 14,564
Stock-based compensation 68,257 54,722 36,973
Amortization of debt discount and issuance costs 6,137 4,989 12,038
Non-cash lease expense 16,234 11,630 9,204
Impairment costs 1,136 0 2,063
Loss on conversions of convertible senior notes 0 0 4,634
Net loss (gain) on IRLCs, forward sales commitments, and loans held for sale 14,427 815 (1,921)
Change in fair value of mortgage servicing rights, net (801) 0 0
Gain on extinguishment of convertible senior notes (57,193) 0 0
Other 3,791 (4,227) (349)
Change in assets and liabilities:      
Accounts receivable, net 24,411 (7,149) (35,496)
Inventory 243,948 (309,063) 25,432
Prepaid expenses and other assets (5,904) (12,248) 2,333
Accounts payable (2,472) 3,059 2,086
Accrued and other liabilities, deferred tax liabilities, and payroll tax liabilities, noncurrent (46,454) 25,791 39,092
Lease liabilities (18,452) (13,268) (11,312)
Origination of mortgage servicing rights (3,140) 0 0
Proceeds from sale of mortgage servicing rights 1,662 0 0
Origination of loans held for sale (3,949,442) (986,982) (677,310)
Proceeds from sale of loans originated as held for sale 4,000,582 993,070 657,763
Net cash provided by (used in) operating activities 40,491 (301,568) 61,267
Investing activities      
Purchases of property and equipment (21,531) (27,492) (14,686)
Purchases of investments (182,466) (146,274) (198,172)
Sales of investments 17,545 98,687 7,887
Maturities of investments 99,455 106,773 147,852
Cash paid for acquisition, net of cash, cash equivalents, and restricted cash acquired (97,341) (608,000) 0
Net cash used in investing activities (184,338) (576,306) (57,119)
Financing activities      
Proceeds from the issuance of convertible preferred stock, net of issuance costs 0 0 39,801
Proceeds from the issuance of common stock, net of issuance costs 0 0 69,701
Proceeds from the issuance of common stock pursuant to employee equity plans 11,528 22,772 21,072
Tax payments related to net share settlements on restricted stock units (7,498) (27,066) (16,852)
Borrowings from warehouse credit facilities 3,938,265 942,993 662,278
Repayments to warehouse credit facilities (3,989,407) (948,979) (644,551)
Borrowings from secured revolving credit facility 565,334 624,828 89,619
Repayments to secured revolving credit facility (765,114) (448,996) (70,115)
Cash paid for secured revolving credit facility issuance costs (733) (527) (4)
Proceeds from issuance of convertible senior notes, net of issuance costs 0 561,529 647,486
Purchases of capped calls related to convertible senior notes 0 (62,647) 0
Conversions of convertible senior notes 0 (2,159) (108,061)
Principal payments under finance lease obligations (855) (796) (221)
Repurchases of convertible senior notes (83,614) 0 0
Other financing payables 0 (10,611) 4,074
Net cash (used in) provided by financing activities (332,094) 650,341 694,227
Effect of exchange rate changes on cash, cash equivalents, and restricted cash (94) (6) (3)
Net change in cash, cash equivalents, and restricted cash (476,035) (227,539) 698,372
Cash, cash equivalents, and restricted cash:      
Beginning of period 718,281 945,820 247,448
End of period 242,246 718,281 945,820
Supplemental disclosure of cash flow information      
Cash paid for interest 20,107 7,592 4,958
Non-cash transactions      
Stock-based compensation capitalized in property and equipment 3,660 4,059 2,348
Property and equipment additions in accounts payable and accrued liabilities 99 659 1,682
Leasehold improvements paid directly by lessor 118 1,334 37
Issuance of common stock for repurchases and conversions of convertible senior notes 0 0 98,397
Reconciliation of cash, cash equivalents, and restricted cash      
Cash and cash equivalents 239,840 591,003 925,276
Restricted cash 2,406 127,278 20,544
Total cash, cash equivalents, and restricted cash $ 242,246 $ 718,281 $ 945,820