peerplays-network / pips

PeerPlays Improvement Proposals
12 stars 3 forks source link

[In Editing] GPOS 2.0 #10

Open jonathanbahai opened 3 years ago

jonathanbahai commented 3 years ago

GPOS 2.0

PIP: 10
Title: Gamified Proof of Stake 2.0
Authors: Jonathan Baha'i <jbahai@freedomledger.com>
Status: Draft
Type: Informational
Created: 20-12-21

Gamified Proof of Stake was created with the intent of creating greater engagement in the voting process of proof of stake consensus in order to ensure greater security and better alignment of incentives.

The current implementation of GPOS in Peerplays has demonstrated to us how people will respond to its current setup, which lacks motivation for rewards due to lack of activity on the network with DAPPs.

With new advancements in the Peerplays blockchain operations including NFTs, we can now incorporate a more advanced and optimized version of GPOS in order to better serve the current needs of the Peerplays ecosystem. In addition the complexity of the current code relating to how GPOS currently operates in Peerplays, and some of the unknowns introduced by the coders who worked on it, means that this change will enable us to ensure the overall network is more secure from a code perspective as well.

The fundamental shift in thinking with GPOS 2.0 is the thought that other blockchains can participate in the consensus and multiple voting outcomes based on communities can take place and provide specialized rewards.

This means that BTC for example brought into Peerplays can be used for it’s consensus instead of just PPY.

This also means that a separate series of nodes based on a particular currency or token can create its own community of voting interests to drive it’s own economy and node operators all in sync with the core Peerplays blockchain.

As described in other documentation, the role of PowerUP is something which still continues, however, the use of the funds staked changes, and PowerUP takes on a more real role in Peerplays. The necessity of locking tokens in the past was primarily to prevent exchange influence/security risk. However, in this new model the arbitrary 30 day number is no longer necessary for this purpose.

The core elements of GPOS 2.0 require the following:

PowerUP

A virtual token which is used to reward participants in the network as well as calculate the weight of voting power the user carries. This virtual token is necessary in order to normalize the differing values of various assets in the network. This virtual token also provides a means to rewarding participants for active participation in the network while reducing risk of abuse.

PowerUP LP Vaulting

Utilizing the new AMM of Peerplays, when a user uses their asset to PowerUP they are given the choice to support existing Liquidity Pools (LPs) in Peerplays based on the asset they carry. A PPY holder can support them all, while a BTC holder can support the BTC/PPY Pool. They can select as many as they want and input how much of their stake to put in each in order to support those markets, earn the fees from them, and then use their PowerUp LP Vaulting to create...

PowerUP-NFTs

Once the users LP Vaulting is selected, they will be issued an NFT that represents the asset associated with the NFT that is now operating in the LP to provide liquidity. With each transaction a % will go to the NFT holders of that pool. PowerUp Virtual Tokens (PVT) are issued to the account holder of the NFT in the amount that they are valued in PPY. The image representation of the NFT will use some type of .dom asset which can read from the blockchain to calculate the amount of PowerUP in all accounts and through a formula generate a ‘level’ scoring from 0-100. Which will provide different graphical representation with each level for their NFTs.

With each coinday the account receives additional PowerUP to their account so long as they have this NFT. A multiplier for PowerUP comes into account through...

PowerUP Bell Curve Rewards Normalization

In every DPOS/POS blockchain there is the inevitable whale control that seems to occur over time. Smaller holders feel disenfranchised by the overwhelming control whales can exercise over decisions and they lose interest in participating in any meaningful way. While some token holders may not have the same economic weight as others, they can sometimes contribute significantly in community participation, effectively providing greater benefit to whales who may not be providing this participation or rewarding it.

Rather than having rewards given in a linear fashion to match staking weight as is the case in almost every POS type blockchain, in GPOS, we incorporate a process to create what I call “Decentralized Diffusion”. This is a process by which the value of tokenomics within a blockchain moves towards a greater distribution among members of the network minimizing the impact of the whale holders who are in a minority.

This can be achieved by providing a means for participation rewards to not be based on staking alone, but also take into account the relative comparable value of others, as well as community contribution.

This means lower value NFTs as usual would receive less reward based on the PowerUP value which the account holder receives. If however, they engage in other ACTIONS which can be counted within the blockchain, such as participation in Couch Potato, this will earn additional PowerUPs to the account holder. With consistent participation, a low value NFT holder could earn enough PowerUP in order to increase the rewards much low value NFT would bring.

