This is a Win-Win-Win:
Perk wins because he gets his raise and security, and as others have said, given the question marks about his health, it was a great hedge (at worst).
The Thunder win by spending less for him now than they would have on the open market.
The Cs win because they got great value for a center of questionable health, whose contributions on the court for the remainder of this season were absolutely not guaranteed, and whom we were going to lose in a bidding war, anyway.
For us, the part about his ability to contribute on the court for us for the remainder of the season is a huge question mark in my mind and in and of itself a big factor in evaluating the trade as being warranted.
Many players' histories regarding major reconstructive knee surgery (TA, KG, etc.) have shown that it takes a full year to recover and not until the next year that the player is able to perform to their previous level at best.
We would not have had that KP (i.e. the fully healed one) playing for us this year, and if he remained healthy OKC had way more $$$ to give him next, and we wouldn't have had him then either.