Understanding Distributed Ledgers in Cryptocurrency