Twitter agreed to be taken over at $54.20 a share, a 38 percent premium over the share price before it was revealed that