NEP: 9999
Title: Decentralized Autonomous Organization Standard
Author: DAO Builders Group
Status: Draft
DiscussionsTo: <URL of current canonical thread>
Type: Standards
Requires: < ... >
Created: <dd-mmm-yyyy>
A standard interface that supports decentralized autonomous organizations (DAOs) that enable proposals with governance and voters.
This NEP is a response to the need for interoperability throughout DAO systems built on NEAR and other blockchains.
EIP-4824, courtesy of Metagov (Joshua Tan, Isaac Patka, Ido Gershtein, Eyal Eithcowich, Michael Zargham, and Sam Furter)
Let's assume that all DAOs possess at least two primitives:
- Membership is defined by a set of addresses.
- Behavior is defined by a set of possible contract actions, including calls to external contracts and calls to internal functions.
Proposals relate membership and behavior; they are objects which which members can interact. If and when executed, they become actions of the DAO (via governance).
The key words “MUST”, “MUST NOT”, “REQUIRED”, “SHALL”, “SHALL NOT”, “SHOULD”, “SHOULD NOT”, “RECOMMENDED”, “MAY”, and “OPTIONAL” in this document are to be interpreted as described in RFC 2119.
Contract
storage includes Policy
(members + roles), Proposals
(actions + votes), and Config
(types).
Several methods are provided to interact with the DAO:
{
"viewMethods": [
"get_config",
"get_policy",
"get_last_proposal_id",
"get_proposals",
"get_proposal",
],
"changeMethods": [
"new",
"add_proposal",
"act_proposal",
],
}
CORE DAO FUNCTIONALITY
--> creating and managing proposals, policies and members, along with processing votes and updating the state of the DAO as a whole
/// For decentralized autonomous organizations.
type DAO = {
config: Config,
policy: Policy,
}
/******************/
/* CHANGE METHODS */
/******************/
/// add_proposal: submit a proposal to the DAO
///
/// Requirements
/// * Caller of the method must attach a deposit of 1 yoctoⓃ for security purposes.
/// * Calling the method fails in case of insufficient deposit.
/// * Only those with permission can add the proposal.
/// * The proposal is added to a list of proposals.
///
/// Arguments:
/// * `description`: context of the proposal
/// * `kind`: type of the proposal
function add_proposal(
proposal: {
description: String,
kind: ProposalKind,
},
): u64;
/// act_proposal: act on given proposal by id, if permissions allow
///
/// A successful workflow will end in a success execution outcome
/// to the callback on the DAO contract at the method `on_proposal_callback`.
///
/// Requirements:
/// * Caller of the method must attach a deposit of 1 yoctoⓃ for security purposes.
/// * Only those with permission can act on the the proposal.
///
/// Arguments:
/// * `id`: the ID of the proposal.
/// * `action`: the action with the proposal.
function act_proposal(
id: u64,
action: Action,
)
Copyright and related rights waived via CC0.