PoW with Stake

Karbo Cryptocurrency
6 min readFeb 16, 2019

--

The major concern for small PoW based cryptocurrencies recently has become the availability of sheer amount of hashrate that is not their native but is available for rent. This results in a series of attacks on coins utilizing rented hashrate. There is even the website crypto51.app which collects the theoretical cost of a 51% attack on various networks. The security of PoW is based on the assumption that it is unfeasible to achieve the prevail in a hash rate for a single entity and even if such entity will possess that hashrate it will be economically motivated not to attack network due to its investments in mining infrastructure, which is no longer true.

Karbo share in CryptoNight hashrate dominated by ASICs is just 0.4%

Scott Roberts (aka Zawy) states that “the only thing protecting PoW is the stake of the equipment infrastructure… All the small coins switching to PoW algorithms that can’t be easily rented is an attempt to make miners hold an equipment stake.” [1] “This shows that work in PoW is not equal to security, and secure part of PoW is PoS. If BTC hashrate were rentable (no mining stakeholders) BTC double spends would be easy enough to make it worthless”. [1] He continues, “in Monero’s case, PoW change was not to reduce NiceHash renting (the reason small coins change PoW) but to reduce the effects of ASICs that were in a few hands. So the key idea in both renting and concentrated ASIC problems, is that PoW works by having distributed equipment owners (stakes). It has nothing to do with work (waste). Value is created by work (waste) in BTC, which can be done in PoS. But securing established value is accomplished by risk of value, not waste. When buying equipment, you are locking up a stake just like PoS systems require.” [1]

So we identified a problem in current state of PoW — the lack of security ensured by stake in equipment. Should we switch to PoS then?

In the article “Work is Timeless, Stake is Not” Hugo Nguyen describes the key weakness of PoS and comes to the opposite conclusion. He cites Paul Sztorc as “correctly concluded that PoS is an obfuscated form of PoW” [2] and states that “Proof-of-Stake is a misnomer. The correct, fully descriptive name for Proof-of-Stake should be Proof-of-Temporary-Stake (PoTS). This name is more accurate because it captures the time element, or lack thereof, of PoS.” [2] “The ongoing energy expenditure in PoW contributes to network security in 2 ways:” “Units of work expended in the past accumulate in the ledger. Units of work expended in the future accumulate in the current mining hardware.” [2] He calls this “sort of time-based accumulation phenomenon” as stock & flow. “Bitcoin is essentially protected by high stock-to-flow ratios in 2 areas: the ledger, and the mining hardware”. [2] “In contrast, PoS has no equivalent of this. Past stakes … do not accumulate in the ledger, as stake is released after some arbitrary bonding period. Long-range attack is the manifestation of this weakness: it works because of PoS’s inability to secure the past. Long range attack is at the heart of the problems with PoS, because it shows that in the long run PoS fails to guarantee the integrity of the ledger — the most important asset of all this innovation.” [2] “Future stakes … also do not accumulate in the validators in the present time, as again the act of staking only has meaning within the short window that it occurs — what happens in the future does not count today. Current-private-keys-theft is the manifestation of this weakness: it works because of PoS’s inability to secure the future. Keys theft sidesteps altogether the financial cost supposedly required to acquire controlling stake — whereas in PoW there’s no sidestepping the fact that an attacker needs to overcome the mining hardware and ongoing energy costs to pull off and sustain a majority attack.” [2] “In summary: the further one moves away from the present time in PoS, the faster stake loses its meaning, until stake becomes meaningless. Work is robust against the ravages of time. Stake is not. The fact that the cost of PoW mining is irretrievably sunk and accumulates both in the ledger and the mining hardware, is an important feature, not a bug. PoS research is often based on the fundamental misconception that this is a bug and a source of inefficiency”. [2]

The brilliant solution to the equipment stake deprivation in PoW is proposed by Qi Zhou — to combine PoW and PoS in “Proof of Staked Work ” (PoSW) — a simple hybrid PoW/PoS. “The basic idea is that, if a miner wants to contribute its all hash power to the network (suppose p percent of all hash power of the network), the miner must stake the number of tokens that is proportional to p.” [3]

So we came to obvious, naive and simple solving: add to PoW, what has become missing — a stake.

We propose similar yet different approach without multiplying work by stake as we have concerns that this might be an attack vector and could cause frequent reorganizations and higher orphan rate. Besides, the algorithm can estimate hash power of the whole network via difficulty whereas it is hard to estimate the hashrate of individual miner to adjust his stake requirements. So we set the same minimum required stake for all miners based on difficulty.

In order to mine a block the miner must stake the number of coins that is not less than the current minimum amount which is determined by the difficulty. The preliminary proposal is that the minimum stake in atomic units should be equal to the next difficulty multiplied by factor m. This factor should be defined economically from the current network state and conditions. For start let m = 100000.

A miner forms the coinbase transaction as follows: he sends to himself the amount not less than the required minimum stake and adds fees and block reward. This is enough to prove and verify his collateral stake in a simple way.

There is so called mined money unlock window n, a rule which locks all outputs in coinbase transaction for n blocks. This means that coins from coinbase transaction can be spent only after n blocks. Therefore, to be able to mine blocks successively, miner will have to possess much more money than minimum stake amount for one block, — he will need a stake for each block until his stake for a first mined block is unlocked. This will substantially and even exponentially (because of growing difficulty) increase the cost of 51% attack, the cost of being large miner or running a mining pool since the miner or the owner of the pool will have to acquire sufficient stake.

Coin transferred in a coinbase transaction proves possession without revealing sender and recipient. It can be the same wallet or this allows to keep the stake and reward wallets separate. There is the possibility to lend stake by preparing a stake transaction in which lender sends coins to himself, reward to miner, and part of the reward to himself as a commission for lending, and issues this raw transaction to the miner. The miner can check if he received sufficient reward and use the transaction in the block template.

Instead of daemon, the coinbase transaction with stake has to be created in wallet on request from the daemon or mining software.

It is necessary to mention that this approach evokes concerns of amplifying the centralization of mining in the hands of those who possesses enough stake for large hash rate eliminating small miners and pools. From the other hand, those parties will be economically motivated not to misbehave, and centralization of mining in the hands of motivated investors is deemed better than presence of massive foreign hashrate on other coins with the same PoW algorithm or available for rent without any risks. We bring back the risk, or stake in a coin instead of missing equipment, which is not unique to the coin and can be redirected from other coins or rented.

To sum up, we enforce a stake in a coin in order to mine it, creating a mining membership system, taking this best feature of PoS and strengthening PoW, which in turn protects from PoS weaknesses, because “… you can’t digitally copy equipment like you can stakes. Equipment has to work on a single block at a time. Time-locked PoS stakes can “work” on 1000000 different blocks at a time. PoW’s key is staked equipment, not waste”. [4]

References:

[1] https://twitter.com/zawy3/status/1082199522812612608

[2] https://medium.com/@hugonguyen/work-is-timeless-stake-is-not-554c4450ce18

[3] https://medium.com/quarkchain-official/proof-of-staked-work-ef36f9499279

[4] https://twitter.com/zawy3/status/1096414357683138560

--

--