STOCKHOLDERS' EQUITY | STOCKHOLDERS’ EQUITY The changes in total stockholders’ equity were as follows (in thousands): Total stockholders’ equity Balance at December 31, 2017 $ 786,333 Net loss (29,892 ) Exercise of stock options 54,621 Purchases under the employee stock purchase plan 12,578 Vesting of early exercised stock options and other 126 Issuance of common stock in connection with business combination 139,396 Replacement stock awards issued in connection with acquisition 757 Conversion feature of convertible senior notes, due 2023, net of allocated costs 154,019 Purchase of bond hedges in conjunction with issuance of convertible senior notes, due 2023 (172,586 ) Sale of warrants in conjunction with issuance of convertible senior notes, due 2023 112,125 Share-based compensation 103,196 Tax withholding related to vesting of restricted stock units (68,575 ) Cumulative adjustment for adoption of ASC 606 (4,586 ) Recovery of common stock in connection with indemnification settlement agreement (2,745 ) Change in other comprehensive loss (3,138 ) Balance at June 30, 2018 $ 1,081,629 Common Stock The Company has authorized the issuance of Class A common stock and Class B common stock. Class A common stock and Class B common stock are referred to as "common stock" throughout these Notes to the Condensed Consolidated Financial Statements, unless otherwise noted. As of June 30, 2018 , the Company was authorized to issue 1,000,000,000 shares of Class A common stock and 500,000,000 shares of Class B common stock, each with a par value of $0.0000001 per share. As of June 30, 2018 , there were 297,371,047 shares of Class A common stock and 109,580,981 shares of Class B common stock outstanding. Options and awards granted following the Company's initial public offering are related to underlying Class A common stock. Additionally, holders of Class B common stock are able to convert such shares into Class A common stock. Warrants In conjunction with the 2023 Notes offering, the Company sold the 2023 warrants whereby the counterparties have the option to purchase a total of approximately 11.1 million shares of the Company’s Class A common stock at a price of $109.26 per share. The Company received $112.1 million in cash proceeds from the sale of the 2023 warrants. See Note 12 , Indebtedness , for more details on this transaction. Release of Caviar Shares Held Back In 2014, in conjunction with the Company's acquisition of Caviar, Inc. (Caviar), 1,291,979 shares of the purchase consideration issuable were withheld for indemnification purposes. In April 2018, the Company reached an agreement with the former owners of Caviar whereby 822,085 of the shares held back were released to the former owners and 469,894 shares were forfeited back to the Company as indemnification against liabilities related to Caviar preacquisition matters. Upon reaching the agreement, the Company recorded an indemnification asset of $2.8 million and a corresponding credit to expense to compensate for the costs previously incurred in connection with Caviar preacquisition claims. The remaining value of the forfeited shares was treated as an equity repurchase. Stock Plans The Company maintains two share-based employee compensation plans: the 2009 Stock Plan (2009 Plan) and the 2015 Equity Incentive Plan (2015 Plan). The 2015 Plan serves as the successor to the 2009 Plan. The 2015 Plan became effective as of November 17, 2015. Outstanding awards under the 2009 Plan continue to be subject to the terms and conditions of the 2009 Plan. Since November 17, 2015, no additional awards have been nor will be in the future granted under the 2009 Plan. Under the 2015 Plan, shares of the Company's Class A common stock are reserved for the issuance of incentive and nonstatutory stock options, restricted stock awards (RSAs), restricted stock units (RSUs), performance shares, and stock bonuses to qualified employees, directors, and consultants. The awards must be granted at a price per share not less than the fair market value at the date of grant. Initially, 30,000,000 shares were reserved under the 2015 Plan, and any shares subject to options or other similar awards granted under the 2009 Plan that expire, are forfeited, are repurchased by the Company, or otherwise terminate unexercised, will become available under the 2015 Plan. The number of shares available for issuance under the 2015 Plan will be increased on the first day of each fiscal year, in an amount equal to the least of (i) 40,000,000 shares, (ii) 5% of the outstanding shares on the last day of the immediately preceding fiscal year, or (iii) such number of shares determined by the Company’s board of directors or a committee thereof. As of June 30, 2018 , the total number of shares subject to stock options, RSAs and RSUs outstanding under the 2015 Plan was 26,273,466 , and 63,326,561 shares were available for future issuance. As of June 30, 2018 , the total number of shares subject to stock options, RSAs and RSUs outstanding under the 2009 Plan was 34,740,852 . A summary of stock option activity for the six months ended June 30, 2018 is as follows (in thousands, except share and per share data): Number of Stock Options Outstanding Weighted Weighted Aggregate Balance at December 31, 2017 47,270,091 $ 8.67 6.52 $ 1,229,103 Granted 783,625 44.75 Exercised (7,460,458 ) 7.32 Forfeited (454,154 ) 12.21 Balance at June 30, 2018 40,139,104 $ 9.58 6.21 $ 2,089,523 Options exercisable as of June 30, 2018 37,006,235 $ 8.62 6.02 $ 1,962,153 Restricted Stock Activity Activity related to RSAs and RSUs during the six months ended June 30, 2018 is set forth below: Number of Weighted Unvested as of December 31, 2017 21,317,525 $ 17.84 Granted 4,439,906 45.62 Vested (3,736,968 ) 16.52 Forfeited (1,145,249 ) 17.00 Unvested as of June 30, 2018 20,875,214 $ 24.03 Share-Based Compensation The fair value of stock options and employee stock purchase plan rights are estimated on the date of grant using the Black-Scholes-Merton option valuation model. The fair value of RSAs and RSUs is determined by the closing price of the Company’s common stock on each grant date. The fair value of stock options granted was estimated using the following weighted-average assumptions: Three and Six Months Ended June 30, 2018 2017 Dividend yield — % — % Risk-free interest rate 2.92 % 1.88 % Expected volatility 30.87 % 32.22 % Expected term (years) 6.19 6.02 The following table summarizes the effects of share-based compensation on the Company's condensed consolidated statements of operations (in thousands): Three Months Ended June 30, Six Months Ended June 30, 2018 2017 2018 2017 Cost of revenue $ 30 $ 18 $ 61 $ 18 Product development 33,806 25,136 64,288 44,492 Sales and marketing 5,634 4,355 10,595 8,290 General and administrative 12,649 10,084 23,999 18,463 Total $ 52,119 $ 39,593 $ 98,943 $ 71,263 The Company recorded $2.0 million and $4.2 million of share-based compensation expense related to the Company's 2015 Employee Stock Purchase Plan during the three and six months ended June 30, 2018 , respectively, compared to $1.2 million and $3.0 million for the three and six months ended June 30, 2017 , respectively, which are included in the table above. The Company capitalized $2.7 million and $4.3 million of share-based compensation expense related to capitalized software costs during the three and six months ended June 30, 2018 , respectively, compared to $0.7 million and $1.2 million for the three and six months ended June 30, 2017 , respectively. As of June 30, 2018 , there was $531.5 million of total unrecognized compensation cost related to outstanding awards that are expected to be recognized over a weighted-average period of 2.87 years . |