Blockchain: The Simulation

Where YOU are the Blockchain

If you’ve heard of the blockchain or bitcoin, and ever wondered, how does that actually work and why are people so excited about it, this simulation is for you. And four close friends. Or strangers — whoever you can find who wants play!

How it works

The purpose of this simulation is to show people how blockchain works in a live and interactive roleplay. We are going to roleplay a market for services.

Some assumptions to keep in mind as we setup the game. This market is a closed system, so only vendors can be buyers. We will use a currency system called Notes 🎵 and the each participants start with the same number of Notes (100.) We will use post-it notes to represent the blocks in the blockchain.

Rather than do a lot of explanation up front, this roleplay will introduce you to a variety of important blockchain concepts as we go along. Don’t fret that everything doesn’t make sense at the start. The goal is for it to make sense by the end!

Enough background, let’s get started

In a blockchain, each subsequent block of data needs to reference the block that came before it. But that leaves open the question of how to produce the first block that references nothing which came before. This block is called the genesis block. We are going to make the genesis block as a group now.

Round 0: The Genesis Block — from thin air!

  • Step 1: Create the genesis block. Everyone writes down the name of each person in the group on a post it and writes down 100 🎵 per person. Also label this block #0.
  • Step 2: Consensus and validation. One at a time, each participant states how much is in their own account and the rest of the group verbally acknowledges if that number is correct.
  • Step 3: Start the chain. Assuming no one cheated here and gave themselves more notes than everyone else, you’re ready to go onto the next round. Stick the Genesis Block to your shirt.
  • Step 4: … but if the Genesis Blocks don’t match. If the group does not reach consensus on how many notes each member started with (should be 100 🎵 each), then the Genesis Block isn’t formed. Either start over at Step 1 and see if people can agree. Or stop and realize there is no blockchain without consensus between the parties working together.

Create the market place for services

Each individual chooses a service to provide and a cost for that service in units of 10. A service is anything that you want to offer for sale, such as guitar lessons or cooking a dinner. Write down your name, the service, and the cost on a post-it note. Put that post-it note on a visible place on your shirt.

Round 1: Blockchain is a distributed ledger

  • Constraints for this round. Each participant can participate in only one transaction per block.
  • Step 1: Conduct a transaction. A transaction is when one person purchases services from another and gives them notes in exchange.
  • Step 2: Record transaction. Everyone, on their own ledger, records the transaction on a post-it note for this round. The ledger will keep track of transactions and, in Step 4, the current account balances. Record all transactions from one round on one post-it note.
  • Step 3: Conduct and record more transactions. Repeat steps one and two until everyone in the group has participated as a buyer or a seller in just one transaction. (If there are an odd number of participants, it is ok if one person doesn’t participate in a transaction in this round.)
  • Step 4: Create new account balances. Everyone creates an updated block, with all participants current 🎵 balance, as it exists after all transactions are completed. Use a new post-it note for this new balance block.
  • Step 5: Consensus and validation. One at a time, each participant states how much is in their own account and the rest of the group verbally acknowledges if that number is correct.
  • Step 6: Add to the chain. The resulting block that the group agrees on gets added (“chained”) to the Genesis Block. Label it Block #1. Your blockchain is now two blocks long.