PowerUP rewards will utilize a formula which accounts for the number of NFTs, value within the coinday, and the total network average. From this we will derive 5 zones that will change dynamically based on the distribution of the total network.

These 5 zones will determine the rate of reward to the NFTs which fall within them.

This will create not a race to the top, but a race to the middle where there is more value to be gained over time, as well as greater weight in voting which in turn offsets the power of whales by an incentivized middle.

TBC...

Feedback is welcome during this drafting of this proposal. Please join in dev discussion by leaving comments below.

bobinson commented 3 years ago

1.

As described in other documentation, the role of PowerUP

We can give link to the mention/definition of PowerUP in this document itself ?

  1. A virtual token which is used to reward participants in the network as well as calculate the weight of voting power the user carries

By virtual you mean this is to be a computed value based on a set of pre-defined parameters as opposed to a token that is minted ?

bobinson commented 3 years ago

3.

PowerUP LP Vaulting

It will be great to have more details on how to handle the Vaulting

jonathanbahai commented 3 years ago

As described in other documentation, the role of PowerUP

We can give link to the mention/definition of PowerUP in this document itself ?

Good idea.

A virtual token which is used to reward participants in the network as well as calculate the weight of voting power the user carries

By virtual you mean this is to be a computed value based on a set of pre-defined parameters as opposed to a token that is minted ?

This was my initial thinking on it in order to minimize added operations in managing it. As the balances will by rather dynamic, I think tokenizing it could create more overhead than maintaining a virtual asset. I could be wrong though. If we see greater efficiency in tokenizing then certainly, I just think the parameters of this particular token will end up needing special rules over all others. I think a computed value on the other hand simply ties into existing operations and basically comes along for the ride with all the others.

jonathanbahai commented 3 years ago

PowerUP LP Vaulting

It will be great to have more details on how to handle the Vaulting

Yes it would be! 💯

I have some open ended thoughts on this in relation to the 'lockup' periods. From a gamified perspective we want to see people hold their NFTs and seek liquidation of a pool by means of selling their NFTs rather than pulling tokens from pools. This means that we want to show a greater upside to the value of NFT holding vs. removal of assets, and this can be done by way of a push and pull. The pull being the ability to put the NFTs up for an ask in the marketplace while still collecting rewards, and push being a locking period which would be a less desired path. I would like to see it be something easy to understand also. Dynamic locking period seems like it will leave a big unknown for people as to how long. Perhaps have time frames trace the 5 PowerUp quadrants with a linear scale that increases with volume.

Bottom line is the mission intent is the have the incentive to transact in NFT before seeking the burn and withdraw from pools, thus maintaining a larger more reliable liquidity pool.

jonathanbahai commented 3 years ago

After getting feedback and continuing to think and analyze the needs of Peerplays blockchain, I have made some significant changes to how I believe this design should operate. I am going to detail some of them here in a user journey sort of fashion after providing some fundamental operations and reasons for them:

GPOS 2.0 Supports Multiple Assets

This means that as BTC, LTC, HIVE, ETH, XRM or other assets get added via SONs, or are included by Advisors as consensus coins from within Peerplays, all assets will be included as part of the voting consensus of service providers within the peerplays network (ie. advisors, witnesses, sons, and others). This is done fundamentally through Sidechain Operator Nodes (SONs) which are possible through Peerplays Cross Chain Consensus Protocol. In order for CCCP to work in the fashion it was designed and to ensure security of all assets as they flow too and from the Peerplays blockchain, a TTV (total token value) must be accounted for within the network in order to ensure an objective security value is applied to voting weight within Peerplays in order to ensure that when assets enter Peerplays, the ability to manipulate it's value through market sentiments does not threaten the objective security of assets. This will be a factor which is incorporated into the AMM for all LP that operate in tandem with the DEX in Peerplays (see other pip for more), ensuring the objective network reality is arrived at by calculating network elements to prevent market manipulations that can threaten security.

With this new level of security, and the inclusion of all blockchain assets as part of Peerplays consensus, it means that every blockchain in the world will be able to utilize everything Peerplays has to offer using their own native tokens of choice, gain all its benefits, and in some cases, provide a great means of reaching larger audiences through decentralized operations vs. centralized service providers (ie. L2 solutions). BTC holders could potentially create their own DEX our of Peerplays, have their own BTC betting exchange, or BTC charity lotto. Governance to vote on proposals when the SMEC PIP is implemented will give them a means of having a voting mechanism for meaningful decentralized governance on matters for their community.

