wow's Studio.

Cryptocurrency by Princeton[2.4]

Word count: 474Reading time: 2 min
2021/04/05 Share

Lecture 2.4: Incentives and proof of work

Assumption of honesty is problematic

Can we give nodes incentives for behaving honestly?

image-20210405145813542

Everything so far is just a distributed consensus protocol, but now we utilize the fact that the currency has value.



Incentive 1: block reward

Creator of block gets to

  • include special coin-creation transaction in the block;
  • choose recipient address of this transaction;

Value is fixed: currency 25 BTC, halves every 4 years.

Block creator gets to “collect” the reward only if the block ends up on long-term consensus branch.(It incentivizes nodes to behave in a way that they think other nodes are going to agree with in creating the next block of the block chain)


There’s a finite supply of bitcoins

Here is the total number of bitcoins in circulation:

image-20210405150602955

Worth noting that this is the only way in which new bitcoins are created, there is no other coin generation mechanism, so this new block creation reward is actually gonna run out.

So does it sound a bit weird? Does that mean that system will stop working and become insecure because nodes no longer have the incentive to bahave honestly? —— There is quite another incentive mechanism.



Incentive 2: transaction fees

Creator of transaction ca choose to make output value less than input value;

Remainder is a transaction fee and goes to block creator;

Purely voluntary, like a tip;


Remaining problems:

  1. How to pick a random node?
  2. How to avoid a free-for-all due to rewards?
  3. How to prevent Sybil attacks?

It turns out that all these problems are related, and all of them have the same solution.

And that solution is called Proof of Work.



Proof of Work

Instead of picking a random node.

To approximate selecting a random node:

select nodes in proportion to a resource that no one can monopolize.

  • In proportion to computing power: proof-of-work
  • In proportion to ownership: proof-of-stake


Equivalent views of proof of work

  1. Select nodes in proportion to computing power;
  2. Let nodes compete for right to create block;
  3. Make it moderately hard to create new identities;


Hash puzzles

image-20210405153718462


PoW property 1: difficult to compute

PoW property 2: parameterizable cost

Nodes automatically re-calculate the target every two weeks

Goal: average time between blocks = 10 minutes

Prob(Alice wins next block) = fraction of blobal hash power she controls


Key security assumption

Attack infeasible if majority of miners weighted by hash power follow the protocol.


Solving hash puzzles is probabilistic

Bernouli trials, approximated by a continuous probability process:

image-20210405155805619

Overall, the network automatically adjusts the difficulty so that the inter block time is maintained at an average long-term of 10 minutes.

For indicidual miner:

mean time to find block = 10 minutes / fraction of hash power


PoW property 3: trival to verify

Nonce must br published as part of block

Other miners simply verify that H(nonce || prev_hash || tx || ... ) < target


CATALOG
  1. Assumption of honesty is problematic
  2. Incentive 1: block reward
  3. There’s a finite supply of bitcoins
  4. Incentive 2: transaction fees
  5. Proof of Work
  6. Equivalent views of proof of work
  7. Hash puzzles
  8. PoW property 1: difficult to compute
  9. PoW property 2: parameterizable cost
  10. Key security assumption
  11. Solving hash puzzles is probabilistic
  12. PoW property 3: trival to verify