Showing posts with label Delegated Proof of Stake. Show all posts
Showing posts with label Delegated Proof of Stake. Show all posts

Monday, October 19, 2015

Gaming Proof of Stake

While working on a draft for a paper for the upcoming Ledger academic journal I came across the concept of "stake grinding". After considering this problem for awhile, I think I came up with a neat solution to it under some specific conditions. Lets discuss...

Proof of Stake and Stake Grinding


Proof of Stake is an alternative block generation algorithm to Proof of Work. In it, blocks are not generated by mining pools roughly in proportion to the computing power they hold, but by block producers / minters / notaries or however you want to call them roughly in proportion to the amount of coins they own / stake.

In PoW, blocks are created at random whenever a solution is found, making the network block creation time somewhat random and unpredictable.

In PoS, the blocks can be generated on a more fixed schedule since once a block is created there is no randomness as to who should create the next block - the minter is picked using the randomness inherent in block creation and the balances in the network.

However, if we use a naive implementation of PoS, we open ourselves to the block minters grinding the block to ensure they are also the creators of the next block or some other block in the future (say, if you use a scheme where a block minter is selected by an entropy from 100 blocks back). If you have only one attacker grinding the blocks, they will eventually become the only entity creating the blocks no matter how small their balance is. Since honest minters would select them to mine the blocks every now and then and the attacker would make sure their blocks nominate them to be the minters with 100% certainty, they will be minting more and more blocks.

From what I could find (see section 6.4), stake grinding has been used on a few systems like NXT or Peercoin with success, forcing the networks to abandon the naive approach.

Potential solutions


There are a few solutions to stake grinding. Peercoin appears to have adopted a hybrid PoS-PoW model to make grinding less trivial. BitShares used a Delegated Proof of Stake where the block minters each get to create one block before the order is reshuffled and everyone gets another turn - an interesting approach, but it treats a minter with 50% of support the same as one with 10% of support.

Now, there might be a way to implement Proof of Stake in such a way as to avoid the grinding problem altogether and reward all minters in proportion to their stake / support. It is inspired by CGP Grey's video on Mixed-Member Proportional Representation voting system (a part of his very interesting series "Politics in the Animal Kingdom"):




In the new scheme, we would need to create a list of all minters that want to participate in the block creation process and figure out their weight based on the amount of stake / support / votes they represent. The list would have to be locked in for a certain minting period, similarly to BitShares' implementation. Given this information, we can start creating blocks in a deterministic fashion. Each block minter would be chosen based on who is the most underrepresented in a given minting period. They would be chosen to be the next block minter. After a new block is created, the representation is updated and the next minter is chosen in the same fashion. You could also deterministically break up large chains of blocks being created by the same minter to prevent 51% attacks, or implement a punishment algorithm for creating forks.

This approach would both eliminate grinding and give fairer rewards than DPoS.

Sunday, May 31, 2015

BitShares - probably the first self-sustaining DAO

BitShares - probably the first self-sustaining DAO

For over a year, the Bitcoin world has been intrigued with the concept of Decentralized Autonomous Organizations - quasi-corporations following known and predictable set of business rules dictated by the software itself. While in the future we might have AIs running everything, for now human involvement in software development and other functions necessary for the DAOs to sustain themselves.

Vitalik Buterin's Quadrant Chart for Classifying DAOs

While most cryptocurrencies do form a quasi-DAO, to the best of my knowledge BitShares appears to be the first system to be a fully self-sustaining DAO. Lets explore why this might be the case.

What does a DAO need?


While there are a lot of characteristics a DAO has, we should figure out what a DAO, or any decentralized software-based system wants and needs.

While some might see this as anthropomorphizing a non-living piece of software, we can probably agree that any DAO-like system wants to first of all fulfil the role it was created to perform (in the case of cryptocurrencies - to facilitate transfer of wealth between individuals), and secondly - the system would want to accomplish anything to allow it to continue its first role as long as it is needed.

To accomplish the latter goal, the software needs to be updated, new blocks need to be created, and the system itself needs to become more ubiquitous.

Now, how can a DAO fulfil its needs? Well, it can reward the people that work on the system. If we're talking about cyrptocurrency systems, money is usually a good motivator.

Examining the incentives


We already discussed the problem some systems have with incentives in a previous post. Here, I would like to discuss how various examples of cryptocurrency systems reward its participants.

Bitcoin is probably the most notable early example of a quasi-DAO. It rewards its miners with a block reward and transaction fees, ensuring new blocks are created for years to come. Bitcoin however does not create a direct incentive for software developers to update its software, or for businesses to offer new products on the platform. Sure, there are plenty of non-direct incentives - anyone holding BTC is incentivized to make the value of BTC appreciate so they stand to profit, but that happens external to the Bitcoin software itself.

In a system like Ripple, where the fees are burned and there is no token creation, only the XRP holders are indirectly incentivized to keep the system going - the validators are not paid, nor are the developers.

When looking at a proof-of-stake systems like Peercoin, we have the coin holders that are incentivized to create new blocks, but again, no other direct rewards go to anyone else.

Now, when we look at BitShares and its Delegated Proof of Stake, we see something different. While it's still the block "miners" / delegates that get the reward, who gets to be that delegate is a different story. Unlike proof-of-work or proof-of-stake, anyone that the BitShares coin holders elect can become a delegate and be rewarded for it. If the software needs updating - the core developers will be voted in and paid for their work. If the system needs evangelists - the right people for the job will get the rewards, etc. As it stands, it looks like the system can be fully self-sufficient using this simple reward system.

So while the DPoS implementation in BitShares might not be without its flaws, the concept does lend itself to solving a lot of the problems a cryptocurrency system might have in a simple fashion.

Lastly, this process is no longer unique to BitShares. Stellar introduced a similar method for distributing its token inflation.

Conclusions


While there are a lot of systems out there that act like a quasi-DAO, BitShares seems to be the first one to become fully self-sustaining due to its Delegated Proof of Stake.