Snapchat is replacing its chief financial officer with a 20-year veteran of Amazon — and giving him more than $20 million to help fix the company.

Wall Street liked the idea. Shares of Snap Inc (SNAP)., the parent company of Snapchat, rose nearly 2% on Tuesday.

Snap's new CFO will be Tim Stone, who has worked for Amazon (AMZN) since March 1998. He was most recently vice president of finance, but he also briefly ran the company's physical stores, including the integration of Whole Foods after Amazon bought it last year.

Wall Street has been wondering whether Evan Spiegel, Snap's co-founder and CEO, needs a veteran tech executive to get the company back on track and be the so-called adult supervision — sort of like Sheryl Sandberg at Facebook or Eric Schmidt when Google (GOOGL) went public.

Snap's latest earnings report showed continued losses and sluggish user growth. The company's recent redesign ticked off some of its high-profile celebrity users. And Snap is falling further behind Instagram, owned by Facebook (FB), which keeps copying Snapchat features and gaining more users.

Shares of Snap are nearly 35% below their price when the company went public last year, and more than 60% below their all-time high.

Related: Snapchat needs to grow up

Snap still has no chief operating officer, but Stone could help the company regain credibility with investors.

Snap is certainly paying him a lot of money to try to make that happen.

The company said in a regulatory filing that Stone, who starts as CFO on May 16, will be paid an annual salary of $500,000. He will also receive restricted stock units worth $20 million and 500,000 options to buy Snap stock — worth $5.5 million at its current price.

Amazon had no comment about Stone's departure or what his salary was there. Stone was not senior enough that Amazon would have had to disclose how much he held in Amazon stock options.

Stone will replace Andrew "Drew" Vollero, who joined Snapchat from the toymaker Mattel (MAT) in 2015.

Snap said in its SEC filing that Vollero will receive one year of full salary and COBRA insurance premiums in one lump sum, and that the company will accelerate the vesting of his restricted stock units in the company.

It wasn't clear how much restricted stock he had. Vollero was paid $450,000 salary last year.

Related: Snapchat redesigns app again. Stock plunges

"I am deeply grateful for Drew and his many contributions to the growth of Snap," Spiegel said in the regulatory filing. "He has done an amazing job as Snap's first CFO."

Snap did not give a reason for Vollero's departure or say whether he had another job lined up. Snap merely said it was "not related to any disagreement with us on any matter relating to our accounting, strategy, management, operations, policies, or practices."