What: In a transaction valued at $638 million, GlobalWafers announced Wednesday evening it entered into a definitive agreement to acquire SunEdision Semiconductor (NASDAQ: SEMI). Following the announcement, SunEdison stock soared as much as 40.1% on Thursday. The stock is up 38.8% at the time of this writing.

Image source: SunEdison Semiconductor.

So what: It makes sense shares are trading higher on Thursday. GlobalWafers is paying $12 per share in cash -- a 45% premium to where SunEdison stock closed on Wednesday. After SunEdison stock's rise on Thursday, the stock is trading at about $11.50 per share -- $0.50 shy of the agreed upon per-share acquisition price.

The transaction has been unanimously approved by both companies' boards of directors.

"We are pleased to have reached an agreement that delivers a significant premium to our shareholders," said SunEdison CEO Shaker Sadasivam in a press release on Wednesday. "We believe this transaction is in the best interest of our company. We look forward to a smooth process to facilitate an efficient closing, which we hope can occur before the end of the year."

Now what: Investors should keep in mind that the deal isn't certain until it closes. The two companies specifically note in their press release that the deal is "subject to the approval of the shareholders of SunEdison Semiconductor, as well as other customary conditions including approvals from relevant regulatory authorities and the High Court of the Republic of Singapore."