Joel Embiid and the Philadelphia 76ers have agreed upon a five-year, $148 million extension. 

If Embiid meets the super max criteria, he could earn an as much as $178 million on the contract.

Embiid has played in only 31 games during his career due to multiple foot surgeries and a torn meniscus. 

The deal will include some salary-cap protection for the 76ers should Embiid suffer injury that causes him to miss significant playing time.

Zach Lowe reports that the extension is described as "perhaps the most complex" in NBA history. But sources say the 76ers would have to waive Embiid for him not to reach the full value of his $148 million extension.