^^^^^^
That was a horribly structured contract. Just awful, and a complete win by player and agent on an RFA deal. It was like "can we walk this player to free agency as quickly as possible? Sure, we'll give him three years, with a fourth year where he gets a huge qualifying offer that he can sign and walk away from the team after the season".
Just putrid. And by all accounts it happened because Treliving failed to get rid of any bottom six contracts to make room for a proper deal.