Yahoo’s decision to bring in now-former Googler Marissa Mayer to try to lead a comeback of a once-great internet icon has created quite a buzz and has some critics believing that for the first time in years, Yahoo’s board of directors may be taking the company in the right direction.

But in my opinion there’s already a worrying sign about the recruitment: Yahoo gave her a deal she couldn’t refuse.

Thanks to an SEC filing, we now know the details of the compensation package Mayer was offered. And boy is it rich. While some parts of it, such as the $1m salary and potential for a $4m performance bonus, are in line with what you’d expect.

But that’s where the standard CEO fare ends. Yahoo is giving Mayer a rare and rich $30m up-front retention award. $15m comes in the form of stock, and another $15m comes in the form of options, both of which vest over a five year period. The company has also agreed to a make-whole payment of $14m for stock that she left behind when she left Google.

Thanks to all this, Mayer’s total compensation could reach $20m per year for the foreseeable future.

Is she worth it? Time will tell. But Mayer has no experience as a CEO and with a reported fortune of $300m-plus, one would think that Yahoo’s new CEO certainly wouldn’t need to be motivated by money. A package that includes so much guaranteed compensation up-front seems to suggest that Yahoo simply didn’t feel it could lure Mayer without big money.

According to AllThingsDigital’s Kara Swisher, the Yahoo board was split on whether Mayer’s rich compensation package was a good thing, but Swisher’s sources indicate that Mayer’s deal was pushed for by Dan Loeb, a high-profile activist shareholder and thorn in Yahoo’s side before he won a seat on Yahoo’s board of directors. Incredulously, Swisher writes:

Multiple sources tell me that Loeb has been making calls to all kinds of Internet figures this week, looking for high-fives for his landing of Mayer, a hiring that was largely engineered by him.

If true, Loeb may not want to get too confident too soon. Yahoo faces huge, huge challenges. Marissa Mayer may prove to be the person who can solve them, but Yahoo looks desperate here and in raising the stakes to get Mayer, Loeb is suggesting that this is the company’s last stand, whether he knows it or not.