Skip to content

Lesson 7 · 4 min · Intermediate

Smart contracts, tokens and the scaling problem

On this page

Smart contracts, tokens & the scaling problem

A smart contract is code deployed on a blockchain that executes automatically when called. Tokens are assets issued via smart contracts on top of an existing chain (ERC-20 on Ethereum), as opposed to a coin with its own chain.

Blockchains face a scalability trilemma: it’s hard to maximize decentralization, security, and throughput simultaneously. A base layer (Layer 1) prioritizes security and decentralization, which caps throughput. Layer 2s (L2s) add throughput by processing transactions off the base chain and settling compressed results back to it, inheriting L1 security.

The two rollup families

The dominant L2 pattern on Ethereum is the rollup, which batches many L2 transactions and posts them to L1.

  • Optimistic rollups (e.g. Arbitrum, Optimism, Base) assume transactions are valid and allow a fraud-proof challenge during a challenge window (roughly 7 days). To withdraw back to L1 you either wait out the window or use a faster (fee-charging) bridge.
  • ZK rollups (e.g. zkSync, Starknet, Linea) post a validity proof with each batch — a cryptographic guarantee the batch is correct. No challenge window is needed, so withdrawals can be faster once the proof is verified.

Two ways a rollup settles on Ethereum

Layer 2txtxtxtxtxtxtxtxsequencer orders and batchesOptimistic rollupArbitrum, Optimism, Basebatch postedassumed validchallenge window · ~7 daysanyone can submit a fraud proofwithdraw after the window,or pay a fast bridgeZK rollupzkSync, Starknet, Lineabatch + validity proof postedproof verified on L1withdraw once verifiedLayer 1 · Ethereum
Both families batch L2 transactions and post them to Ethereum. An optimistic rollup is trusted unless someone proves fraud within the challenge window; a ZK rollup proves each batch correct up front, so it needs no window.

Bitcoin’s Lightning Network is a different kind of L2: a network of bidirectional payment channels that let two parties transact off-chain and settle the net result on-chain. It’s optimized for fast, cheap payments rather than general computation.

L2 risks

  • Sequencer centralization — many rollups run a single sequencer that orders transactions; a faulty or censoring sequencer is a trust point. Force-inclusion mechanisms let users bypass it.
  • Bridge risk — moving assets between chains relies on bridges, which are historically a major attack target.
  • Withdrawal latency — optimistic rollup exits take a challenge window unless you pay for a fast bridge.
  • Data availability — if rollup data isn’t retrievable, users can’t reconstruct state or prove fraud.

Gas on L2s — the native-token rule

Every chain requires its own native token to pay gas — even on an L2. Pick a chain and an asset you hold, then say whether you also hold the gas token. Watch what happens to your ability to move the asset.

Chain
Arbitrum (L2)
L1 or L2?
L2 (settles to Ethereum)
Gas token required
ETH
USDT availability on Arbitrum (L2)
Bridged representation (bridge risk)
You can move the asset
You have both USDT and enough ETH for gas on Arbitrum (L2), so the transaction will go through. (If USDT is a bridged representation here, also remember it carries bridge risk — see the Cross-chain transfer lab.)

Takeaway: an L2 inherits security from its L1 but runs its own execution, so it charges fees in its own gas token — usually the L1 native asset bridged over (e.g. ETH on Arbitrum/Base). Holding a stablecoin does not mean you can move it.

Where to go deeper

Read the original Bitcoin whitepaper for PoW, and Ethereum’s docs for account-model transactions and gas. The Major Networks & Assets unit covers Bitcoin, Ethereum, and multi-chain Tether in detail.

Key takeaways

A one-page summary of The Technology Behind It. Print it for quick reference.

  • A blockchain is an append-only ledger of blocks, each linking to the previous block’s hash — making it tamper-evident (immutable).
  • Keys: private key (secret, signs), public key (verifies), address (shareable, derived from public key).
  • Consensus: PoW (miners compete on computation) vs PoS (validators stake collateral).
  • Transactions wait in the mempool, get included in a block for 1 confirmation, and gain finality with each subsequent block.
  • Bitcoin uses UTXO; Ethereum uses the account model; fees are paid in the chain’s native token (BTC / ETH).
  • OP_RETURN is Bitcoin’s sanctioned data carrier: a provably unspendable output holding up to ~80 bytes of data — used for proofs-of-existence, token overlays like the original Omni-based USDT, and anchoring; Ordinals inscriptions use Taproot witness data instead.
  • Layer 2s scale throughput by settling to L1: optimistic rollups (fraud-proof challenge window) vs ZK rollups (validity proofs), plus Bitcoin’s Lightning.

Unit check

80% to complete this unit
5 questions

Pass the unit check (4 of 5) to complete this unit.

Educational only, not financial or legal advice.