0
0
Blockchain / Solidityprogramming~10 mins

Rollups (Optimistic vs ZK) in Blockchain / Solidity - Interactive Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to define a rollup type variable.

Blockchain / Solidity
let rollupType = '[1]';
Drag options to blanks, or click blank then click option'
AOptimistic
BZK
CSidechain
DSharding
Attempts:
3 left
💡 Hint
Common Mistakes
Confusing Optimistic with ZK rollups.
Using unrelated terms like Sidechain or Sharding.
2fill in blank
medium

Complete the code to check if a rollup uses zero-knowledge proofs.

Blockchain / Solidity
if (rollupType === '[1]') {
  console.log('This rollup uses zero-knowledge proofs.');
}
Drag options to blanks, or click blank then click option'
AZK
BOptimistic
CPlasma
DStateChannel
Attempts:
3 left
💡 Hint
Common Mistakes
Checking for Optimistic instead of ZK.
Using unrelated rollup types.
3fill in blank
hard

Fix the error in the function that returns the rollup's verification method.

Blockchain / Solidity
function getVerificationMethod(type) {
  return type === '[1]' ? 'Fraud Proofs' : 'SNARKs';
}
Drag options to blanks, or click blank then click option'
ARollup
BOptimistic
CZK
DPlasma
Attempts:
3 left
💡 Hint
Common Mistakes
Checking for ZK instead of Optimistic.
Using generic terms like Rollup.
4fill in blank
hard

Fill both blanks to create a dictionary mapping rollup types to their verification methods.

Blockchain / Solidity
const verificationMethods = {
  Optimistic: '[1]',
  ZK: '[2]'
};
Drag options to blanks, or click blank then click option'
AFraud Proofs
BSNARKs
CPlasma
DSidechain
Attempts:
3 left
💡 Hint
Common Mistakes
Swapping the verification methods.
Using unrelated terms like Plasma or Sidechain.
5fill in blank
hard

Fill all three blanks to filter rollups that use fraud proofs and map their names.

Blockchain / Solidity
const rollups = [
  { name: 'Optimism', type: '[1]' },
  { name: 'Arbitrum', type: 'Optimistic' },
  { name: 'zkSync', type: 'ZK' }
];

const fraudProofRollups = rollups
  .filter(r => r.type === '[2]')
  .map(r => r.[3]);
Drag options to blanks, or click blank then click option'
AOptimistic
Cname
Dtype
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'ZK' instead of 'Optimistic' for filtering.
Mapping the wrong property like 'type'.