Rollup, DA, 정산 신뢰가정
도입
DeFi가 L2로 이동하면 gas는 낮아질 수 있지만 settlement risk가 단순해지는 것은 아니다. 사용자는 L2에서 transaction confirmed를 보지만, protocol 운영자는 sequencer inclusion, L1 batch posting, fraud proof 또는 validity proof, withdrawal finality를 구분해야 한다.
Data availability는 rollup에서 특히 중요하다. 데이터가 사용 가능해야 누구나 state를 검증하거나 fraud proof를 만들 수 있다. EIP-4844 blob은 rollup 비용을 낮추는 핵심 변화지만 영구 저장소가 아니다. 강의에서는 blob, DA layer, challenge window를 DeFi product state에 어떻게 반영하는지 다룬다.
학습 목표
- optimistic rollup, validity rollup, DA layer의 신뢰가정 차이를 설명한다.
- blob이 데이터 가용성 비용을 낮추지만 영구 저장소가 아니라는 점을 이해한다.
- DeFi protocol이 L2 finality, challenge window, DA risk를 제품 상태에 반영한다.
개념 설명
| Layer | 사용자에게 보이는 것 | 운영자가 확인할 것 |
|---|---|---|
| Sequencer | 빠른 confirmation | censorship, reorg, downtime |
| DA | batch data availability | blob or DA commitment |
| Proof | fraud or validity assurance | challenge window, proof status |
| Bridge | withdrawal | delay, message finality |
코드로 확인하기
export function finalityLabel(stage: "sequencer" | "batch_posted" | "proof_final" | "withdrawable") { return { sequencer: "L2 included, not settlement final", batch_posted: "data posted, waiting proof or challenge", proof_final: "settlement final for protocol accounting", withdrawable: "user exit available" }[stage];}export function routeRiskScore({ challengeHours, daExternal, sequencerCentralized }: { challengeHours: number; daExternal: boolean; sequencerCentralized: boolean;}) { return challengeHours / 24 + (daExternal ? 2 : 0) + (sequencerCentralized ? 1 : 0);}두 함수는 L2 상태를 사용자 문구와 risk score로 바꾸는 최소 모델이다. 실제 운영에서는 chain별 proof system, bridge contract, upgrade delay, sequencer fallback이 추가된다.
강의 포인트
| 관점 | 확인할 질문 | 증거로 남길 것 |
|---|---|---|
| Finality | 어떤 finality를 말하는가 | stage and timestamp |
| DA | 데이터가 어디에 게시되는가 | DA source and retention |
| Exit | 사용자가 언제 빠져나올 수 있는가 | withdrawal path |
| Product state | 어느 시점에 완료라고 표시하는가 | status copy |
실무 예시
백엔드[OPS] lending position이 L2에서 청산됐다. UI는 즉시 청산 완료처럼 보일 수 있지만, protocol accounting에서는 L1 batch와 proof state를 확인해야 할 수 있다. 특히 cross-chain settlement와 연결되면 destination 지급과 origin finality가 서로 다른 시간을 갖는다.
DeFi product는 "confirmed"라는 단어를 조심해야 한다. wallet confirmation, L2 inclusion, L1 settlement, withdrawal availability는 서로 다르다. 사용자는 빠른 상태를 원하지만 운영자는 정확한 상태를 남겨야 한다.
흔한 오해와 실패 시나리오
| 오해 | 실패 시나리오 | 교정 방식 |
|---|---|---|
| L2 confirmed는 final이다 | withdrawal이나 dispute에서 지연이 생긴다 | finality stage를 나눈다 |
| blob은 영구 저장이다 | retention과 availability를 혼동한다 | DA와 archive를 분리한다 |
| 모든 rollup risk는 같다 | proof system과 DA choice가 다르다 | chain별 trust sheet를 만든다 |
| bridge delay는 UX 문제다 | accounting과 solvency에 영향을 준다 | product state에 반영한다 |
실습 과제
- Finality timeline 만들기: user confirmation, sequencer inclusion, L1 batch posting, challenge or proof finality, withdrawal availability를 timeline으로 작성한다.
- DA risk scoring 작성하기: DA option, challenge window, withdrawal delay를 받아 DeFi route risk score를 계산한다.
완료 기준
- L2 finality와 L1 settlement finality를 분리한 timeline을 만들었다.
- DA 선택지가 protocol withdrawal, oracle, bridge risk에 미치는 영향을 설명했다.
근거 자료
- 12 Infra and L2
- EIP-4844
- Celestia Data Availability FAQ