Jump into concepts and practice - no test required
or
Recommended
Test this pattern10 questions across easy, medium, and hard to know if this pattern is strong
Recall & Review
beginner
What is a Layer 2 solution in blockchain?
A Layer 2 solution is a technology built on top of a blockchain (Layer 1) to improve its scalability and speed by handling transactions off the main chain while still relying on its security.
Click to reveal answer
beginner
Name two common types of Layer 2 solutions.
Two common types are State Channels and Rollups. State Channels allow multiple transactions off-chain between parties, while Rollups bundle many transactions and submit them as one batch to the main chain.
Click to reveal answer
intermediate
How do Rollups improve blockchain performance?
Rollups collect many transactions off-chain, compress them, and submit a single proof or summary to the main chain, reducing the load and increasing transaction speed and lowering fees.
Click to reveal answer
intermediate
What is the main difference between Optimistic Rollups and ZK-Rollups?
Optimistic Rollups assume transactions are valid and only check if challenged, while ZK-Rollups use zero-knowledge proofs to verify transactions instantly and securely.
Click to reveal answer
beginner
Why are Layer 2 solutions important for blockchain adoption?
They make blockchains faster and cheaper to use, which helps more people and apps use blockchain technology without waiting long or paying high fees.
Click to reveal answer
What is the main goal of Layer 2 solutions?
ACreate new cryptocurrencies
BIncrease transaction fees
CReplace Layer 1 blockchains
DImprove blockchain scalability and speed
✗ Incorrect
Layer 2 solutions aim to improve scalability and speed by processing transactions off the main chain.
Which Layer 2 solution bundles many transactions and submits a summary to Layer 1?
AState Channels
BMining
CRollups
DSmart Contracts
✗ Incorrect
Rollups bundle many transactions off-chain and submit a compressed proof to the main chain.
How do State Channels work?
AThey allow multiple off-chain transactions between parties
BThey verify zero-knowledge proofs
CThey create new blocks faster
DThey process transactions on the main chain only
✗ Incorrect
State Channels let parties transact many times off-chain and only settle final results on-chain.
What is a key feature of ZK-Rollups?
AThey use zero-knowledge proofs to verify transactions instantly
BThey assume transactions are valid without proof
CThey increase transaction fees
DThey require manual dispute resolution
✗ Incorrect
ZK-Rollups use zero-knowledge proofs to quickly and securely verify transactions.
Why do Layer 2 solutions help blockchain adoption?
AThey increase the cost of using blockchain
BThey make blockchain faster and cheaper to use
CThey make transactions slower
DThey remove security from blockchain
✗ Incorrect
Layer 2 solutions reduce fees and speed up transactions, making blockchain easier for more people to use.
Explain what Layer 2 solutions are and why they are needed in blockchain.
Think about how blockchains can get slow and expensive and how Layer 2 helps.
You got /3 concepts.
Describe the difference between State Channels and Rollups as Layer 2 solutions.
Focus on how transactions are handled off-chain in each method.
You got /3 concepts.
Practice
(1/5)
1. What is the main purpose of Layer 2 solutions in blockchain?
easy
A. To create new cryptocurrencies
B. To replace the main blockchain entirely
C. To store large files on the blockchain
D. To increase transaction speed and reduce costs by processing off the main chain
Solution
Step 1: Understand Layer 2 role
Layer 2 solutions are designed to handle more transactions faster and cheaper by working off the main blockchain.
Step 2: Compare options
Options A, B, and D describe unrelated blockchain functions, while C correctly states Layer 2's purpose.
Final Answer:
To increase transaction speed and reduce costs by processing off the main chain -> Option D
Quick Check:
Layer 2 purpose = Speed and cost efficiency [OK]
Hint: Layer 2 = faster, cheaper transactions off main chain [OK]
Common Mistakes:
Thinking Layer 2 replaces the main blockchain
Confusing Layer 2 with creating new coins
Assuming Layer 2 stores large files
2. Which of the following is a correct example of a Layer 2 solution?
easy
A. State channels
B. Proof of Work consensus
C. Smart contracts on main chain
D. Mining pools
Solution
Step 1: Identify Layer 2 examples
Common Layer 2 solutions include state channels, rollups, and sidechains.
Step 2: Match options to Layer 2
State channels are Layer 2; Proof of Work and mining pools relate to Layer 1; smart contracts run on main chain, not Layer 2.
Final Answer:
State channels -> Option A
Quick Check:
Layer 2 example = State channels [OK]
Hint: State channels are classic Layer 2 solutions [OK]
Common Mistakes:
Confusing consensus methods with Layer 2
Thinking smart contracts are Layer 2
Mixing mining pools with Layer 2
3. Consider this simplified code snippet representing a rollup process:
A. update() is not a method of dict, use state_channel = update
B. update() is a method but state_channel.update(update) modifies dict correctly, no error
C. update() is a method but should be called with parentheses as done, no fix needed
D. No error, output is 50
Solution
Step 1: Check dict update method usage
Python dict has an update() method that merges another dict into it, called correctly here.
Step 2: Confirm output after update
state_channel's 'balance' key is updated from 100 to 50, so print outputs 50 without error.
Final Answer:
update() is a method but state_channel.update(update) modifies dict correctly, no error -> Option B
Quick Check:
Dict update method works as expected [OK]
Hint: dict.update() merges keys, no error if used correctly [OK]
Common Mistakes:
Thinking update() is not a dict method
Confusing assignment with update method
Expecting syntax error on update() call
5. You want to design a Layer 2 solution that bundles multiple transactions off-chain and submits a single proof to the main chain. Which Layer 2 type fits best and why?
hard
A. Rollups, because they bundle transactions and submit proofs to main chain
B. State channels, because they keep transactions private between participants
C. Sidechains, because they run a separate blockchain with their own consensus
D. Mining pools, because they combine mining power
Solution
Step 1: Understand Layer 2 types
Sidechains run separate blockchains; state channels keep private off-chain transactions; rollups bundle transactions and submit proofs on-chain.
Step 2: Match requirement to Layer 2 type
Bundling multiple transactions off-chain and submitting a single proof matches rollups' design.
Final Answer:
Rollups, because they bundle transactions and submit proofs to main chain -> Option A
Quick Check:
Bundling + proof submission = Rollups [OK]
Hint: Rollups bundle transactions and post proofs on main chain [OK]