or
or
By clicking below, you agree to our terms of service.
New to HackMD? Sign up
Syntax | Example | Reference | |
---|---|---|---|
# Header | Header | 基本排版 | |
- Unordered List |
|
||
1. Ordered List |
|
||
- [ ] Todo List |
|
||
> Blockquote | Blockquote |
||
**Bold font** | Bold font | ||
*Italics font* | Italics font | ||
~~Strikethrough~~ | |||
19^th^ | 19th | ||
H~2~O | H2O | ||
++Inserted text++ | Inserted text | ||
==Marked text== | Marked text | ||
[link text](https:// "title") | Link | ||
 | Image | ||
`Code` | Code |
在筆記中貼入程式碼 | |
```javascript var i = 0; ``` |
|
||
:smile: | ![]() |
Emoji list | |
{%youtube youtube_id %} | Externals | ||
$L^aT_eX$ | LaTeX | ||
:::info This is a alert area. ::: |
This is a alert area. |
On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?
Please give us some advice and help us improve HackMD.
Do you want to remove this version name and description?
Syncing
xxxxxxxxxx
DAO Contract Standard
This NEP is based on the open-source Sputnik DAO contract, developed and commonly used in the NEAR ecosystem. The ideas presented here come from ongoing collaborations with past contributors and various active members of the DAO Builders Community Group.
Summary
A standard interface for any decentralized autonomous organizations (DAOs) to support collective decision making with on-chain proposals, membership, and governance features.
This will provide a common set of functions and data structures that DAO contracts can use to implement their governance and decision making functionality. This will allow developers to build DAO contracts that are compatible with existing tooling. Also, would make it easier for users to participate in and understand DAOs in the NEAR ecosystem.
Motivation
What use cases does it support?
Project(s)
What is the expected outcome?
This development could spark new DAO contract implementations by projects integrating with Near Social. There is a need for a standard interface to facilitate coordination and ensure interoperability across the organizations built on NEAR.
Additionally, the open-source Sputnik DAO contract code may further evolve to support governance modules, which diversity and inclusion in the ecosystem.
This NEP is requesting review and comments by NEAR experts and other engineers involved with the Contract Standards Working Group.
Rationale & Alternatives
Why is this design the best in the space of possible designs?
The Sputnik DAO contract code provides a solid foundation for a standard contract interface for DAOs on the NEAR blockchain.
Key Features:
This modular contract design enables anyone to build clients / apps or integrations extending its capabilities.
Which other designs have been considered and what is the rationale for not choosing them?
Compare and contrast the Sputnik DAO contract code with other existing DAO contracts, highlighting its strengths and limitations
Outline the alternatives that have been considered and the reasons why they were not chosen.
DAOs are reaching the extent of their original design limitations. There might need to be a system for composability to allow innovative features or apps to interact in ways not possible today.
What is the impact of not doing this?
Potential benefits of standardizing the DAO contract interface:
Not coordinating to develop this DAO contract standard may result in confusion and technical debt as we shift away from the Astro platform toward Near Social.
Example ~ Forum Post: "Creating a DAO Outside of Sputnik" (December 2021)
Specification
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.
This contract is a Rust implementation for decentralized autonomous organizations (DAOs), meant to be used on the NEAR blockchain platform. Below is a detailed description of the structures and functions in the Sputnik DAO contract system, along with discussion of tradeoffs, limitations, and challenges.
Overall, the structure represents current DAO state. For example, the list of members and their voting power, as well as tokens the DAO has collected.
lib.rs (main DAO contract)
Main module of the DAO, which acts as the entry point for the contract system. Here is where to import and use the functionality defined in other modules, e.g.,
proposals.rs
,types.rs
, andpolicy.rs
. It also defines the public interface of the contract, including methods that can be called by external clients to interact with the DAO.Responsibilities of
lib.rs
include handling incoming transactions, state transitions, and updating the contract's storage. This module interacts with the storage and functions defined in other modules to implement the core functionality of the DAO:The
Contract
struct stores configuration, policy, delegations, proposals, bounties, and more. Several methods are provided to interact with the DAO:This module also has an implementation of an interface called
ExtSelf
that allows for callbacks after proposal execution.Open question: should we ignore bounties, delegation, and upgrades for now?
Below is an abbreviated version of the code:
policy.rs
This module defines a struct named
Policy
that stores information about a specific policy within the DAO, such as the policy text and the current state of the policy (active or inactive). It also defines aPolicies
struct that serves as a collection of policies and includes methods for adding, updating, and retrieving policies.Plus, the module contains functions for handling incoming transactions related to policies, such as creating a new policy, voting on a policy, and processing the results of a vote.
In summary,
policy.rs
enables the core functionality of managing policies within a DAO. It is responsible for transactions involving policies, updating state of policies, and providing information about policies to other parts of the system.Below is an abbreviated version of the code:
proposals.rs
This module defines a struct named
Proposal
that stores information about a proposed action, including the proposer, the proposal text, and the current state of the proposal (pending, accepted, or rejected). Also, it defines aProposals
struct that serves as a collection of proposals and includes methods for adding, updating, and retrieving proposals.Additionally, it contains functions for handling incoming transactions related to proposals, such as creating a new proposal, voting on a proposal, and processing the results of a vote.
In summary,
proposals.rs
enables the core functionality for managing proposals within a DAO. It is responsible for transactions involving proposals, updating the state of proposals, and providing information about proposals to other parts of the system.Below is an abbreviated version of the code:
types.rs
This module provides a centralized location for defining custom types used throughout the code, making it more readable, maintainable, and flexible.
types.rs
includes the following:AccountId
: account identifier on the NEAR platformBalance
: balance of a particular account or amount of tokens in a DAOProposalIndex
: index of a proposal within the DAOVotingPower
: voting power of a member within the DAODefining these types in a separate module gives a clear separation between custom types and implementation of the DAO logic. This makes it easier to understand how different parts of the code relate to each other, and it is easier to change the code, if necessary.
Below is an abbreviated version of the code:
Reference Implementation
The Sputnik DAO contract code is available on GitHub:
https://github.com/near-daos/sputnik-dao-contract
User interfaces built on the Sputnik DAO contracts (oldest to newest):
< explain how Astro users deploy and interact with Sputnik DAO contracts >
Sputnik DAO Contract System (V2)
Factory:
DAOs:
See all DAOs by calling:
near view sputnik-dao.near get_dao_list
(mainnet)near view sputnikv2.testnet get_dao_list
(testnet)Future Possibilities
The natural extension and evolution of this proposal would be improving the Sputnik DAO contract system to be more accessible, meaningful and useful. Ultimately, this may help drive adoption of such valuable, open-source technology for builders. Sputnik enables anyone to build clients or integrations extending its capabilities.
POSSIBLE EXTENSIONS
Considerations:
License
Copyright and related rights waived via CC0.
Appendix
Resources