GPOS 2.0 Uses NFTs for Consensus instead of Stake

This means that a certain class of NFTs which will carry with them the ability to earn participation rewards will be where consensus voting and other tasks are targeted. This will help provide some of the abilities mentioned above to make Peerplays the rewards layer for other blockchains/DAGs to help them grow.

GPOS 2.0 Uses PowerUP Balances in Calculating Weight

The PowerUP as conceptualized in the original Peerplays whitepaper from 2016 is something which made its first appearance in the first implementation of GPOS. PowerUP balances provide a variety of benefits to users and dapp developers:

For the NFT, a type of vested balance is associated with the NFT which can dynamically be updated. Time and efforts in the network are important factors to the quality of participation a user may have to be an active participant in any network they support (be it Peerplays, Bitcoin, or Ethereum).

Therefore the vesting period can be either set for a long period of time, or it can be by default 1 coinday added per day. eg. If I had a GPOS NFT for 13 days, and decided to destroy it in order to retrieve an asset in trade of PowerUPs accumulated, I will need to wait 13 days before receiving it to agree with the contract. If I want instant liquidation I can break the contract, but only get back whatever PowerUP I originally had created the NFT with, and the difference of rewards which would have been paid out at the end of 13 days will instead be taken back and given to the network of other GPOS NFTs. There is also the option to simply sell it in the NFT Marketplace for a subjective value that maybe greater. Locking periods will be able to reach as high as 10yrs, and with it will provide greater voting and rewards weight to those which choose this.

This means the Bell Curve I talked about here is resolved with this weighting of PowerUP and it is completely subject to the amount the NFT creator is willing to provide as the SoV for their GPOS NFT. For example, someone depositing 1 BTC may get 30k of PowerUP to their asset at the time, and that would be the weight of their voting and rewards if they made no timelock. Someone with 0.1 BTC who gets 3000 of PowerUP but timelocks it for say 1 year (365 coin days) will have 1,095,000 PowerUP. This means that the amount of rewards and influence will be relative to the commitment made in the NFT.

This PowerUP weight will determine everything from how much they will get in rewards, to how much they receive for rebates on fees and also status in the network, as an entire series of NFTs will denote the users status in their given asset of choice (ie. BTC-NFT with 1m PowerUP will have a certain design, while the one with 100k will be different and so on)

GPOS 2.0 Balance Claims

In order to support accounting and multiple assets, the rewards received in the network are accounted in PowerUP, and are not transferred directly to accounts, but instead will need to be CLAIMED. This is necessary in order to support multiple-asset NFTs and also take into consideration the possibility of a user looking to break the contract of one NFT but not another, and how rewards will be removed or kept under those conditions. When claimed, if they user has multiple GPOS NFTS (BTC-NFT, ETH-NFT, PPY-NFT, HIVE-NFT etc.) then they will be able to select which one will have the PowerUP balance added to the appropriate NFT. User may have some that are long term, while others are short, and this gives him the ability to implement accounting practices which make sense for their community, and or portfolio.

User Journey Example

Just as an example, a user with 1 BTC wants to participate in the rewards network Peerplays offers so that he can earn rewards for tweeting about Bitcoin. He wants to earn as much as possible, but doesn't want to be locked up too long, so he choose 100 days as the period to create his GPOS-NFT in Peerplays. He has already deposited 1 BTC to his Peerplays account, and chooses to PowerUP 1 BTC. When he does he is presented with the choice to support various LPs available, but being a bitcoin maxi, he decides to support just BTC. Instead of the default locking period, he goes with 100 days, this effectively gives him 100X weight of his 1 BTC instantly. With that, he receives a BTC-NFT with eg. 3m PowerUP. In this example, everyone else in BTC-NFT have not locked in any days, and there is another 100 BTC there. This means that because of his 100 day commitment, he will receive half the rewards of the LP, and he can now participate in ACTIONs and receive a higher reward also for his Tweets.

After a month, he claims his rewards to increase his PowerUP. His BTC-NFT now looks different. At first he was just tweeting, but he has since learned that referring others to do as he did will increase his PowerUP far more than tweets, so people he referred are giving him higher value ACTIONs that give him PowerUP rewards he is able to claim.