Round 2: The Double Spend Problem (we don’t want money to be infinite)

  • Question: What would stop you from buying lots of services and paying for them with the same notes?
  • Constraints for this round. Identify one person to double spend in the this round of transactions. This means that person will attempt to make two purchases.
  • Step 1: Conduct a transaction. A transaction is when one person purchases services from another and gives them notes in exchange. Remember to use a new post it notes for every collection of transactions and every new final ledger.
  • Step 2: Record transaction. Everyone, on their own ledger, records the transaction on a post-it note for this round.
  • Step 3: Conduct and record more transactions. Repeat steps one and two until everyone in the group has participated as a buyer and seller in just one transaction. Except for the person identified to participate in two purchases (please make both transactions for an equal amount of 🎵.)
  • Step 4: Create new account balances. Everyone creates an updated block, with all participants current 🎵 balance, as it exists after all transactions are completed. For the participant who will double spend: on your own ledger, only deduct one of the transactions.
  • Step 5: Consensus and validation. One at a time, each participant states how much is in their own account and the rest of the group verbally acknowledges if that number is correct. The group sees that the double spender’s ledger doesn’t match with everyone else’s ledger.
  • Moderator: What is the penalty in the real world when you try and double spend? IRL, your computer is in violation of the protocol, the ledger is wrong, so no one will accept transactions from that node. Other nodes would not want to do business with this node. So that node would try and recruit other nodes to reach an agreement. Or it would throw away its own ledger and adopt the consensus ledger.
  • Step 6: Decision time! Double spender can 1) throw away the block and copy the consensus of the other ledgers, 2) try and recruit the others to join the double spender’s version of the ledger, or 3) choose to leave the system.
  • Step 7: Add to the chain. The resulting block that the group agrees on gets added to the blockchain. Your blockchain is now three blocks long.

Round 3: Collusion (51% attack)

for the purpose of illustration, I will assume there are 5 participants

  • Question: What would stop several nodes (independent computers keeping track of ledgers. That’s YOU in this simulation.) from colluding to give themselves more Notes when the final tally is updated?
  • Constraints for this round: Choose three players to collude. They should collectively decide, when updating the tally at the end of the round, to give each other more Notes. The three colluding ledgers (>50%) should otherwise be identical.
  • Step 1: Conduct and record several transactions. The same as previously.
  • Step 2: Create new account balances. Everyone creates an updated block, with all participants current 🎵 balance, as it exists after all transactions are completed. The three participants (or > 50%) colluding should decide on their version of the ledger at this time.
  • Step 3: Consensus and validation. One at a time, each participant states how much is in their own account and the rest of the group verbally acknowledges if that number is correct. The group sees that there are two sets of competing ledgers. And the colluders will add their block to the blockchain.
  • Moderator: This is a successful attack. And will likely break the blockchain. What will the other two participants do? Will any other nodes want to join the blockchain in the future? How does the blockchain prevent 51% attacks? It becomes increasingly hard to execute this kind of attack as we add more nodes to the system. Imagine everyone at a conference had a node. That’s hard to organize! Also, in real life there is a time constraint. You would need to organize the attack in the 14 seconds it takes to add a new block to the Ethereum blockchain.

Round 4: How do we create more notes?

  • Question: Why would someone want to run a node to keep track of blockchain? It is because they can be financially rewarded for doing so in a process called mining. The first node to complete an arbitrary problem, in addition to the calculating of the ledger, gets a small amount of 🎵. These notes are created for this purpose and do not come from the original notes created for the Genesis Block.
  • Constraints: In this round, the first participant to add up their ledger, as well as solving an additional problem, wins the mining fee of 20 🎵.
  • Step 1: Conduct and record several transactions. The same as previously. No restrictions on how many transactions any participant can take part in.
  • Step 2: Create new account balances. Everyone creates an updated block, with all participants current 🎵 balance, as it exists after all transactions are completed. Each participant should go to Step 3, Do an additional problem, as soon as they complete Step 2.
  • Step 3: Do an additional problem. The problem should be “hard to solve, yet easy to verify.” In real life this would be a extremely complicated math problem. For the purposes of this round in the simulation, it will be “Find 10 animals whose names begin with the letter H.” Keep track of the order that people solve the problem in.
  • Step 3: Consensus and validation. The first participant to solve the problem in Step 3 presents their final tally to the group. Each other participant confirms every account in the tally. If the block is accepted, the creator of the block gets the mining fee added to their account. If not, they don’t get the mining fee and the participant who finished in second place gets a chance. Keep going until a block is accepted.
  • Step 4: Add to the chain. The resulting block that the group agrees on gets added to the blockchain. Your blockchain is now four blocks long.

Further rounds

We are planning on testing this simulation format over the next few weeks and seeing how it works. If things go well, we plan on adding more rounds to the simulation. And each round will explain another aspect of blockchain. For example, we would like to explain tokens, smart contracts, and gas. If you end up testing out the simulation, please do let us know about it in the comments!