5

DAO Core Bases on Leo Smart Contracts

 1 year ago
source link: https://hackernoon.com/dao-core-bases-on-leo-smart-contracts
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Abstract

The whole world is closely following the development of technologies used in the blockchain sphere. Recently, ZKP has been highlighted as an advanced way to enhance privacy in distributed ledgers. However, ZKP protocols are still insufficiently studied in the context of blockchain technologies and, moreover, not standardized for use. Projects such as ALEO, Ethereum, ZCash, Mina, Aztec are doing a lot of protocol research and are interested in standardizing ZKP protocols for financial and government applications.

Recently, Ethereum creator talked about the “large and silent technological revolution” that has occurred due to the use of zero-knowledge proof protocol in the blockchain. This technology allows solving one of the most pressing problems facing the blockchain community, namely ensuring the confidentiality of transmitted data, when the details of the operation and the correctness of transactions must be confirmed by network participants. In particular, this problem prevents the widespread use of the blockchain by corporations and states.

Researching the possibilities of Aleo and the LEO programming language, I made several important conclusions. The most important conclusion is that the standardization of programming can facilitate the subsequent implementation of different projects. This is exactly what is needed in the management sector. Therefore, having studied Aleo Studio, I realized that I could simply describe and then programmers  easy can implement the DAO management system. Implementation doesn't have to be complicated.


1. Specification of Voting on the essence of proposals.

  • Registration in INTERFACE, obtaining an address for voting.

  • There must be at least 500 tokens on the address (this is the number under discussion = “”) - it is assumed that active users either have them for a long time and keep them in their wallets, or in life have a sufficiently qualified job to afford to buy 500 tokens.

  • A smart contract (hereinafter referred to as SC), for a certain time, depending on the "type of voting", must check randomly once a day for the presence of tokens on the wallet so that a person cannot move tokens to activate other wallets.

  • For the current year, in order to quickly retrieve data, the SC keeps lists of addresses, and the days on which the amount on the address was more than “” - a database of snapshots.

  • At the moment when it is necessary to start voting, all candidates who meet the conditions are notified in the INTERFACE of their acceptance or rejection of voting.

    The SC, after drawing up a list of judges, randomly gives each judge an equal number of comparisons of two works from the set.

  • Since the SC randomly gives out pairs for comparisons, it makes no sense to make multi-accounts, since it is not known to whom and what task will fall for evaluation / comparison.

  • All the time since the creation of the DAO, the SC accidentally checks the number of tokens on the judges' wallets, thereby creating obstacles to moving and creating multi-accounts.

  • The SC takes information about the so-called "locked funds" or "snapshots" from the blockchain for a certain amount of time ago.

  • Depending on the type of voting, the size of the “voting stake” may be increased.

User categories and where they can participate:

Category

Prerequisites by retention time tokens at the address./ days ago before start submitting a proposal

The necessary conditions in count withheld tokens at the addressMmin

Options in which can participate address(user)

period (from 14 to 7)

Submission of any proposal Judging the competition essence

period (from 60 to 30)

Refereeingpartnership proposals,or competition approvalor creating a subgroupor appeal the decision including options cat.1

period (from 90 to 30)

Choice of judges, including options cat. 1,2

period (from 365 to 5)

10000

Change configuration networks including options cat. 1,2,3

Table 1

Thus, these funds can:

  1. Participate in staking, bringing profit to your owners
  2. Stimulate the growth of the token by limiting circulation on exchanges
  3. To identify the most loyal and dedicated community members to the project
  4. Encourage communities to preserve and accumulate for subsequent participation in life project, expanding the ecosystem and the ability to use additional funds (rewards) from staking in real life.

2. Mathematical model of voting for SС

 - Number of judges

 - Number of jobs

 - Number of comparisons in total

 - the number of works (proposals), which is given for evaluation to each of the judges

(or "  " if "  " is not an integer, or "  " for the last member of the jury)

The total number of comparisons can be calculated using the formula:

The number of works (proposals) that will be provided to each judge is calculated by formula:

If "" is an integer, then we take it unchanged, if "" is not an integer, then we use "" which is === (x + 1)== - for the number of judges equal to: 

the remainder for the last judge will be: 