Tragedy strikes, and he needs to liquidate his BTC-NFT prior to the 100 day mark, just 30 days left. He has no choice though and needs the BTC back in the next 5 days. He decides to put his BTC-NFT up on the marketplace where everyone can see the rewards it has earned, and how much more it will get from the new users referred that are attached to it. The locking period is for another 30 days, which will be attractive. More than that, this BTC-NFT has a history of epic tweets that got a lot of traction, be pretty cool to be the guy holding that piece of bitcoin history. Objectively on the day he can list it, it is worth 1.5BTC, but because of the subjective value and ongoing streams, he can ask a multiplier on those for the next 180 days for a quick sale of say 2 BTC. After being on the marketplace for a day, a bidding war broke out, and your initial ask of 2BTC has actually gone up to 2.8 BTC, so you decide to close the bid and 2.8BTC instantly transfers to your account, the BTC-NFT moves to the buyers account, and all the value of the BTC-NFT gets transferred to the new account account holder.

If this sale didn't work out, the alternative would have been to break the contract, lose all the rewards gained, and get back the 1 BTC in value from the time of creation of the BTC-NFT. The remaining 0.5BTC worth of value in PowerUP then would get distributed back to all other BTC-NFTs according to their respective weights.

There are other examples I can provide that will help illustrate how all of this works, particularly when it comes to other assets as well. I will add more to this at a later date. In the mean time, any feedback is appreciated so I can help explain more about this.

bobinson commented 3 years ago

all assets will be included as part of the voting consensus of service providers within the peerplays network

  1. This means, if I have 100 ETH or HIVE, then I can stake them in Peerplays and become part of the GPOS consensus ?
  2. HIVE and ETH both has PoS based consensus & what happens to the accounts being held as VESTED in Peerplays ?
  3. If I have a HIVE account bobinson and if I stake 100 HIVE to Peerplays, how will I get the upvote rewards that I can otherwise get from HIVE by simply using a upvoting bot ?
jonathanbahai commented 3 years ago

all assets will be included as part of the voting consensus of service providers within the peerplays network

  1. This means, if I have 100 ETH or HIVE, then I can stake them in Peerplays and become part of the GPOS consensus ?

Correct. With the new mining plugin we are designing right now, this could allow the community of each blockchain to have their own voting systems as well to facilitate community decision making based on whatever blockchain assets they may choose. This is an added benefit, but yes indeed, they can participate in the consensus of Peerplays GPOS also.

  1. HIVE and ETH both has PoS based consensus & what happens to the accounts being held as VESTED in Peerplays ?

With a little more customization for these blockchains, we can extend PoS to the user so they can continue to participate. In HIVE for example, I see no reason why the amount that transfers across from HIVE > Peerplays could not be PowerUP proxied to the corresponding account in HIVE. Rules surrounding withdraws however would then also apply in Peerplays as they are in HIVE.

  1. If I have a HIVE account bobinson and if I stake 100 HIVE to Peerplays, how will I get the upvote rewards that I can otherwise get from HIVE by simply using a upvoting bot ?

I just described it above.

jonathanbahai commented 3 years ago

I had a thought about a potential attack vector relating to GPOS 2.0 Balance Claims ability to break the term contract. The attacker could potentially deposit say 10BTC and then select full 3650 days as the staking period to gain greater voting power than many. Then they would set out to change node operators via voting and attempt to take over various operators in SONs. After this is done he can perhaps drain assets and then break the contract to withdraw his 10BTC without really losing much.

The ability to break the contract is a feature which provides a certain gamified element which also makes the decision to lockup more frictionless. You got nothing to lose and everything to gain basically, so the decision to do it is easier. If there as no way to break it, you then have to take some risk in selling the NFT in the market not knowing exactly how much you could sell it for, or if the buyers market is good etc. The contract being broken is more of an insurance against unknowns.

A way to address this, maybe to apply a time element to the weight of voting NFTs. In our attacker example, he could PowerUP 10BTC and choose 3650 days, but when considering votes in consensus NFT Timestamp coinday in % X creation value / lockdays = total vote weight (0 X 10BTC / 3650 = 0 weight ... Day 1 (1% of lockdays) X 10BTC = 365 weight .. Day 2 X 10 BTC = 730 weight) vs. no time consideration, the calculation for vote weight would be 10BTC X 3650 = 36,500 weight.

