This raises the question of what the roster rules are when a player is sold for less than his acquisition price. It's not something that is explicitly mentioned. Certainly, the Club will be on the hook for the loss. The issue is that there may be money spent on the whole transaction that hasn't been accounted for in the salary budget.
To illustrate, Medina has a 4-year deal at $750K (numbers are approximate). He was purchased for $4 million, which means $1 million of that gets added to his salary for each year for salary cap purposes - total of $1.75 million/year. After 2.5 years, he is sold for $1 million, which is a $3 million loss. The problem is that only $2.5 million of that loss has been filtered through the salary system. There is still $0.5 million that needs to be considered.
Now, maybe the answer is that Medina is a DP, which means there isn't a limit on how much extra he could be paid. So, if there is an extra $0.5 million unaccounted for, you can go back and allocate to prior years without it affecting anything. And, I think that's the right answer for a DP, but who knows. Certainly, if he were not a DP, but instead a TAM or regular salary player, there would be a bigger issue. There would be money out the door that wasn't matched by TAM or GAM or room under the salary cap.