As a result, the cancellation is a nonexchange gain to the entity that owed the debt and a nonexchange loss to the lender.
The cancellation is an exchange loss to the entity that owed the gains from the surplus and a exchange gain to the lender.