Talk:DGF Smart Contract Specs: Difference between revisions
mNo edit summary |
mNo edit summary |
||
Line 1: | Line 1: | ||
Here are the guts of Ladd's [https://docs.google.com/document/d/1nJRHwyqH70YICHMWckVhbOaZh2aue8wyH78Av8X8W6o/edit WorkDAO On-Chain Requirements]that he's handing off to Maciej. | Here are the guts of Ladd's [https://docs.google.com/document/d/1nJRHwyqH70YICHMWckVhbOaZh2aue8wyH78Av8X8W6o/edit WorkDAO On-Chain Requirements]that he's handing off to Maciej. | ||
\\'' | \\''This looks great! I just have a few comments that I'll put in this format inline. -Craig'' | ||
'''Terms''' | '''Terms''' |
Latest revision as of 11:28, 6 November 2023
Here are the guts of Ladd's WorkDAO On-Chain Requirementsthat he's handing off to Maciej. \\This looks great! I just have a few comments that I'll put in this format inline. -Craig
Terms
- Decentralized Autonomous Organization (DAO)
- Work Reputation (WREP) \\In the wiki, we use wREP, gREP, etc. -Craig
- Validation Pool (VP)
- Work Smart Contract (WSC)
- Work Evidence (WEV)
Overview
There are three ways to earn Work Reputation (WREP).
1. Contribute to defining a Work Smart Contract (WSC)
- as the author of a WSC, or
- as the author of a post cited by a WSC, or
- as the author of a post cited by a post cited by a WSC, etc.
(depth limited by Reference Chain Limit parameter).
2. Contribute to performing work that fulfills a WSC
- as the author of a Work Evidence post (WEV), or
- as the author of a post cited by a WEV, or
as the author of a post cited by a post cited by a WEV, etc. (depth limited by Reference Chain Limit parameter).
3. Staking WREP in a Validation Pool (VP),
- to validate a VP,
- or to police a VP. \\For terminology, "policing" is participating in any aspect of the VP, validating or invalidating a post. So maybe this third way to earn WREP should read ""3. Staking WREP in a Validation Pool (VP) to vote, for or against a post." -Craig
Note that WREP is ONLY minted in proportion to fungible tokens submitted to a Validation Pool (VP). \\we should be specific about how these tokens are the native _currency token_. All tokens are partly fungible and partly non-fungible. So referring to them as fungible is not as precise as it could be. -Craig
When fungible tokens are submitted to a WSC
The WSC must select a worker to whom the work is assigned.
The recommended way to select a worker is as follows:
- DAO members (a.k.a. WREP holders) indicate their availability by staking their WREP toward the WSC.
\\I broke this out as a separate Availability Smart Contract. But if this is easier to program, then this is preferable, because it is easier to explain. -Craig
- WSC selects a worker randomly, with probability of selection for each worker weighted by that worker’s staked WREP.
- To handle the initial case when no WREP has yet been minted, the WSC can accept an availability stake of 0 WREP, and all such stakes should be given equal weight in the random selection.
When WEV is submitted to a WSC
1. The WSC initiates a VP targeting the WEV.
2. The fungible tokens are transferred to the VP.
3. The WREP staked by the worker toward availability is transferred to stake in favor of the VP.
4. All WREP holders have an opportunity to stake for or against the VP.
When VP is initiated
1. WREP is minted in proportion to the fungible tokens received.
2. The proportion is determined by the WREP Minting Ratio parameter.
When VP is approved
1. Minted WREP is transferred to the WEV post, and propagated to its authors and citations, up to the depth specified by the Reference Chain Limit parameter.
2. Fungible tokens are distributed to all WREP holders in proportion to their WREP.
\\Also, some of the minted wREP should be given to the people who participated in voting to approve the WEV. This is for three reasons: 1) to incentivize participation, 2) to stabilize the evolution of power, so it is distributed more widely and stably, and 3) most importantly, so that voting is balanced--i.e., with this setup, there is an incentive to vote against the post. -Craig
When VP is rejected
1. Minted WREP is transferred to the DAO members who staked against the WEV.
2. Fungible tokens are distributed to all WREP holders in proportion to their WREP.
Note that there may be multiple alternative WSC in play at a given time. \\There is some logic missing about two simultaneous WSCs selecting the same member with the same wREP tokens. This was part of the reason I broke out ASCs from WSCs. The VP logic gets fraught. It can be done, but it's a gaming threat. Further, as the system scales and there are many WSCs per second, then the workers might not be able to perform the duties they are randomly called to do. -Craig
In order to promote a healthy culture, WSC and WEV SHOULD cite contributions of other DAO members.
Members SHOULD vote against WEV that violates the community’s standards.
Members SHOULD vote against WEV that is submitted to an improper WSC.
Smart Contracts
Forum
- Contains Posts
- Each post may have one or more authors
- If a post has multiple authors, each author may have a weight
- Author weights sum must equal 1
- Each post may cite zero or more other posts
- Each citation has a weight between -1 and 1
- Sum of all positive weights must not be greater than 1
- Sum of all negative weights must not be less than -1
- Each post may have one or more authors
- Propagates WREP
- To cited posts, recursively up to Reference Chain Limit
- To post authors
Validation Pool
- Accepts fungible tokens to initiate a VP targeting a given Post
- Mints WREP in proportion to fungible tokens
- Parameter: Minting Ratio
- Accepts WREP stakes for or against the targeted Post
- Awards WREP to winning voters, whether for or against
- If the VP is approved, awards WREP to the targeted post
Reputation
- Extends ERC 721 (Non-fungible token)
- Associates a floating point value with each token
- Allows VP and Forum to transfer value from one token to another, as specified above
Work
- Accepts WREP stakes for worker availability
- Accepts fungible token fees from customers
- Assigns work to workers
- Accepts WEV submissions
- Initiates VP to approve WEV