The Promises and Challenges of Ethereum Off-Chain Scalingethis.unitimes.pro/file/1472538728349439....

Post on 06-Jun-2020

0 views 0 download

Transcript of The Promises and Challenges of Ethereum Off-Chain Scalingethis.unitimes.pro/file/1472538728349439....

The Promises and Challenges of Ethereum Off-Chain Scaling

Xiaozhou Li Celer Network

Internet (web 2.0) vs. Ethereum (web3.0)

global information transfer global value transfer

One second:70K Google searches,millions of emails and messages, 60TB data transfer ……

One second:10 transactions

global information transfer global value transfer

One second:70K Google searches,millions of emails and messages, 60TB data transfer ……

One second (goal):??? transactions

Can Ethereum match the scale of Internet?

global information transfer global value transfer

One second:70K Google searches,millions of emails and messages, 60TB data transfer ……

One second (goal):hundreds of millions or billions of transactions

Can Ethereum match the scale of Internet?

Billions of TPS

How could we ever get there?

Scalability

On-chain Limit

Mass Adoption

Efforts

Where we are

blockchain

dApps

blockchain

Scalability

On-chain Limit

Mass Adoption

Efforts

Where we are

off-chain scaling

dApps

How does off-chain scaling work?

off-chain transfer on-chain settle

Concepts: state channel, sidechain Only resort to on-chain consensus when absolutely necessary

Secure: blockchain acts as the “supreme court”

Fast: independent operations across nodes, fully scale-out

Private: most activities only seen by participants

Example: off-chain payment channelOn-chain bond contract

Deposi

t 10 E

THDeposit 10 ETH(2 on-chain transactions)

Example: off-chain payment channelOn-chain bond contract

(N off-chain transactions)

$X $Y#n

Balance Proof

Example: off-chain payment channelOn-chain bond contract

Subm

it sta

te pro

of

(On-chain settlement)

agree

$5

$15

#47

Example: off-chain payment channelOn-chain bond contract

disagreeSu

bmit

state

proof

(On-chain settlement)

$5

$15

#47

$2

$18

#49

Example: off-chain payment networkOpen up great opportunities for ultra high throughput p2p micro-payments

Example: off-chain chess duelOn-chain bond contract

0.1 ETH if Alice wins

0.1 ETH if Bob winsAlice Bob

Example: off-chain chess duelOn-chain bond contract

State Proof

Example: off-chain chess duelOn-chain bond contract

0.1 ETH

Win! Cooperative

Zero on-chain operations when everyone is cooperative

Example: off-chain chess duelOn-chain bond contract

Win! Uncooperative

Only resort to on-chain consensus when absolutely

necessary

Dispute

State

Proof

Bright future, challenges remain

• How to support generic operations with minimal on-chain footprint?

• How to route value transfers efficiently in off-chain networks?

• How to help developers to easily build and operate off-chain dApps?

• How to make off-chain states always available for on-chain disputes?

• How to obtain enough liquidity to run an off-chain service?

Celer Network

cStack

cEconomy

Celer ArchitectureCeler Network is an Internet-scale, trust-free, and privacy-preserving platform where everyone can quickly build, operate, and use massively scalable decentralized applications. 

Blockchain

dApps

Celer Network

cChannel

cOS

cRoute

cStack

+

cEconomy

State Guardian Network

Proof of Liquidity Commitment Mining

Liquidity Backing Auction

cChannel: Generalized dApp Support

• Generic off-chain state transitions o conditional payment o multiparty gaming o second price auction o high frequency exchange o ...

• Pure off-chain contract o no on-chain deployment when everyone cooperates

• Multi-hop state relay

• Formal specification and verification

cChannel

cOS

cRoute

cStack

cChannel: Generalized dApp Support

cChannel

cOS

cRoute

cStack

on-chain stateoff-chain state state dependency

Alice will pay Bob 1 ETH if Carl

wins

Bob will pay Carl 1 ETH if Carl

wins

Alice <---> Bob Bob <---> Carl

Alice vs. Carl

cRoute: Highly Efficient Payment Routing

• Provably optimal throughput

• Transparent channel balancing

• Fully decentralized

• Failure resilience

• Privacy preservingcChannel

cOS

cRoute

cStack

Why off-chain payment routing is challenging?

• Link state changed by every payment

• Max rate ranges from zero to infinity

• Network is constantly changing

X Ybalance of

Xbalance of

Yoff-chain channel

• Link state not affected by past transmissions

• Max rate is fixed (e.g., always 1Gpbs)

• Network is relatively stable

X Ybandwidth

data network link

Off-chain payment networks are fundamentally different from data networks

Most distributed routing algorithms for data networks are hard to converge in off-chain networks

cRoute: Highly Efficient Payment Routing

cChannel

cOS

cRoute

cStack

Forwarding Layer: Distributed Balanced Routing (DBR)

Policy Layer: Flexible Policy Configuration and Enforcement

Overlay Layer: Privacy-Preserving Onion Routing

cRoute Simulation Results

77 nodes 254 bi-directional payment channel Poisson arrival with random src-dst

Payment throughput Channel utilization

cOS: Development Framework and Runtime

• Provide common design patterns

• Enable “write once, run anywhere”

• Bridge on-chain and off-chain byte code

• Figure out state dependencies

• Track and dispute off-chain states

• Support concurrent off-chain dApps

cChannel

cOS

cRoute

cStack

cOS: Development Framework and Runtime

cChannel

cOS

cRoute

cStack

Scalability does not come for free!

Off-chain scaling is introducing new tradeoffs

Bright future, challenges remain

• How to support generic operations with minimal on-chain footprint?

• How to route value transfers efficiently in off-chain networks?

• How to help developers to easily build and operate off-chain dApps?

• How to make off-chain states always available for on-chain disputes?

• How to obtain enough liquidity to run an off-chain service?

Celer Network

cStack

cEconomy

cEconomy completes the off-chain ecosystem

State Guardian Network

Proof of Liquidity Commitment Mining

Liquidity Backing Auction

disagree

Settl

e

sync

Offline

$5$1

5

#47

$2 $18#49

Ensure off-chain states are always available for on-chain disputes

State Guardian Network

Proof of Liquidity Commitment Mining

Liquidity Backing Auction• Off-chain service providers crowdsource liquidity • Reward committed liquidity backers • Ensure 100% safety for end users

cEconomy completes the off-chain ecosystem

Incentivize an abundant and stable liquidity pool

Build and operate Internet-scale dApps on Celer Network

Blockchain

dApps

Celer Network

cChannel

cOS

cRoute

cStack

+

cEconomy

State Guardian Network

Proof of Liquidity Commitment Mining

Liquidity Backing Auction

Thanks!www.celer.network