---
type: slide
slideOptions:
theme: solarized
---
### Just a smol coredev living in an L2 World
### arbitrum day 2023
<img src="https://hackmd.io/_uploads/SJnP3ZVK3.png" width="300" />
#### *Terence Tsao*
#### Core developer @ Offchain Labs
---
<!-- .slide: style="text-align: left" -->
## Agenda
- My journey from L1 -> L2
- L1 and L2 tradeoffs
- Ethereum
- Arbitrum
- L1 supercharges L2
- Common fallacy in thinking about L2
- L2 forward-looking
---
<!-- .slide: style="text-align: left" -->
## My little journey

---
<!-- .slide: style="text-align: left" -->
## My time spent
```mermaid
pie title
"L1" : 60
"L2" : 20
"MEV": 20
```
---
## L1 versus L2
---
<!-- .slide: style="text-align: left" -->
## L1 Consensus Actors
- Validators
- 700k active, 50k pending
- 32eth / validator
- ~20% of the ETH is staked
- Nodes
- CL + EL clients
- 5000 nodes
- free to run
---
<!-- .slide: style="text-align: left" -->
## L1 Consensus in a nutshell
- LMD-GHOST
- Favors liveness
- New block every 12s
- 50% online -> liveness
- FFG
- Favors safety
- New finalization every 6.4mins
- 66% online -> safety
- One validator, one vote, every epoch
- 1800 msgs/sec (overhead!)
---
<!-- .slide: style="text-align: left" -->
## L1 in action

---
<!-- .slide: style="text-align: left" -->
## Decentralization has a cost
- 6 consensus clients
- 6 execution clients
- Rough governance
- 1-2 big EIPs, 5-10 small EIPs / year
---
## Staking distribution

[beaconcha.in](https://beaconcha.in/pools#distribution)
---
<!-- .slide: style="text-align: left" -->
## L2 Consensus Actors
- Sequencer
- Order txs and emit a feed
- Cannot steal
- Centralized, decentralize later
- Proposer / Validators
- Propose L2 block using feed
- Can steal
- Permissioned, permissionless later
- Challenge game: honest party can **always** win, users can **always** safely exit to L1
---
<!-- .slide: style="text-align: left" -->
## Arbitrum in action

[diagram](https://developer.arbitrum.io/inside-arbitrum-nitro/#sequencing-followed-by-deterministic-execution)
---
<!-- .slide: style="text-align: left" -->
## L2 Consensus in a nutshell
- Sequencer
- Ordering policy:
- FCFS
- Time-boost (soon)
- Centralized
- Participant count: 1
- Liveness assumption: 100%
- Encryption/decryption committee
- Participant count: 1-20
- Liveness assumption 33%-50%
- Validators
- Fraud prove
- Safety threshold: 1 out of N
---
<!-- .slide: style="text-align: left" -->
## Decentralize where it matters
| | L1 validators | L2 sequencer | L2 validator |
| ---- | -------- | --- | -------- |
| multiple implementations |yes|nice to have|no|
| multiple node runners |yes|yes|one active, one defensive|
---
## It's all about trust

https://vitalik.ca/general/2020/08/20/trust.html
---
<!-- .slide: style="text-align: left" -->
## Leverage L1. Don't copy L1
- L1 is fundamentally very different than L2
- If something works well on L1, doesn't mean it'll work well on L2. Some ideas that don't make sense over time:
- PBS
- Front-running / toxic MEV
- Got its principal-agent problems
- Base layer sequencing
- Slow without pre-confirmation
---
## L1 at time looks like

---
## We hope L2 to look like

---
## Why I am bullish on L2
---
## L1 has to make certrain tradeoffs
<img src="https://hackmd.io/_uploads/BJj2UIhYh.png" width="800" />
---
<img src="https://hackmd.io/_uploads/r1KNykkc2.png" width="500" />
---
<!-- .slide: style="text-align: left" -->
## L1 supercharges L2 in three areas
- Scalability
- Security
- Decentralization
---
<!-- .slide: style="text-align: left" -->
## Data sharding
- EIP4844 (Q4/2023)
- Call data -> Blob data
- Target: 32kB/s Max: 64kB/s
- L1 data cost reduction 3-10x
- Danksharding (in 3-5 years)
- Super blob data via data availability sampling
- Target: 170kB/s Max: 340 kB/s
---
<!-- .slide: style="text-align: left" -->
## Ethereum Proof of stake security
- PoW -> PoS
- Reorg can be "seen" on-chain
- Economic finality
- Validators are attributable
- Superior censorship resistance properties
---
<!-- .slide: style="text-align: left" -->
## Faster confirmation rule
- Heuristic on the block will remain canonical under synchronous
- Break when the network does not remain synchronous
- No accountability, a confirmed block can be reorg, and no one is slashed
- Assume adversary < $1/3$ of network
- < 1min latency to confirm
- [Research post](https://www.adiasg.me/confirmation-rule-for-ethereum/)
---
<!-- .slide: style="text-align: left" -->
## L1 on-chain censorship racle
- Heuristic on whether there has been censorship
- Assume % validators are honest
- Count skip slots over $N$ period using a cumulative distribution function
- $Pr(X≤k)=∑ki=0(ni)pi(1−p)n−i$
- Less than 34 missing blocks out of 688 slots (2hrs)
- Confidence $10^-6$
- Equally less than 4 missing blocks out of 225 slots (45mins)
- [Research post](https://ethresear.ch/t/reducing-challenge-times-in-rollups/14997)
---
<!-- .slide: style="text-align: left" -->
## Single-slot finality
- Long-term goal, may not ship until 2025
- Finalize every 12s
- Networking and message aggregation challenges
- [Research post](https://notes.ethereum.org/@vbuterin/single_slot_finality)
---
<!-- .slide: style="text-align: left" -->
## Decentralization: statelessness
- Verkle trie ("Vector commitment" and "Merkle Trees)
- New data structure to reduce data to validate
- Validate data using witnesses. Under polynomial commitment, witness size is small and can be gossip over p2p
- Two testnets are up and running
---
<!-- .slide: style="text-align: left" -->
## Decentralization: bounded historical data
- EIP4444: Stop serving historical data over p2p and locally prune historical data
- Historical data is not necessary for validating new blocks
- Historical blocks & receipts occupy more than 400GB of disk space (and growing fast!)
- To validate the chain, nodes must have a 1TB disk
---
<!-- .slide: style="text-align: left" -->
## L2 in the not-so-far future
- Scalability
- Cost reduction 3-10x
- Security
- Faster L1->L2 messaging
- 1min to deposit
- Faster L2->L1 messaging
- 1-2hrs to withdrawal
- Decentralization
- Running a L2 node becomes more accessible
---
<!-- .slide: style="text-align: left" -->
## L2 open innovations
- EVM+ (Stylus)
- Privacy
- Decentralized sequencing
- Permissionless challenge game
- L3
---
<img src="https://hackmd.io/_uploads/H1VzXkych.png" width="500" />
---
<!-- .slide: style="text-align: left" -->
## Call for actions
- What can L1 do more?
- What can L2/L3 do more?
- What will you build?
---
## Thank you!
### Enjoy the rest of the arbitrum day!
@terencechain
<img src="https://hackmd.io/_uploads/SJnP3ZVK3.png" width="300" />