If he performs well, then a nice payday awaits him. However, if he plays poorly or gets hurt, the Broncos basically get to pay him $5 million, then cut him before next season.
Additionally, if Okung plays well and the Broncos lock him into his contract, he may find himself looking for an out. While he can earn a sizable chunk of money with a good portion of it guaranteed, his yearly average is a little over $1 million less than what the franchise tag pays offensive linemen this year. If Okung plays anywhere near the level of a top-five lineman, he will actually be underpaid, particularly with a rising salary cap.
La Canfora also reported that Okung had a salary cap strategist help him with the deal. Without the help of a strategist, it's possible Okung was either being offered less guaranteed money or a deal that came without the "second contract" structure.
It's not a loss for Okung, who did well for himself, but it's undoubtedly a gamble, and if he doesn't live up to expectations, he could be going through this process again next season.