I recently agreed to lend out some of my shares to my brokerage. They deposit collateral in a bank account, and the balance is adjusted daily based on the changing value of the shares borrowed.
My question is what would happen, specifically tax-wise, in the event that my brokerage defaulted? I know I could withdraw the collateral. Presumably, this would be taxed as regular income, instead of long-term capital gains if I had kept the shares and sold them. Additionally, I would realize all the income in one year, instead of being able to spread it over multiple years as planned. I'm aware that these are some of the risks of lending out my shares.
But what I can't figure out is what would happen to my cost basis in those shares. Is that basically forfeited? Or can it be deducted from the collateral income somehow?