poanetwork / RFC

Technical write-ups that describe modifications to the Protocol, DApps, or any significant topic.
3 stars 6 forks source link

Block Reward emission by time #16

Open rstormsf opened 6 years ago

rstormsf commented 6 years ago

Title

  Title: Reward validators by time passed
  Layer: Consensus

Abstract

In order to make a chain consensus agnostic, there is way to reward them by the time passed, not by how many blocks they have validated. Therefore, whenever each block is created, it should save the timestamp and check the diff between last time the block was validated. If there is minimum threshold archieved (5 sec, for example) it should reward next validator from the array list to issue 1 reward (POA). Smart contract should handle the state the order of last rewarded validator.

Rationale

In order to try different consensus algorithms, such as honeybadger BTF, we have to come up with different way to archive validator's incentive.

varasev commented 6 years ago

The BlockReward smart contract has been complemented by the logic described above. It's been done in https://github.com/poanetwork/poa-network-consensus-contracts/pull/133.

varasev commented 6 years ago

Reward by time logic has been moved to separate RewardByTime contract: https://github.com/poanetwork/poa-network-consensus-contracts/pull/140