Cheat Sheet

Blockchain For Dummies Cheat Sheet

From Blockchain For Dummies, 2nd Edition

By Tiana Laurence

In this Cheat Sheet, you find out how blockchains and smart contracts work, what cryptocurrency is, and how to keep your cryptocurrency safe and secure.

How Blockchains Work

A blockchain is a shared database that is managed by a global network of computers. Information held in the database is distributed and continually reconciled by the computers in the network. The computers are often referred to as nodes, miners, or peers. Whatever they’re called, the computers are creating and maintaining their blockchain by validating and transmitting entries. And entries are the data that is published by the users of the network.

Often this data represents the movement of cryptocurrency from one user of the network to another user of the network.

For example, when you send some Bitcoin to your friend Tom, you’re creating and publishing an entry into the Bitcoin network. In this example, the entry you created has some restrictions. The computers in the Bitcoin network will check to make sure that you haven’t already sent the data representing the cryptocurrency to another person earlier. When you send Tom the Bitcoins, his account is credited and your account is debited.

The computers in the network are preventing you from “double-spending.” In the case of the Bitcoin network, the problem is solved by requiring every computer in the network to keep a complete record of the history of all the entries made within the network. The entire history gives the balance of every account, including yours.

Not all entries in blockchains represent the movement of a cryptocurrency. Some blockchains allow for the publishing of data for a fee. Entries in these systems are not restricted; they use a pay-to-publish model. They also allow you to confirm the validity of an entry without the full history of the blockchain.

Most blockchains are not controlled by any single entity and do not have a single point of failure. All the entries are viewable by the whole network. When data is entered in a blockchain, it can’t be removed. It’s there forever.

The innovation of blockchains that makes them different from a normal database is that they achieve agreement on the history by sharing and restricting the entries without a central server or authority.

How Smart Contracts Work

Smart contracts, also known as a smart properties and chaincode, are agreements that have been codified inside a blockchain. Smart contracts are code — simple “if-then” and “if-then-else” statements. They’re created with code that is built inside a blockchain. Ethernet and Hyperledger Fabric are popular blockchains for creating smart contracts.

The blockchains records data on their smart contracts and have a history of the smart contracts’ balance of cryptocurrency and a history of all their transactions.

Smart contracts have an internal memory containing their code. The code gets executed when predetermined restrictions are met. These restrictions could be internal or external to the smart contract.

If the code for the smart contract needs an external source to determine if it has met its restrictions, it will use an oracle (a source of knowledge). An oracle could be a data feed for weather, for example. This would be useful if the smart contract were executing an insurance contract for crops. Following this example, the contract would look something like this: “If the temperature drops below 32 degrees for more than one hour, release $5,000 to John.”

The smart contracts facilitate, verifies, and enforce the performance of a contract. There is no outside part or legal system that interprets the contract and the intent of the parties. The code is law.

What Is Cryptocurrency?

Cryptocurrencies, sometimes called virtual currencies, digital money/cash, or tokens, are not really like U.S. dollars or British pounds. They live online and are not backed by a government. They’re backed by their respective networks. Technically speaking, cryptocurrencies are restricted entries in a database. Specific conditions must be met to change these entries. Created with cryptography, the entries are secured with math, not people.

Restricted entries are published into a database, but it’s a special type of database that is shared by a peer-to-peer network. For example, when you send some Bitcoin to your friend Cara, you’re creating and sending a restricted entry into the Bitcoin network. The network makes sure that you haven’t not the same entry twice; it does this with no central server or authority. Following the same example, the network is making sure that you didn’t try to send your friend Cara and your other friend Alice the same Bitcoin.

The peer-to-peer network solves the “double-spend” problem (you sending the same Bitcoin to two people) in most cases by having every peer have a complete record of the history of all the entries made within the network. The entire history gives the balance of every account including yours. The innovation of cryptocurrency is to achieve agreement on what the history is without a central server or authority.

Entries are the representation of cryptocurrency.

Cryptocurrencies are generated by the network in most cases to incentivize the peers, also known as nodes and miners, to work to secure the network and check entries. Each network has a unique way of generating them and distributing them to the peers.

Bitcoin, for example, rewards peers (known as miners on the Bitcoin network) for “solving the next block.” A block is a group or entries. The solving is finding a hash that connects the new block with the old one. This is where the term blockchain came from. The block is the group of entries, and the chain is the hash. Hashes are a type of cryptologic puzzle. Think of them as Sudoku puzzles that the peers compete to connect the blocks.

Every cryptocurrency is a little different, but most of them share these basic characteristics:

  • They’re irreversible. After you send a cryptocurrency and the network has confirmed it, you can’t retrieve it. Cryptocurrencies are one way, no chargebacks.
  • They’re anonymous. Anyone can open a wallet, no ID required, and have varying stages of anonymity depending on which token you utilize.
  • They’re fast and globally accessible. Entries are broadcast across the network immediately and are confirmed in a couple of minutes.
  • They’re built to be very secure. Cryptocurrencies use the latest cryptographic techniques, but they’re in early development.
  • They have a controlled supply limited by the network.

Safeguarding Your Cryptocurrency

Cryptocurrencies have captured the imagination of the public, but the cryptocurrency world is a proverbial Wild West of benevolent pioneers ready to help you find your way and crazy bandits who want to take you for all you’re worth.

Cryptocurrencies are most vulnerable in centralized digital systems that have access to the Internet. This includes online wallets, exchanges, wallets on your computer, cloud storage of private keys (digital key used to secure your tokens), and mobile applications.

To prevent theft of your cryptocurrencies, use cold storage (an offline archive of your private keys). Top cold storage methods include an offline hardware wallet, a USB drive, or a paper wallet.

Because cryptocurrency operates on open blockchain networks, there are a plethora of ways someone can take your money, track your spending, or violate your privacy. To prevent this form of theft, follow these tips:

  • Use multiple wallets. There is no restriction on the number of wallet addresses that you can use. Some people generate a new address every time they send or receive cryptocurrency.
  • Only keep small amounts in a web wallet. Web wallets are targets for hackers, only keep a small amount in each one. Wallets on your computer are also vulnerable. Use cold storage to hold large amounts of cryptocurrency.
  • Don’t share. Never share your private keys for your cryptocurrency with anyone. Doing so gives them full access to your funds.