The deal, announced early Monday morning, ends the months-long hostile takeover attempt of Allergan by Canadian pharma giant Valeant and its partner, activist hedge fund mogul Bill Ackman, who took a 9.7% stake in Allergan to help push their deal to fruition.

But Ackman and Valeant won’t be crying over spilled milk.

Ackman’s Pershing Square hedge fund will make $2.3bn profit on its Allergan investment, after sharing roughly $400m of profits with Valeant as per their arrangement.