v3.22.2.2
Fair Value Measurements and Financial Instruments
9 Months Ended
Sep. 30, 2022
Fair Value Disclosures [Abstract]  
Fair Value Measurements and Financial Instruments Fair Value Measurements and Financial Instruments
The following table summarizes the Company’s financial assets and liabilities measured at fair value on a recurring basis (in thousands):
December 31, 2021
Level 1Level 2Level 3Total
Assets
Cash and cash equivalents:
Money market funds$1,923,184 $— $— $1,923,184 
Certificates of deposit31,117 — — 31,117 
Commercial paper— 163,959 — 163,959 
Corporate debt securities— 41,439 — 41,439 
1,954,301 205,398 — 2,159,699 
Marketable securities:
Certificates of deposit364,234 — — 364,234 
Government bonds(1)
— 863 — 863 
Commercial paper— 993,004 — 993,004 
Corporate debt securities— 862,901 — 862,901 
Mortgage-backed and asset-backed securities— 34,036 — 34,036 
364,234 1,890,804 — 2,255,038 
Funds receivable and amounts held on behalf of customers:
Money market funds466,319 — — 466,319 
Prepaids and other current assets:
Foreign exchange derivative assets— 25,918 — 25,918 
Other assets, noncurrent:
Corporate debt securities— — 10,451 10,451 
Total assets at fair value$2,784,854 $2,122,120 $10,451 $4,917,425 
Liabilities
Accrued expenses and other current liabilities:
Foreign exchange derivative liabilities$— $10,280 $— $10,280 
Total liabilities at fair value$— $10,280 $— $10,280 

(1)Includes U.S. government and government agency debt securities
September 30, 2022
Level 1Level 2Level 3Total
Assets
Cash and cash equivalents:
Money market funds$2,699,936 $— $— $2,699,936 
Certificates of deposit6,925 — — 6,925 
Commercial paper— 277,582 — 277,582 
Corporate debt securities— 10,389 — 10,389 
2,706,861 287,971 — 2,994,832 
Marketable securities:
Certificates of deposit592,105 — — 592,105 
Government bonds(1)
— 19,480 — 19,480 
Commercial paper— 709,938 — 709,938 
Corporate debt securities— 745,235 — 745,235 
Mortgage-backed and asset-backed securities— 21,484 — 21,484 
592,105 1,496,137 — 2,088,242 
Funds receivable and amounts held on behalf of customers:
Money market funds496,778 — — 496,778 
Prepaids and other current assets:
Foreign exchange derivative assets— 63,996 — 63,996 
Other assets, noncurrent:
Warrant assets — 3,063 — 3,063 
Corporate debt securities— — 10,412 10,412 
Total assets at fair value$3,795,744 $1,851,167 $10,412 $5,657,323 
Liabilities
Accrued expenses and other current liabilities:
Foreign exchange derivative liabilities$— $10,074 $— $10,074 
Total liabilities at fair value$— $10,074 $— $10,074 

(1)Includes U.S. government and government agency debt securities

The following table presents additional information about investments that are measured at fair value for which the Company has utilized Level 3 inputs to determine fair value (in thousands):

Three Months Ended September 30,Nine Months Ended September 30,
2021202220212022
Balance, beginning of period$11,477 $10,465 $11,490 $10,451 
Changes in unrealized losses included in other comprehensive loss related to investments held at the reporting date— (53)(13)(39)
Balance, end of period$11,477 $10,412 $11,477 $10,412 

There were no transfers of financial instruments into or out of Level 3 during the nine months ended September 30, 2021 and 2022.

The Company amended the anti-dilution feature in the warrant agreements associated with the Second Lien Credit Agreement, as defined in Note 6, Debt, which resulted in a change in classification from liability to equity, on March 30, 2021 (the “Modification Date”). The Company recorded a marked-to-market charge of $292.0 million through the first quarter of 2021, which was recorded in other income (expense), net on the condensed consolidated statements of operations. Subsequent to the Modification Date, the warrants were no longer subject to marked-to-market charges. The balance of $1.3 billion was then reclassified from liability to equity as the amended warrants met the requirements for equity classification. Refer to Note 6, Debt, for additional information.
Derivatives Not Designated as Hedging Instruments

As of December 31, 2021, the fair value of foreign exchange derivative assets and liabilities totaled $25.9 million and $10.3 million, respectively, with the aggregate notional amount totaling $2.4 billion. As of September 30, 2022, the fair value of foreign exchange derivative assets and liabilities totaled $64.0 million and $10.1 million, respectively, with the aggregate notional amount totaling $2.0 billion. Derivative assets are included in prepaids and other current assets and derivative liabilities are included in accrued expenses and other current liabilities in the condensed consolidated balance sheets.

The Company recorded total net realized gains of $26.8 million and $61.3 million for the three months ended September 30, 2021 and 2022, respectively, and $3.2 million and $101.5 million for the nine months ended September 30, 2021 and 2022, respectively, related to foreign exchange derivative assets and liabilities.

The Company recorded total net unrealized gains of $3.7 million and $13.1 million for the three months ended September 30, 2021 and 2022, respectively, and $39.1 million and $38.3 million for the nine months ended September 30, 2021 and 2022, respectively, related to foreign exchange derivative assets and liabilities.

The realized and unrealized gains and losses on non-designated derivatives are reported in other income (expense), net in the condensed consolidated statements of operations. The cash flows related to derivative instruments not designated as hedging instruments are classified within operating activities in the condensed consolidated statements of cash flows.

The Company has master netting arrangements with the respective counterparties to its derivative contracts, which are designed to reduce credit risk by permitting net settlement of transactions with the same counterparty. The Company presents its derivative assets and derivative liabilities at their gross fair values in its condensed consolidated balance sheets. As of December 31, 2021, the potential effect of these rights of set-off associated with the Company’s derivative contracts would be a reduction to both assets and liabilities of $10.3 million, resulting in net derivative assets of $15.6 million. As of September 30, 2022, the potential effect of these rights of set-off associated with the Company’s derivative contracts would be a reduction to both assets and liabilities of $9.7 million, resulting in net derivative assets of $54.3 million and net derivative liabilities of $0.3 million.