A more sophisticated convention for mitigating counterparty credit risk is a central counterparty or a clearinghouse. In markets with a clearinghouse, all trades are intermediated through a central counterparty. This arrangement can and, in practice, does vastly reduce counterparty risk. The central counterparty runs a balanced book, so generally has no direct market exposure.
In the case of a member's default, the central counterparty can draw upon the proprietary margin of the defaulting member, its own reserve fund, and the assessment of members for share purchase. As you know, plans are currently being developed to establish one or more central counterparties in the credit derivatives market.