(Bloomberg) -- Goldman Sachs Group Inc. and JPMorgan Chase & Co. are set to earn a combined $133 million in fees for advising Twitter Inc. on its $44 billion acquisition by Elon Musk -- if the deal closes. 

Twitter agreed to pay Goldman Sachs $80 million, the bulk of which will get paid once the deal closes, according to a US securities filing on Tuesday. The bank got $15 million of that when the deal was announced. JPMorgan is poised for a $53 million payout, $5 million of which was payable after the lender delivered its opinion to Twitter’s board on April 25. The rest hinges on the deal closing. 

The bulk of the fees could be at risk: Musk declared in a tweet Tuesday he won’t proceed with his takeover unless the social media giant can prove bots make up fewer than 5% of its users, casting uncertainty over the deal. Twitter said in a statement that it’s “committed to completing the transaction on the agreed price and terms as promptly as practicable.”

While the proposed takeover includes a $1 billion breakup fee for each party, Musk can’t just pay the fee and walk away. The merger agreement includes a specific performance provision that allows Twitter to force Musk to consummate the deal, according to the filing. 

If the deal goes through, the payouts would be a welcome windfall for investment banks grappling with a slowdown in dealmaking. In the first quarter, revenue from advising on mergers and acquisitions gained from a year earlier at the five biggest banks, bolstered by deals announced in 2021.

©2022 Bloomberg L.P.