v3.22.0.1
Financial Instruments
12 Months Ended
Dec. 31, 2021
Fair Value Disclosures [Abstract]  
Financial Instruments Financial Instruments
As at December 31, 2021, the carrying amount and fair value of the Company’s financial instruments were as follows:
Level 1
$
Level 2
$
Level 3
$
Carrying AmountFair ValueCarrying AmountFair ValueCarrying AmountFair Value
Assets:
Cash equivalents:
Canadian federal bonds and agency securities50,13850,138
Corporate bonds and commercial paper267,953268,090
Marketable securities:
U.S. term deposits900,000901,689
U.S. federal bonds and agency securities680,436681,629
Canadian federal bonds and agency securities1,215,6461,218,001
Corporate bonds and commercial paper2,469,0192,475,051
Derivative assets:
Foreign exchange forward contracts1,8241,824
Equity and other investments:
Equity and other investments with readily determinable fair values2,782,9012,782,901423,387423,387
Available-for-sale debt security under fair value option205,878205,878
Liabilities:
Derivative liabilities:
Foreign exchange forward contracts5,9265,926
The fair values of marketable securities above include accrued interest of $13,067, which is excluded from the carrying amounts. The accrued interest is included in trade and other receivables in the consolidated balance sheets. Additional accrued interest of $4,000 recognized on the debt security is included in the fair value and carrying amount above.
As at December 31, 2020, the carrying amount and fair value of the Company’s financial instruments were as follows: 
Level 1   
Level 2
$
Level 3
$
Carrying AmountFair ValueCarrying AmountFair ValueCarrying AmountFair Value
Assets:
Cash equivalents:
U.S federal bonds174,397174,399
Corporate bonds and commercial paper134,056134,396
Repurchase agreements290,000290,001
Marketable securities:
U.S. term deposits885,000887,102
U.S. federal bonds1,224,0521,226,657
Canadian federal bonds24,98824,987
Corporate bonds and commercial paper1,550,3301,552,907
Derivative assets:
Foreign exchange forward contracts16,34016,340
The fair values above include accrued interest of $7,563, which is excluded from the carrying amounts. The accrued interest is included in trade and other receivables in the consolidated balance sheets.

All cash equivalents and marketable securities mature within one year of the consolidated balance sheet date. In the year ended December 31, 2021, $275,597 was transferred from Level 3 to Level 1 due to the vesting of warrants associated with an investment in a strategic partnership.

As at December 31, 2021, the Company held foreign exchange forward contracts for USD, GBP and CAD with a total notional value of $586,547 (December 31, 2020 - $340,843), to fund a portion of its operations. The foreign exchange forward contracts have maturities of twelve months or less. The fair value of foreign exchange forward contracts and corporate bonds was based upon Level 2 inputs, which included period-end mid-market quotations for each underlying contract as calculated by the financial institution with which the Company has transacted. The quotations are based on bid/ask quotations and represent the discounted future settlement amounts based on current market rates.

Derivative Instruments and Hedging

The Company has a hedging program to mitigate the impact of foreign currency fluctuations on future cash flows and earnings. Under this program, the Company has entered into foreign exchange forward contracts with certain financial institutions and designated those hedges as cash flow hedges. As of December 31, 2021, $1,215 of unrealized gains and $4,936 of unrealized losses related to changes in the fair value of foreign exchange forward contracts designated as cash flow hedges were included in accumulated other comprehensive (loss) income and current assets and current liabilities on the consolidated balance sheet. These amounts are expected to be reclassified into earnings over the next twelve months. In the year ended December 31, 2021, $22,852 of realized gains (December 31, 2020 - $2,985 of realized losses) related to the maturity of foreign exchange forward contracts designated as cash flow hedges were included in cost of revenues and operating expenses. Under the current hedging program, the Company is hedging cash flows associated with payroll and facility costs.
Convertible Senior Notes

As at December 31, 2021, the estimated fair value of the Company's Notes, as further described in note 16 below, was approximately $1,165,410 (December 31, 2020 - $1,098,342). The estimated fair value was determined based on the last executed trade for the Notes of the reporting period in an over-the-counter market, which is considered as Level 2 in the fair value hierarchy.