A credit default swap (CDS) is a type of financial derivative contract that allows one party to transfer the credit risk of a debt instrument to another party. It functions as a form of insurance against the default of the underlying asset, typically a bond or loan.