A credit default swap (CDS) is a financial contract that serves as a form of insurance against the possibility of a borrower defaulting on their debt. This type of contract is commonly used in the financial industry, particularly among banks and other institutions that lend money.

The purpose of a CDS is to transfer the risk of default from the lender to a third party. In exchange for a fee, the third party agrees to pay the lender in the event of a default. This allows the lender to hedge against the risk of default and reduce their overall risk exposure.

Here is an example of how a credit default swap contract might work:

Let`s say that Bank A has lent $10 million to Company XYZ. Bank A is concerned that Company XYZ may default on their debt, as they have a history of financial instability. To hedge against this risk, Bank A decides to purchase a CDS from Party B.

Under the terms of the CDS, Party B agrees to pay Bank A $10 million if Company XYZ defaults on their debt. In exchange, Bank A agrees to pay Party B a fee of 1% per year, or $100,000.

If Company XYZ does default on their debt, Bank A will receive the $10 million payout from Party B, effectively transferring the risk of default to Party B. If Company XYZ does not default, Bank A will have paid the $100,000 fee to Party B, but will have the peace of mind of knowing that they are protected against the risk of default.

Credit default swaps can be complex financial instruments, and they have been the subject of controversy in the past. However, for lenders and other financial institutions, they can be an important tool for managing risk and protecting against potential losses.