That’s not how credit derivatives work. Think of it as insurance for the loss of an investment.
If you only want to talk about credit default swaps, that's fine, but they are only a tiny fraction of all outstanding derivatives contracts.