In contrast, DEXes operate entirely on-chain and assets are exchanged directly from wallet to wallet. While this gets rid of the requirement for accounts and trust in the exchange itself, it also restratins the tradable assets to ones that are accessible to the on-chain component representing the DEX (usually a smart contract). Also, on-chain transaction costs can be higher than in an off-chain system due to gas usage.