How Does a Decentralized Exchange (DEX) Differ from a Centralized Exchange (CEX) in Risk Profile?
A CEX holds user funds and acts as the counterparty, posing custodial and traditional counterparty risk. A DEX uses smart contracts for non-custodial trading, eliminating custodial risk but introducing smart contract vulnerability, oracle, and impermanent loss risk.
The risk is shifted from a centralized entity to the code itself. Users retain control of their private keys on a DEX.