Risk Analytics for Decentralized Exchanges