Publication 535
taxmap/pubs/p535-053.htm#en_us_publink1000154199A debt becomes worthless when there is no longer any chance the amount owed will be paid. This may occur when the debt is due or prior to that
date.
To demonstrate worthlessness, you must only show that you have taken reasonable steps to collect the debt but were unable to do so. It is not necessary to go to court if you can show that a judgment from the court would be uncollectible. Bankruptcy of your debtor is generally good evidence of the worthlessness of at least a part of an unsecured and unpreferred debt.
taxmap/pubs/p535-053.htm#en_us_publink1000154200If you receive property in partial settlement of a debt, reduce the debt by the property's fair market value (FMV), which becomes the property's basis. You can deduct the remaining debt as a bad debt if and when it becomes worthless.
If you later sell the property for more than its basis, any gain on the sale is due to the appreciation of the property. It is not a recovery of a bad debt. For information on the sale of an asset, see Publication
544.