Why It Takes Both Time and Energy to Make Bitcoins