Economics of Digital Currencies