Post
Topic
Board Altcoin Discussion
Re: PoS is far inferior to PoW - why are so many people advocating switching to PoS
by
CoinHoarder
on 13/11/2014, 23:09:41 UTC
More discussion about NaS attack: https://bitsharestalk.org/index.php?topic=6638.0

"Short fork" differences;
Quote from: arhag
POW systems resolve the forks by agreeing to build on the chain with the most work done (the sum of the difficulty values at each block up to current head block in the blockchain). If everyone follows this rule, eventually all the nodes will come to a consensus on one particular chain, thus resolving the fork.

Peercoin-like POS systems can resolve the fork by building on a chain with the most amount of some other metric, like the total amount of coin-age consumed. Again, as long as everyone follows the same rule, the network will eventually naturally converge to just one of the forks.

Although, DPOS is able to randomize the order of delegates within a round, the order of the delegates in a given round is known prior to any of the delegates producing blocks in that round. For this reason, block production order can be considered deterministic. Nevertheless, very small forks could be possible because of network issues. For example, if block N is delayed by the network for too long, the producer of block N+1 might assume that the producer of block N was not available to produce his block at his designated time slot, so instead will chain off block N-1. The producer of block N+2 may have seen block N and/or block N+1. If he saw both, he always chooses the one that is supposed to come later in time, on the other hand if he sees only one or the other, he builds off of the one he saw. Thus, the chain is built with either block N or block N+1 considered missing, but the network is able to quickly get back to a consensus on the true chain because of the deterministic ordering of block producers.
Since "if he saw both, he always chooses the one that is supposed to come later in time", stakeholder 101 could choose not to include any of the previous 100 blocks because they were "too late".

There are only 101 stakeholders that matter in bitshares, I suppose the rest can all suck on a salty sausage? In which case, you really don't need anywhere near 51% of the stake, you only need enough so that you are wealthier than the next 50 wealthiest combined stakers. (Or had it within six months in the past.)

Basically, I have no idea what's going on here, it sounds pretty unworkable.
As to the bolded, yes it is obvious you have no idea how DPoS works and thus you cannot comprehend its vulnerabilities accurately. People that write about the subject as if they have some understanding of how everything works (but in reality they don't), is the main reason for all of the misinformation about PoS. Stuff like that leads people like the OP to conclude that "PoS is far inferior to PoW" by making that deduction on misinformation. Do everyone a favor and try to understand something before claiming it is insecure or that it won't work.

1. There are likely many more than 101 stakeholders as anyone that owns a fraction of a coin has a vote which decides who the 101 elected delegates will be. That vote is directly proportional to the amount of tokens they own. Technically (assuming all stakeholders vote) you need 51% of the currency supply to have total control of which delegates get elected.

2. A "round" is only applicable to predetermining the order that the delegates will produce a block in each "round" of 101 blocks. Thus, Arhag's reasoning still applies in the example you give of the last delegate in a round acting in a nefarious manner... the 102nd delegate (or N+1 as in Arhag's post) would submit two blocks, their block and a replacement for block 101, and the network would choose the last block provided as the valid one. What you proposed as being a vulnerability is simply not.

"Long fork" differences;
Quote from: arhag
POW resolves this issue by using the same method used to resolve short forks: pick the chain with the most work done. Attackers have no way of faking the block acceptance criteria. They need to put in the work necessary to match the difficulty requirements at that point in the blockchain. Attackers can create a fake blockchain history by putting in the necessary work, but if they have less than <50% hashing power, their accumulated amount of work will be less than the accumulated work of the true chain. As long as the true chain is made visible to the resyncing user, he can easily pick it over the fake chains.

