minimum unrestricted cash balance, all of which we were in compliance with at October 31, 2018. We had no outstanding borrowings against the new agreement at October 31, 2018, and $50 million was available for borrowing. The interest rate on the new agreement (2.30% at October 31, 2018) is based on our total leverage ratio at LIBOR plus a spread, as defined in the credit agreement.
In the fourth quarter of fiscal 2018, the Companys Board of Directors authorized the repurchase of up to $25 million of its common stock, to be executed in open-market transactions or in accordance with a repurchase plan under rule 10b5-1 of the Securities Act of 1933 (as amended). The share repurchase program commenced, under 10b5-1, on October 22, 2018, and will expire no later than October 21, 2019. As of October 31, 2018, we had repurchased a combined 2.6 million shares at a cost of $23.1 million (an average of $9.04 per share) under this and our share repurchase program that commenced in the third quarter of fiscal 2018 (discussed below). The volume of shares repurchased are subject to market conditions, and our continual evaluation of the optimal use of our cash.
In the third quarter of fiscal 2018, the Companys Board of Directors authorized the repurchase of up to $20 million of its common stock, to be effectuated in open-market transactions or in accordance with a repurchase plan under rule 10b5-1 of the Securities Act of 1933 (as amended). The share repurchase program commenced on July 10, 2018, and was completed in October 2018.
In the third quarters of fiscal years 2018, 2017, and 2016, our majority owned IC facility in Taiwan paid dividends of $8.2 million, $8.3 million, and $11.9 million, respectively, to its noncontrolling interest.
In the first quarter of fiscal 2018, we announced the successful closing of the China joint venture agreement with Dai Nippon Printing Co., Ltd. (DNP), which we had agreed to enter into and announced in the third quarter of fiscal 2017 (see discussion below). Under the agreement, our wholly-owned Singapore subsidiary owns 50.01% of the joint venture, which is named Photronics DNP Mask Corporation Xiamen (PDMCX), and a subsidiary of DNP owns the remaining 49.99%. The financial results of the joint venture are included in the Photronics, Inc. consolidated financial statements. See Note 4 of the condensed consolidated financial statements for additional information on the joint venture.
In the fourth quarter of fiscal 2017, we announced that Photronics UK, Ltd., a wholly-owned subsidiary of ours, signed an investment agreement with Hefei State Hi-tech Industry Development Zone to establish a manufacturing facility in Hefei, China. Under the terms of the agreement, through our subsidiary, we will invest a minimum of $160 million, a portion of which may be funded with local borrowings, to build and operate a research and development and manufacturing facility for high-end and mainstream FPD photomasks. Hefei State Hi-tech Industry Development Zone will provide certain investment incentives and support for this facility, which will have initial capability to produce up to G10.5+ large area masks and AMOLED products. Construction began in late 2017 and production is anticipated to commence in the first half 2019.
In the fourth quarter of 2016, Photronics Singapore Pte, Ltd., a wholly-owned subsidiary, signed an investment agreement with the Administrative Committee of Xiamen Torch Hi-Tech Industrial Development Zone (Xiamen Torch) to establish an IC manufacturing facility in Xiamen, China. Under the terms of the agreement, we will build and operate an IC facility to engage in research and development, manufacture and sale of photomasks, in return for which Xiamen Torch will provide certain investment incentives and support. This expansion is also substantially supported by customer commitments for its output. As discussed above, in the first quarter of fiscal 2018, we entered into a joint venture agreement with DNP, under which they hold a 49.99% ownership interest in this investment. The total investment per the agreement is $160 million, of which approximately $62 million remained for Photronics as of October 31, 2018, and will be funded over the next several years with cash and local borrowings. Construction began in 2017 and production is anticipated to start in the first half of 2019.
In the third quarter of fiscal 2016, we sold our investment in MP Mask to Micron for $93.1 million and recorded a gain of $0.1 million on the sale. On that same date, a supply agreement commenced between Photronics and Micron, which provided that we would be the majority outsourced supplier of Microns photomasks and related services. The supply agreement had a one year term and expired in May 2017. We have unlimited rights to use the technology under our prior technology license agreement.
In the second quarter of fiscal 2016, $57.5 million of our senior convertible notes matured. We repaid $50.1 million to noteholders, and issued approximately 0.7 million shares to noteholders that elected to convert their notes to common stock. The notes were exchanged at the rate of approximately 96 shares per $1,000 note principle, equivalent to a conversion rate of $10.37 per share.