All judges will be given a choice in the interface, where the two will be compared work, and you only need to choose one. Thus, one of the works is recognized as the best and gets "+". And so on until the judge makes all comparisons (  )

After the voting, the "+" marks are summed up (superiority indicator) for each work. In fact, this number can be represented as a number of points. "+" = 1 point

So, with such a system, all possible comparisons will be made “each with everyone“.

With a sufficient number of judges and submissions, the same score is unlikely.

In case of the same score, round 2 begins.

All judges "" are sent exactly the same pairs for comparison, only from works with

the same estimates. The distribution of work follows the same principle as

presented above.

Further, the calculation of points and the distribution of tokens.

This procedure will be needed only in case of a dispute over prize places, the number of which will initially be recorded in the SC.


3. Submission of an offer

The feed will take place in the Interface.

Any () for a certain number of tokens "" can supply sentence.

"" will be frozen pending a positive or negative decision on proposal.

"" will differ depending on the category of the offer.

Offer categories.

The system of rewards and penalties for submitting an offer.

Suggestion about:

«»

Accepted

NOT Accepted

Competition

PartnershipsCreation of subgroupAppealing the decision

Election of judges

Changing parameters networks

10000

table 2

Voting for proposals of categories and takes place in 2 stages:

  1. Approval or rejection of the proposal, token reservation. (Vote for approval can only certain categories) ().
  2. Voting in essence (). (for work in the competition, for the candidates of the jury, decisions on the merits)

Voting for proposals of categories and proceeds directly to stage 2. The interface will offer an "accept" or "not accept" button, 51% is required from all voters to make a decision, otherwise the proposal will be rejected

For each competition, authors can indicate in the submission form how the refereeing

  1. usually for the system from table 1.
  2. closed, consisting of members of a certain subgroup, for an exclusive professional assessment.

4. Reward system

A system of awards and penalties will apply to all judges.

At the time of submission of his candidacy, funds in the amount of "  " ( ) freeze and subsequently increase or decrease depending on the quality of the work done.

The coefficient "", which shows the efficiency of the judge's work, calculates the SC:

"" is the number of comparisons made by each individual judge.

 or  or  , the performance of the judge for each specific case.

 - Coefficient by which  "  " is multiplied to obtain the final payment for

refereeing.

The system of awards and punishments for judges.

Table 3

To improve the quality of the comparison evaluation at the time of the proposal creation, the author can indicate the time that will be given to view the offer, or rather it

the minimum number before voting can begin, a kind of "freezeime". This will improve the quality of the evaluation of the work or proposal and not will allow thoughtless scrolling. The timer will count down only when the screen is on, if there is a lot of time to evaluate technically complex works, then a window will appear to stop the timer to make sure the referee is present and his involvement in the voting process. Naturally, this "time" will be selected in the process of discussing the proposal, and will be adequate to each task.

Combined with limited time for the entire voting, tasks for comparison of works or task for consideration of proposals will be evenly distributed in a time interval, not allowing to speed up too much or vice versa delay the voting process.

5. Calculation and distribution of tokens.

SC distributes automatically all funds according to the data specified in the form, which the author contributes. He can schedule rewards for each place or indicate automatic distribution from 0 to 100% to all locations.

The budget can be requested from the grant program or from the fund collected by ordinary users. SC will calculate the amount of tokens by itself necessary for remuneration and to cover commissions,

The data for the calculation will consist of:

  1. Data on the desired remuneration from the submission form

  2. Coefficient "", which shows the efficiency of the work of judges

  3. The size of the commissions spent on the work of the SC

  4. Remuneration of the author for accepting his proposal.

It will also be possible to set part or all of the proposal (competition) budget from its own funds. All the above expenses will be debited from a certain wallet, and this amount freezes at the moment acceptance of the proposal.

Conclusion

Summing up, we can say that the use of ZKP protocols goes well with the blockchain, such an alliance will increase the privacy of users and at the same time create trust in the data used, since the blockchain guarantees the immutability of the information written to it. The attention of the regulator to this technology suggests that more and more players are interested in this solution and in the future we may see many new projects using ZKP, for example, a system for managing corporations or states that I tried to describe in this article.


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK