| Schedule of Fair Value, Assets and Liabilities Measured on Recurring Basis |
The Company’s assets and liabilities that are measured at fair value on a recurring basis were classified as follows (in thousands): | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | December 31, 2023 | | December 31, 2022 | | Level 1 | | Level 2 | | Level 3 | | Level 1 | | Level 2 | | Level 3 | | Cash equivalents: | | | | | | | | | | | | | Money market funds | $ | 960,705 | | | $ | — | | | $ | — | | | $ | 1,230,924 | | | $ | — | | | $ | — | | | U.S. agency securities | — | | | — | | | — | | | — | | | 7,923 | | | — | | | U.S. government securities | 29,788 | | | — | | | — | | | — | | | — | | | — | | | Commercial paper | — | | | 4,993 | | | — | | | — | | | 25,080 | | | — | | | Corporate bonds | — | | | 699 | | | — | | | — | | | — | | | — | | | Restricted Cash: | | | | | | | | | | | | | Money market funds | 291,374 | | | — | | | — | | | — | | | — | | | — | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Customer funds: | | | | | | | | | | | | | Money market funds | 4,042 | | | — | | | — | | | 851,296 | | | — | | | — | | | Reverse repurchase agreement | 1,028,754 | | | — | | | — | | | 580,045 | | | — | | | — | | | | | | | | | | | | | | | | | | | | | | | | | | | Short-term debt securities: | | | | | | | | | | | | | U.S. agency securities | — | | | 67,515 | | | — | | | — | | | 94,441 | | | — | | | Corporate bonds | — | | | 215,227 | | | — | | | — | | | 360,637 | | | — | | | Commercial paper | — | | | 15,159 | | | — | | | — | | | 31,503 | | | — | | | Municipal securities | — | | | 9,165 | | | — | | | — | | | 9,693 | | | — | | | Certificates of deposit | — | | | 3,856 | | | — | | | — | | | 6,400 | | | — | | | U.S. government securities | 539,998 | | | — | | | — | | | 571,637 | | | | | — | | | Foreign government securities | — | | | 981 | | | — | | | — | | | 7,540 | | | — | | | Long-term debt securities: | | | | | | | | | | | | | U.S. agency securities | — | | | — | | | — | | | — | | | 70,315 | | | — | | | Corporate bonds | — | | | 95,328 | | | — | | | — | | | 236,726 | | | — | | | Municipal securities | — | | | 2,412 | | | — | | | — | | | 9,754 | | | — | | | U.S. government securities | 153,387 | | | — | | | — | | | 255,692 | | | — | | | — | | | Foreign government securities | — | | | — | | | — | | | — | | | 942 | | | — | | | Other: | | | | | | | | | | | | | Investment in marketable equity security | 8,267 | | | — | | | — | | | 11,092 | | | — | | | — | | Bitcoin investment (i) | 339,898 | | | — | | | — | | | 102,303 | | | — | | | — | | | Safeguarding asset related to bitcoin held for other parties | — | | | 1,038,585 | | | — | | | — | | | 428,243 | | | — | | | Safeguarding obligation liability related to bitcoin held for other parties | — | | | (1,038,585) | | | — | | | — | | | (428,243) | | | — | | | Total assets (liabilities) measured at fair value | $ | 3,356,213 | | | $ | 415,335 | | | $ | — | | | $ | 3,602,989 | | | $ | 860,954 | | | $ | — | |
(i) The Company holds an immaterial amount of bitcoin for operating purposes and, given the bitcoin is held for a relatively short period of time, typically being purchased and sold within a day, the fair value approximates carrying value. Refer to Note 1, Description of Business and Summary of Significant Accounting Policies and Note 14, Bitcoin for more details. The estimated fair value and carrying value of the convertible and senior notes were as follows (in thousands): | | | | | | | | | | | | | | | | | | | | | | | | | December 31, 2023 | | December 31, 2022 | | Carrying Value | | Fair Value (Level 2) | | Carrying Value | | Fair Value (Level 2) | | 2031 Senior Notes | $ | 989,567 | | | $ | 879,913 | | | $ | 988,171 | | | $ | 782,857 | | | 2026 Senior Notes | 993,208 | | | 938,105 | | | 990,414 | | | 885,876 | | | 2027 Convertible Notes | 569,865 | | | 468,475 | | | 568,535 | | | 433,082 | | | 2026 Convertible Notes | 571,014 | | | 501,910 | | | 569,315 | | | 464,066 | | | 2025 Convertible Notes | 996,437 | | | 979,776 | | | 993,394 | | | 943,188 | | | 2023 Convertible Notes | — | | | — | | | 460,356 | | | 480,925 | | | Total | $ | 4,120,091 | | | $ | 3,768,179 | | | $ | 4,570,185 | | | $ | 3,989,994 | |
The estimated fair value and carrying value of loans held for sale and loans held for investment were as follows (in thousands): | | | | | | | | | | | | | | | | | | | | | | | | | | | | | December 31, 2023 | | December 31, 2022 | | | | Carrying Value | | Fair Value (Level 3) | | Carrying Value | | Fair Value (Level 3) | | | | | | Loans held for sale | $ | 775,424 | | | $ | 783,464 | | | $ | 474,036 | | | $ | 491,807 | | | | | | | Loans held for investment | 247,631 | | | 258,684 | | | 123,959 | | | 126,122 | | | | | | | Total | $ | 1,023,055 | | | $ | 1,042,148 | | | $ | 597,995 | | | $ | 617,929 | | | | | |
|