On-Chain vs. Off-Chain: Understanding Their Roles in Decentralized and Centralized Exchanges