An Introduction to Cryptocurrencies