“DAO Oriented Protocol”->Aiming to make all apps sustainable

Realtakahashi Work
8 min readMay 9, 2023

Problem & Motivation

I love 1980’s Japanese games. Luckily, those games are still playable. That’s because companies continue to release their games on different platforms.That’s why I can’t feel safe. If the operating company goes bankrupt without proper inheritance of intellectual property rights, the game may be lost forever.
Additionally, I write a tech blog for Astar Network on medium, and I presume this article could suddenly be lost as well. I haven’t looked it up, but I think the data for this article is stored on a server managed by the medium company.No matter how many readers there are and no matter how useful my articles are, there is a risk that the current application mechanism will be shut down regardless of its usefulness or public nature.

I’m not an expert on game program copyrights, so I don’t think any commercially released game will be able to adopt this protocol immediately.
However, the more public the application, the more important it is to consider sustainability. Also, in the process of deciding to update the application, I think it is important that there is a process for all stakeholders to decide, rather than unilaterally decided by the Administrator or Owner.

This is the only reason I decided to implement this protocol.

Challenges

I have always believed in the future of DAOs and have implemented DAO dApps that run on EVM as well as WASM contracts.

But my belief is not big. To be a bit more polite, I don’t believe the following statements. “DAO will update the nation”, “DAO will make the world peaceful”, “DAO will eliminate inequality in the world”, etc.

I believe that we are the ones who will update our nations, and we will be the ones who will bring peace to the world and reduce inequalities.

However, I don’t think that we, each of us with very little ability, can suddenly solve such a big problem.
There is a Japanese proverb that says, “God is in the details.” (In English, it seems to say “The devil is in the details.”) As the saying goes, I believe that people’s small actions accumulate and eventually turn into great power. ”DAO” It’s just one of the tools that we can use. I think the important thing is not to be a DAO, but what to do with the DAO tool.

From now on, I would like to take on the challenge of solving various social issues using the “DAO Oriented Protocol”, a protocol that allows DAO to be easily implemented. I’ll cover my specific use cases later in this article.

Overview of “DAO Oriented Protocol”

basic design

I will describe the lowest layers of this protocol first.

  • By installing the contracts that implement each function (“Contract A” and “Contract B” in this example) in “application_core”, you can unify the interface from the front end. The “application_core” is designed so that the front-end application can access each function through the “application_core” abi.
  • The contracts that implement each feature (“Contract A” and “Contract B” in this example) are designed to be able to execute transactions and query data with each other by implementing the “contract_base” trait.
  • Each contract’s transaction execution interface consists of “Target Contract”, “Target Function”, and “Parameter”.
    Note:At the moment, all interfaces are handled as strings, but it is likely that this interface should be improved.

Looking at this application at the lowest layer, there are no DAO elements. At the same time as unifying the interfaces between multiple contracts, it is designed like an “Operating System” that provides a unified interface to external applications such as the front end.

DAO-oriented design

The movement of the entire dApp depends on the decisions made in the DAO. Each contract transaction is a structure controlled by “Proposal” and “Election”. “DAO Oriented Protocol” executes processing according to the following basic flow.

  1. Create a proposal for the contract functionality you want to implement. In addition to the basic items such as “purpose and content”, the items required for the proposal are “target contract address”, “target function”, and “parameters to pass to the function”.
  2. The proposal will be discussed within the members and finally decided by voting.
  3. Proposals that are “passed” by voting will execute the “Target Function” against the “Target Contract” entered at the time of submission.

Details Of “DAO Oriented Protocol”

Pre-Installed Software(contract)

“DAO Oriented Protocol” has 3 pre-installed software. They are for this dApp to function as a minimal DAO.

Memeber Manager
“member manager” manages DAO members. Only members registered here are members of DAO, and can perform actions such as executing each function, submitting proposals, and voting.

Proposal Manager
“proposal manager” manages proposals in the DAO. All proposals are voted on and voted on using the “election manager” feature. Proposals that are approved will be implemented as they were originally proposed.

Election Manager
The “election manager” manages voting. Voting is done according to the result of the vote, and the result is saved.

Change & Update
“member manager”, “proposal manager” and “election manager” are all changeable. You don’t need to use the pre-installed version I have prepared.
Furthermore, the software (contract) installed in the “application core” is designed to be updatable. Deploy the updated contract and migrate the data from the existing functionality. Then use the “proposal manager” to propose an update, and if approved within the DAO, the software will be updated.
I think that the “proxy model”, which is famous for its contract update method, has the update authority for the owner of the contract. In “DAO Oriented Protocol”, only voting results within members have update authority.

