Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(platform)!: contested document resolution with masternode voting #1878

Merged

Conversation

QuantumExplorer
Copy link
Member

@QuantumExplorer QuantumExplorer commented Jun 11, 2024

Issue being fixed or feature implemented

A unique index might be coveted by multiple identities making it valuable. Since it is valuable we need a way to distribute such value.

What was done?

This proposal implements a workable DAO type voting mechanisms to distribute contested unique indexes.

A document type can have at most 1 contested unique index.
This contested unique index can have a match field. If we insert a document that matches the field of the contested unique index then a contest is started. The cost to be a contender in a contest is hard coded in v1 at 0.2 Dash.
Other identities can join this contest for up to 1 week.
The contest lasts for 2 weeks total.
Masternodes and Evonodes can vote in a contest, they can change their votes up to 4 times. There is a specialized balance pool that they use to pay for fees.
Masternodes and Evonodes can vote for a contender, or they can abstain or vote to lock the vote. If the lock vote wins, no document is awarded.
Locked polls can eventually be unlocked (not part of this PR) by paying 2 Dash to restart the contest, if this is the case, the threshold to win the vote must be at least 50 votes.

At the end of the contest the document is awarded to the winner.
There is a clean up mechanism to remove extra data from the state at finalization of the vote.

Masternodes that move their collateral have their votes removed.
Sum trees are used to give efficient vote totals.
Masternodes have a weight of 1, Evonodes have a weight of 4.

SDK now includes

How Has This Been Tested?

Many unit tests were made.

Breaking Changes

This includes many breaking changes.

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or updated relevant unit/integration/functional/e2e tests
  • I have added "!" to the title and described breaking changes in the corresponding section if my code contains any
  • I have made corresponding changes to the documentation if needed

For repository code-owners and collaborators only

  • I have assigned this pull request to a milestone

@shumkov shumkov force-pushed the feat/contestedDocumentResolutionWithMasternodeVoting branch from fbbc8da to f6b572f Compare June 11, 2024 13:53
@QuantumExplorer QuantumExplorer force-pushed the feat/contestedDocumentResolutionWithMasternodeVoting branch from f6b572f to 2d30333 Compare June 11, 2024 13:57
@lklimek lklimek changed the title feat: Contested Document Resolution With Masternode Voting feat: contested document resolution with masternode voting Jun 17, 2024
@QuantumExplorer QuantumExplorer changed the title feat: contested document resolution with masternode voting feat(platform)!: contested document resolution with masternode voting Jul 6, 2024
Copy link
Member

@shumkov shumkov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK

@QuantumExplorer QuantumExplorer merged commit 72c65b6 into v1.0-dev Jul 9, 2024
91 checks passed
@QuantumExplorer QuantumExplorer deleted the feat/contestedDocumentResolutionWithMasternodeVoting branch July 9, 2024 17:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants