Blockchain, smart contracts and cryptocurrencies