Install & Uninstall Software(contract)

Software approved by the DAO using the “proposal manager” can be installed into the “application core”. Once the software is installed, it will be able to invoke transactions through the “application core”. Conversely, software that is no longer needed can be uninstalled in the same way.

Future Vision of “DAO Oriented Protocol”

Again, I want this protocol to be like a dApp Operating System. The intention is not to make money or beat the competition in the industry, but to increase the likelihood of reuse of useful contracts.
The scope of its reuse is not limited to Astar Network’s contract-pallet. By using XCM, other parachain functionality on Polakadot can be accessed from the “application core” through a transparent interface. And with XVM, you can access functions on Astar Network’s EVM as well. Furthermore, in the future when Astar’s node functions are extended and can be synchronized with other EVMs, its reusability can be expanded dramatically.

Assumed use case

“dApp Staking” Register dApp

If I’m not mistaken, the process of registering dApps in “dApp Staking” is manual at the moment. The idea is to implement this application with the “DAO Oriented Protocol”. People who want to nominate a dApp submit a Proposal. dApps approved by voting among members will be registered in “dApp Staking” via chain-extension.

Community-run sustainable games

It is a method to implement game logic as dApp and operate it with DAO. In fact, I think it would be difficult for a newly released commercial game to adopt this method. However, assuming a game that is invented by the community and is developed under the initiative of the community, this method can be proposed as a way to enjoy the game for a long time with sustainability.

Various DAO-based dApps

I believe that DAO can empower small communities that are not doing well due to reasons such as being unable to set a monetary value at the moment.And I think that such a small community can respond to various social issues. I presume that various dApps intended for use by the community will be needed in the future, and I think this “DAO Oriented Protocol” will be useful at that time.

Other Sustainability Community-Based dApps

I expect that the world of web3 will continue to implement many dApps with a philosophy that values ​​decentralization and community. At that time, I will be extremely happy if there are people who will adopt this protocol that I have designed.

Example Of Using “DAO Oriented Protocol”

DAO Flipper

I chose this dApp as the first example to demonstrate how to use the protocol.This dApp structure is very simple.

The implementation of the DAO flipper contract looks like this: The characteristic part is that the call of flip is restricted only from “propsaol manager”. Since the “proposal manger” is implemented to only execute the content of the proposal that has been approved, this proposal must be approved by a vote within the DAO in order to flip the value.

    impl DaoOrientedFlipper {
#[ink(constructor)]
pub fn new(init_value: bool, proposal_manager_address:AccountId) -> Self {
Self {
proposal_manager_address,
command_list: [
"dao_flip".to_string(),
"set_application_core_address".to_string(),
].to_vec(),
application_core_address: None,
value: init_value,
}
}

#[ink(message)]
pub fn extarnal_get_data_interface(&self,target_function:String) -> Vec<Vec<u8>> {
self.get_data(target_function)
}

#[ink(message)]
pub fn extarnal_execute_interface(&mut self, command:String, parameters_csv:String, caller_eoa: AccountId) -> core::result::Result<(), ContractBaseError>{
self._execute_interface(command, parameters_csv, caller_eoa)
}

#[ink(message)]
pub fn get(&self) -> bool {
self.value
}

fn _dao_flip(&mut self, vec_of_parameters: Vec<String>, caller_eoa: AccountId) -> core::result::Result<(), ContractBaseError> {
if self._modifier_only_call_from_proposal() == false {
return Err(ContractBaseError::InvalidCallingFromOrigin);
}
self.value = !self.value;
return Ok(())
}

fn _modifier_only_call_from_proposal(&self) -> bool {
self.proposal_manager_address == self.env().caller()
}

}

Execute the following step to flip the value.

  1. Create a proposal that flips the value.
  2. The proposal must be voted on and passed by DAO members.
  3. Executing a passed proposal will flip this value.
Top screen of example dApp
Installed software list screen
Info screen for proposal flipping values
Voting results screen

Conclusion

This protocol is a dApp designed and implemented for submission to “Hackadot 2023 East-Asia”. The first prototype dApp “dao flipper” is finally working. Along the way, many improvements in design and implementation have been found. I have to start fixing these issues and implementing the dApp I wanted to build on this protocol. DAO, which does not even have a network based on Defi or NFT, is still not a field that attracts people’s attention. However, I believe in the possibilities of DAO as a tool, and I would like to continue implementing dApps based on DAO for the time being.

--

--