The Engine Behind DApps: Smart Contracts Explained