NPoS

Antonio

yanganto@github

yanganto@itering.com

2020/03/24

Nominated Proof-of-Stake

An efficient consensus

Take Back Web

By participate in

Role in Web

  • Content/Service Provider
  • Content/Service Consumer
  • Infrastructure Provider

Benefit as Infra Provider

  • Share security on chain
  • Server location as you need

Join the Web

And more deep in

Techical View

Technical Evolution

Before Web Web 1, 2 Web 3
Application Program App Dapp/
Smart Contract
Abstract OS & ABI Service & API  Runtime/
EVM
Infra Bare Metal  Servers Consensus Network

Consensus Network

  • Multiple servers by different ownner → Network
  • Work together → Consensus

Consensus

  • One node at one slot
  • PoW - By power of work competition
  • PoS - By turn from nodes with Staking
  • NPos - By turn from a small group

Problems

a small group but decentralized

Role in NPoS

  • Validator
  • Nominator
  • Chill

One to Many

Easy, But Not  Fair

16

6

8

4.5

5.5

4 Validators

  • Secure
    • Distribute to Fair
    • Total Maximize

Not Fair

11

11

10

8

14

14

6

6

Total: 40

Total: 40

Not Fair / Fair

9

9

6

6

10

10

9

9

14

14

6

6

Total: 30

Total: 40

Total: 37

Fair

Total: 40

Total: 37

Phragmen

  1. Find validator
    • base on score (votes * staking value)
  2. Redistribution the budget(votes * staking value)
    • balance on staking of validator and try to fair

Following not real equation
but it helps you to memorize

Example 

Winner:

Assignments:

Example 1

Winner:

Assignments:

  • Validator view: 1:3
  • Half Fair: 1:1.5
  • Result:  1.5 : 1 (3:2)

Staking:1, 1000, 3000, 1, 1, 1000

Vote: (1), (2), (3), (1,2), (1,3), (2,3)

Example 2

Winner:  [(3, 5001), (2, 2001)]

Assignments:  [

(2, [(2, Perbill(1000000000))]),

(3, [(3, Perbill(1000000000))]),

(10, [(2, Perbill(1000000000))]),

(20, [(3, Perbill(1000000000))]),

(30, [(2, Perbill(666555575)), (3, Perbill(333444425))])]

 

Staking:1, 1000, 4000, 1, 1, 1000

Vote: (1), (2), (3), (1,2), (1,3), (2,3)

  • Validator view: 1:4
  • Half Fair : 1:2
  • Result:  2 : 1 

Example 3

Winner:  [(3, 6001), (2, 2001)]

Assignments:  [

(2, [(2, Perbill(1000000000))]),

(3, [(3, Perbill(1000000000))]),

(10, [(2, Perbill(1000000000))]),

(20, [(3, Perbill(1000000000))]),

(30, [(2, Perbill(714183689)), (3, Perbill(285816311))])]


Staking:1, 1000, 5000, 1, 1, 1000

Vote: (1), (2), (3), (1,2), (1,3), (2,3)

  • Validator view: 1:5
  • Half Fair : 1:2.5
  • Result:  2.5 : 1 

714183689/285816311 = 2.49875063638338

 

Example 4

Winner:  [(3, 7001), (2, 2001)]

Assignments:  [

(2, [(2, Perbill(1000000000))]),

(3, [(3, Perbill(1000000000))]),

(10, [(2, Perbill(1000000000))]),

(20, [(3, Perbill(1000000000))]),

(30, [(2, Perbill(749906262)), (3, Perbill(250093738))])]

 

Staking:1, 1000, 6000, 1, 1, 1000

Vote: (1), (2), (3), (1,2), (1,3), (2,3)

  • Validator view: 1:6
  • Half Fair : 1:3
  • Be Fair:  3:1

Operation Details

Benefit & Duty

Validator

  • Producing Blocks
  • Bound Valuable
  • Set benefit ratio
    • validator : nominator
  • Slash when fail, then become chill

Nominator

  • Chose the better Validators
  • Bound Valuable
  • Slash when validator fail

Darwinia

Dual Token Staking

Ring

  • General valuable
  • Bound 3 ~ 36 months to get Kton
  • 10000 Ring 1 year → 1Kton
  • Now & Future

Kton

  • Long term valuable
  • Pay for unbound penalty
  • Past

Why we concern Past ?

Votes & Benefit

  • Hard Threshold of Ring
  • Rule of Benefit Distribution
    1. Half for Ring, Half for Kton
    2. Validator First
    3. Nominator After

Thanks for listening

Join Darwinia

And more deep in

NPoS

By Antonio Yang

NPoS

Darwinia Web seminar LICENSE: CC-BY-SA-ND yanganto@gmail.com

  • 781