POS tries to resolve this issue by also making it difficult for attackers to fake the block acceptance criteria. In the case of Peercoin-like POS systems, it needs to be difficult for attackers to get coin-age (which is ultimately dependent on the amount of stake in the attacker's control). In the case of DPOS, it needs to be difficult for the attacker to get control of the delegates. Because of the way delegates work, the attacker would actually need to control nearly all of the 101 delegates to fake the blockchain history (see here and here for details). However, if the attacker controlled more than 50% of the stake, he could vote in all of his own delegates. So all POS systems are ultimately vulnerable if the attacker is able to get the majority of the stake. For a POS system to be secure from fake blockchain history attacks, the majority of the stake in the system needs to be kept away from the control of an attacker during the time a user is offline. However, if an attacker was able to capture only a small minority of the stake while the user was offline, the attacker cannot create a fake blockchain that the user would accept as valid.

POW supporters like to point out that the attacker does not need to control >50% on a live system; as long as an attacker controls >50% of the stake at any point in time t on the blockchain, that attacker could easily build a fake blockchain from that point forward that would fool a user's client if its last resync point was before time t. For a completely new user synchronizing from the genesis block, this means the attacker only needs to control >50% of the stake at any point in time in the history of the blockchain. This is the meaning behind the Nothing-at-Stake name. The users who owned >50% of the stake in the system in the past, may no longer own any stake in the system in the present. While it would be foolish for a present-day >50% stake holder to harm the network, someone who held >50% of the stake in the past but holds nothing at stake in the present has nothing to lose with an attack attempt.

As bad as this may look for POS systems, with more careful analysis, it is clear it is not actually a problem. A user in a POS system will always have a checkpoint in the not-too-distant past. This checkpoint either comes from the last block of the locally-saved, trusted blockchain (or perhaps just the locally-saved hash of the last seen block), or it can be hardcoded into the particular version of the wallet. As long as that checkpoint is in the not-too-distant past, users would not be vulnerable to fake blockchain history attacks in realistic scenarios. If the checkpoint is older than some threshold, then other measures are needed. This threshold can vary depending on the circumstances of the network and the paranoia of the user, but I think a threshold of 6 months is sufficient in most realistic scenarios.

Resyncing after being offline for less than 6 months should not be a cause for concern of fake blockchain history attacks. The only way such an attack can successfully work is if the attacker obtains ownership of >50% of the stake existing at some point during that 6 month period. The attacker would like to buy old private keys at very low cost from users who had stake in the system in the 6 month period but now no longer do. They have to no longer have stake in the system otherwise they would be foolish to sell old private keys to someone whose only purpose for buying old keys is clearly to attack the system and thus reduce the value of the seller's existing stake. But the attacker will not be able to find enough private key sellers that match that criteria, because it is extremely unlikely for stakeholders with >50% of the stake to completely exit out of the system within a 6 month period. The attacker is forced to legitimately buy into the system at a high cost if he wants to attack the network. But an attacker who grows his stake over some period of time until it reaches >50% would likely not attack the network while still holding the stake, otherwise they would cause the most damage to themselves. If the attacker is able to begin and finish selling their >50% of stake during that 6 month period, then the attacker has the opportunity to carry out a fake blockchain history attack against the victim who was offline for 6 months. However, the price one pays trading assets depends on how quickly they need to finish the trade. The attacker can take his time building up the stake to not have to overpay in order to incentivize stake holders to sell, but he is forced to sell at a discount to incentivize enough people to buy to quickly sell off his stake before the 6 month deadline. Pulling off this kind of buy-sell cycle is going to cost the attacker a lot of money. It is only rational to do this if this one buy-sell cycle provides him with enough opportunity to recover his costs through double-spend attacks. But the only people he can attack are people who were offline for about 6 months. Most people would be resyncing at much higher frequencies than that, which would be really hard to attack. Trying to sell >50% of stake in one week would cause a flash crash of the price of the coin (hurting the attacker the most). Also, from a practical manner, the attacker doesn't have any good way of knowing who has been offline during the same time period they set up the buy-sell cycle to actually target these individuals. So, even if there are a decent number of people out there that the attacker could target to make his money back, it isn't trivial to identify them.

So what about resyncing after being offline for more than 6 months? With the exception of resyncing from a genesis block on a new computer, it would be a very unusual circumstance to be doing this. The vast majority of people would be resyncing on a much more frequent basis. Nevertheless, in these rare cases, users would follow the same procedure that users who are resyncing from a genesis block on a new computer would follow. First, if the user already has an up-to-date blockchain on one computer and they just want to set up their wallet on a new computer, the clients could provide an easy method for the existing trusted client to communicate a hash of a recent block to the new client. Since a user obviously trusts himself and the client he has already been using, he can carry over that trust to the new device. What about a completely new user who has never been part of this network before? Or someone who lost their hard drive (but still has a backup of their private keys) and wants to reinstall the client from scratch on their computer? In these cases, the users would rely on the snapshot hardcoded in the latest version of the client software (which would be <6 months old). A new user needs to download the client software anyway; and, they need to have some way of trusting the software they download. If the attacker was able to provide a fake client with a fake snapshot, they would again be vulnerable to the fake blockchain history attack. But if the attacker was able to provide a fake client, the user would be compromised in so many ways. The fake client could just steal the user's private keys! Or if they are using a hardware wallet, the fake client could present a false view of the blockchain to make the user think he got paid when he didn't.

Bolded favorite parts.
Not-too-distant-past = 6 months.
All the delegates in a given cycle = 101.

I think this is a great illustration of how much simpler and easier it is to reason about the security of Bitcoin, and how all the complexity of PoS gives the illusion of security (Bitshares in this case).

I look forward to casting off the yolk of Congress and the Fed in favor of my 101 overlords. /sarcasm

Again, you don't seem to comprehend DPoS or its vulnerabilities. I suggest you re-read the DPoS white paper and Arhag's posts explaining possible attack vectors before commenting on them further.

You seem to think that the check points are put in every 6 months. This is incorrect as checkpoints are written into the block chain every 10 seconds with every block containing a hash of the previous block, and also with every software update. This type of long range NaS attack is unreasonably possible due to the necessary set of conditions that need to exist for one to use this attack vector. Anyone with an updated client would be invulnerable to the NaS attack. It would only be possible if ALL of the following conditions are met:

1. Someone obtains the private keys to addresses which owned 51% of the money supply at some point in the chain's history.
2. The victim(s) has not updated their client and there has not been any client updates since that certain point in time.
3. The attacker is able to identify victims that have not updated their client since that certain point in time. FYI- there is no easy way to do this short of infecting the whole internet with trojans or something similar. IE... there is no easy way for the attacker to identify who has a recently updated block chain and who doesn't.

Optionally, the attacker could create a fake client that does all of the above (they would still need 51% of the money supply at some point) to perform this attack. This risk can be mitigated by users taking proper security procedures such as verifying the signature of updates and only downloading them from trusted sources (IE. the Bitshares website). Also, as Arhag mentioned, if someone created a fake client they could simply steal the victim's private keys instead of doing an elaborate attack that would require 51% of the money supply at some point in the chain. So in this case the NaS attack would be silly to perform as it is in the attackers best interest not to go through all that trouble.

By the way, I am not going to act like I am an expert because I am not. I realize it is hard to understand exactly how consensus algos work and the possible attack vectors, as I myself have a hard time comprehending everything. I do know and comprehend enough of DPoS though to be able to tell when someone is blatantly wrong in their assessment of it. This goes for anyone... if you see I have some error in my reasoning or understanding then please feel free to point it out. I learn something new every time I visit cryptocurrency forums and that is exactly why I am here... to learn. I believe I have a general understanding of DPoS and possible attack vectors though... at least a better understanding of it than you (at the moment.) Tongue

If everyone could achieve a basic understanding of how the different PoS algos function and possible attack vectors BEFORE TALKING ABOUT THEM, the spread of misinformation on these forums would not be as bad as it is today. These forums act like an echo chamber.. what one person reads from someone respectable, they take it as being true if and then repeat it to others on other threads. It is very dangerous to talk about something as if you understand it when in reality you don't. Most of the people I debate about PoS on here, I eventually find out sooner or later that they have some sort of misunderstanding of how it works and thus how "insecure" it is.