Lions quarterback Matthew Stafford has traded a $16.5 million base salary in 2017 plus the ability to play the Kirk Cousins year-to-year franchise tag game for a new five-year extension. Per a source with knowledge of the agreement, here are the full details of what is a six-year contract between the Lions and the first overall pick in the 2009 draft, with a full value of $151.5 million.

1. $50 million signing bonus.

2. $1 million 2017 base salary, fully guaranteed.

3. $6.5 million roster bonus due on the fifth day of the 2018 league year. The bonus is guaranteed for injury at signing, and it become fully-guaranteed on the third day of the 2018 league year.

4. $9.5 million 2018 base salary, fully guaranteed at signing.

5. $5.5 million roster bonus due on the fifth day of the 2019 league year. The bonus is guaranteed for injury at signing, and it becomes fully-guaranteed on the fifth day of the 2018 (not 2019) league year.

6. $13.5 million 2019 base salary, guaranteed for injury at signing. It becomes fully-guaranteed on the fifth day of the 2018 (not 2019) league year.

7. $6 million roster bonus due on the fifth day of the 2020 league year. The bonus is guaranteed for injury at signing, and it becomes fully-guaranteed in the 2019 league year.

8. $15 million 2020 base salary.

9. $10 million roster bonus due on the fifth day of the 2021 league year.

10. $9.5 million 2021 base salary.

11. $10 million roster bonus due on the fifth day of the 2022 league year.

12. $12.5 million 2022 base salary.

13. $500,000 workout bonuses in 2018 through 2022.

Here are a few highlights of the deal.

1. The $50 million signing bonus is the most in league history, eclipsing the $40 million given last year by the Ravens to Joe Flacco.

2. The $51 million to be paid in the first year surpasses the $44 million in first year cash flow given to Flacco and Colts quarterback Andrew Luck.

3. $60.5 million is fully guaranteed at signing.

4. Given the structure, Stafford will have $86 million locked in as fully guaranteed in March of 2018. (Luck had $60 million triggered by year two; Raiders quarterback Derek Carr has $47 million.) The final $6 million becomes fully guaranteed in March of 2019.

5. All guarantees have no offset language, which means that if he’s released, he’ll be allowed to double dip.

6. As a practical matter, it’s a firm three-year commitment and likely at least four years. The guarantees expire after 2020, making the last two years (at $19.5 million and $22.5 million) team-held options. However, with significant roster bonuses due in March of both seasons, the Lions will have to make their decision quickly.

So that’s the deal. Yes, he could have played out his current deal and forced the Lions to tag him for up to three seasons. But Stafford has shifted the injury risk for the next three years (plus) to the Lions, he’s pocketed $50 million out of the gates, and he’ll likely make $108.5 million through 2020.