Replies: 3 comments 13 replies
-
Thanks for your contribution...I realize the first paragraphs as two major points we can simply shorten them as: 1-proposal: Something that could be voted on 2- Voting that could be done simply one-to-one with users or as weighted voting biased more into users with special traits. |
Beta Was this translation helpful? Give feedback.
-
I like the encoding of proposal in separate smart contracts, together with the role based access control this could work. To me it is not clear how the proposal "knows" which voting plugin to call. It would be better to have the Example: How are the funds transferred from the dao's contract? Who has permission to do that?
|
Beta Was this translation helpful? Give feedback.
-
Awesome work here! I'm really a noob speaking on blockchain and DAOs, so I will drop some questions and I apologize if they are dumb.
|
Beta Was this translation helpful? Give feedback.
-
RFC 1: Smart Contract Plugin System Architecture
@labs3/daoos
Abstract
Decentralized Autonomous Organizations (DAOs) using the daoOS platform will wish to have individualized governance solutions. A one size fits all approach to governance does not embrace the decentralized, organic, and autonomous ethos of web3. Amongst all DAO's there exists common protocols such as proposal voting. This RFC presents a high level Clarity based Smart Contract Plugin System (SCPS) solution to customizing the underlying behaviors of common procedures present in such protocols.
Design Proposal
The core functionality of the SCPS will be delineated through demonstrating a limited feature set of SCPS enabled behaviors for the familiar DAO voting protocol. The proposed SCPS allows us an audited suite of contracts known as plugins obtainable through an in-app marketplace. These plugins are to be injected into the customizable portions of these protocols. The voting protocol we will use as an example is as follows...
Because all DAOs follow the same protocol of proposing and voting, we are presented with customizable injection points for smart contract plugins via our SCPS. Although voting is the protocol in consideration, it is likely there exist other common protocols within the daoOS governance feature set that will also present ripe territory for SCPS facilitated plugins. We will explore the proposed architecture further through a diagram below. In this architecture, we concern ourselves not with how members are authorized, how plugins are obtained from the marketplace, or the intimate logic of the plugins themselves. For brevity, we seek only to demonstrate brief functionality of how the protocol may interact with plugins such that we establish a conceptual understanding of the proposed architecture.
Voter - a DAO member authorized to vote on a proposal.
Proposer - A DAO member authorized to bring forth a proposal to be voted on.
Frontend - This is the UI of the web app our two types of actors are using. In this case, the UI in question is a single page of a voting/proposal flow. You can expect to find, at a minimum, yes/no buttons, a discussion thread, proposal contract source, as well as any various proposal plugin inputs in question that will be voted on and required to send to the proposal plugin contract. Frontend elements such as yes/no buttons will trigger a contract call to a single plugin contract function matching a specific method signature. The desired plugin contract function address (for example
cast-vote
) is known as a result of installing, configuring, and launching the contract of the desired plugin. Because this plugin contract is known at runtime, it can be statically dispatched.Voting Plugin - This voting plugin contract may contain just the one function (
cast-vote
) or more. It may also maintain and mutate voting state in creative and customizable ways (time-to-live of vote, etc.). The voting plugin in this case would of course contain whatever authorization validations that are desired in thecast-vote
implementation (voter principal must be in DAO, or have some token, etc.). The contract could also serve as an immutable historical record of a proposal voting outcome with getter methods exposing historically useful pieces of state.Proposal Plugin - The call to initiate the proposal can be executed at any time from the frontend by an authorized member but it will call the
get-verdict
getter of the voting plugin from within theinitiate
function of the proposal plugin to verify that the vote has indeed passed as well as perform necessarytx-sender
authorization checks. Malicious attempts to initiate the proposal early would result in wasted STX. Successful initiation of the proposal after a passed vote sends over the agreed upon inputs for the proposal contract to handle according to its measures.Conclusion
A Smart Contract Plugin System was proposed for injecting customizable behaviors into common protocol procedures. This is architecturally accomplished through frontend initiated contract calls to plugins installed from a marketplace configured for injectable points in the flow of the application (button clicks, etc.). We demonstrated how a few such customizable behaviors/plugins might look in the well known voting/proposal protocol.
Suggested Points of Discussion
Apologies if I've not done the C4 model justice and for using lazy method signature syntax, just trying to visually express the architecture succinctly. I chose an RFC format in lieu of a "feature request" since I felt it was a better fit but let me know if we wish to strictly stick to feature requests per our standards.
Beta Was this translation helpful? Give feedback.
All reactions