How Secure are Smart Contracts?