The net effect of this type of calculation would mean a gradual build up of voting weight which means the user of the network would need to wait until day 3650 in order to get their locking multiple, but would still enjoy the benefits of added rewards from day one for being a long term participant while keeping the network secure.

I believe scaling time of 1% over the course of the full lockup period is the simplest way to ensure this type of attack vector becomes reasonably more difficult to accomplish.

Suggestions on other ways this could be done are welcome.

bobinson commented 3 years ago

proxied to the corresponding account in HIVE.

Proxied as in delegation ?

jonathanbahai commented 3 years ago

proxied to the corresponding account in HIVE.

Proxied as in delegation ?

Yes that's correct. The feature already exists in HIVE, it would just be a matter of having some additional operation in SONs to enable the user to utilize this with whatever balance they may carry. This could get interesting really depending on how it is designed. I think if someone PowerUP their HIVE then the value would be calculated in PowerUP of their HIVE-NFT and they could not only participate in the LP and other features of Peerplays, but also continue to have their account on HIVE Poweredup via deligation of HIVE proportionate to their HIVE-NFT. This means added value for HIVE owners. Same can be done with other blockchains that support similar, like EOSIO chains, and others with staking rewards which can support delegation of stake.

jonathanbahai commented 3 years ago

After some further consideration of how the GPOS ecosystem will expand, I believe the GPOS-NFTs need to have a feature which I call SMART NFT.

Smart NFTs

This effectively is taking the mechanics of the vesting object I explained above, and enabling the NFT attribution to be able to carry with it more than one attribution object which can be associated with other smart contracts within Peerplays.

This effectively means that the GPOS-NFT holder will be able to carry multiple vesting objects within the NFT that all have PowerUP, but the rules of each object will vary depending on it's function. This provides more opportunities for the end user to earn participation rewards, and provides other game mechanics which will encourage behaviours desirable for participation in the Peerplays network with all assets.

An example of this could be the Sweeps operations. The vesting object associated with the new NFT based sweeps operations could make it so that you can take a portion of your PowerUP and have it participate in lottos that will enable you to have your GPOS-NFT participate in a draw where the prize pool is generated from collective participation rewards. Thus you could win larger PowerUP prize and then assign the claimed amount where ever you wish. This is what some might call a 'lossless lotto' where no consideration is required, so this is something everyone can participate in.

Another example could be having another object connected to something related to bookie operations where an automated market maker utilizes the PowerUP in fantasy sports in a similar fashion to the losses lotto, no consideration is required.

This introduces interesting ways that a user might delegate their PowerUP to another user in order to introduce them to these new fun interactions at Peerplays without risking anything and potentially gaining on the referral of the new user once they deposit their own funds to PowerUP their own account.

The multiple objects associated with GPOS NFTs being capable of incorporating its attribution to smart contracts will ensure GPOS-NFTs in Peerplays will provide an expandable mechanism to have rewards ever expanding.

cryptosig commented 3 years ago

IMO, this should not be done on the Peerplays blockchain, nor should PBSA be spending donations on this. This is such a vast departure from the consensus mechanisms of not only this network, but other networks, that it should constitute it's own chain, due to the risks involved. The users of this chain have agreed to the consensus mechanisms in the original whitepaper, mechanisms that were well tested. The change to GPOS was a slight modification to the same consensus, it was still the DPOS system, but the vote weighting was slightly changed. This is worlds different.

This is equivalent to Bitcoin changing from POW to DPOS, to do so is fundamentally something else, a new blockchain. PBSA's mission is to the Peerplays blockchain, should you want to pursue this, it would be best to start a new organization and raise new money to pursue that, with investors who have agreed to fund a new risky consensus mechanism.

The Peerplays blockchain should remain a decentralized network, there have been no calls from any users to pursue a new consensus mechanism. The users would rather the money that was used from donations go towards the roadmap they signed up for. This new consensus mechanism would be obscenely costly in time, money and development resources.

Those resources should go to bringing value to this chain. This chain should have a dice mechanic, keno, slot, megajackpot, a deck of cards, and other provably fair games before even wasting an ounce of energy on a new consensus mechanism. These types of projects are much easier and cheaper to achieve and can bring much needed velocity to the transactions per minute. Additionally people who donated, even if they are not active, expected these milestones to already be reached, they don't want the donations they made at the time to go to something else. They wanted provably fair gaming, spend time and resources on that, because that is what they signed up for.