Tesla shareholders have approved a massive new pay package for Tesla CEO Elon Musk, helping to ensure that he will continue running the company for another decade.

The package is performance based. If Tesla's stock value reaches $100 billion, Musk will receive an award equal to one percent of the company's shares, worth $1 billion. Musk gets another one percent for each $50 billion increase in the share price. If the stock rises to $650 billion—and Tesla meets other profit and revenue targets—Musk will get a series of stock awards totaling $45 billion.

Tesla's stock is currently worth around $53 billion, so even hitting the first target of $100 billion within the next 10 years won't be easy. If he doesn't reach this target, he'll get no compensation for serving as Tesla's CEO over the next decade.

Musk already owns around 22 percent of Tesla shares—a figure that will grow to more than 30 percent if he hits all 12 milestones. In that case, Musk's net worth would be around $200 billion, possibly making him the wealthiest man on the planet.

Tesla, taking account of the fact that Musk may not get all of the awards, said the package was worth $2.6 billion.

Musk's lavish pay plan was controversial. Earlier this month, the two most prominent shareholder advisory firms advised voting against Musk's pay plan, arguing that the plan was too generous and "unprecedented." They estimated the plan was actually worth $3.7 billion.

The new plan follows the blueprint of Musk's previous compensation plan, which was approved in 2012. At the time, Tesla stock was worth $3.2 billion. Musk got 0.5 percent of the company's stock every time Tesla's value rose by an increment of $4 billion. He reached all of the milestones, allowing him to collect a sequence of 10 stock awards—stock that's now worth billions of dollars.

Musk is guiding Tesla through a perilous time period. The company is burning through hundreds of millions of dollars of investor money as it tries to ramp up production of the Model 3, which is way behind schedule. On the other hand, Tesla experienced similar difficulties getting its Model S sedan to market—and it was ultimately able to overcome them.