As of July 2023, blockchains are becoming increasingly popular, and they are starting to be used in many different fields.
Videogaming is one such field.
In this report it will be explored:
- How a blockchain can be used in the world of videogames
- Why more scalable layer 2 blockchains are needed
- What are rollups and why they are particularly well suited for videogames
- What is Starknet and how to deploy a smart contract on it
- A simple implementation of a Starknet smart contract to open loot boxes in a completely transparent way (and a demo client to use this smart contract)
- What is a blockchain 5
- Transactions
- Miners
- Proof of work
- Journey of a transaction
- Blockchain programmability
- Tokens
- Why blockchain can be used in videogames
- Why blockchain cannot be used in videogames
- Off-chain state channels 12
- State channels and videogames
- Sidechains
- Rollups
- Optimistic rollups
- Entering an optimistic rollup
- Exiting an optimistic rollup
- L2 - L1 interaction
- Optimistic rollups and videogames
- Zero-knowledge rollups
- Entering a ZK rollup
- Exiting a ZK rollup
- L2 - L1 interaction
- Intuition on the validity proofs
- ZK rollups and videogames
- Optimistic rollups
- Account abstraction
- Starknet actors
- Sequencers
- Provers
- Nodes
- Transaction journey
- Starknet setup
- Prerequisites
- Install Python3.9
- Install Cairo and Starknet
- Setting up environment variables
- Creating an account
- Deploying and interacting with a smart contract
- Cairo
- General concepts
- Storage
- Contract sections
- Problem statement
- The smart contract
- The client
- Merkle trees
- Merkle proof