How Exchanges Prevent Double-Spending Attacks