Empowering Human Protocol. A Novel Cross-Chain Governance Implementation

Introduction

A Decentralized Autonomous Organization (DAO, referred to as Governance in this article) is an organization without a central leadership. Each proposal is subject to community voting, where anyone with a stake in the project can vote. Voting power is determined by the number of tokens held by each account. 

Proposals can be about rules, policies, and resource allocation. This enables users to have a real impact on the project direction and its future.

Usually, a smart contract is deployed on a single-chain where participants can vote, but for organizations that work on many chains, including Human Protocol, this comes with many limitations.

Single-chain Governance Limitations

Single-chain governances are useful and bring a lot of value. However, they have limitations for organizations that are not bound to a single chain. The main limitation is the fragmentation of liquidity and users. This can create friction for users that are based on other chains because they would need to bridge their tokens (voting power) to the chain where governance contracts are deployed. This splits their tokens between their main chain and the governance chain.

Cross-chain DAO

A Cross-Chain Governance allows users to vote with their full voting power on any supported chain. From the user's perspective, casting votes is similar to how it is done in the single-chain DAO. Let's see how we achieved that.

Implementation

The Cross-Chain implementation involves three components:

  • Implementing Smart Contracts
  • User Interface
  • Vote Aggregator

Smart contracts implementation

We chose the Hub/Spoke architecture to implement smart contracts. In this solution, there is still the "main" chain - the place to create, execute proposals and count votes. But users can vote on any supported chain including the Hub.

Our solution uses Wormhole - a cross chain messaging platform, to send messages between the Hub and Spokes. This allows for seamless transfer of messages between the chains by using a trusted 3-rd party.

Smart Contracts are implemented in two steps:

  1. The proposal is created on the Hub chain and broadcasted to all Spoke chains, where the users are able to cast their votes. 
  2. The voting period ends, the Hub requests the results from each Spoke, counts all the votes and calculates the final voting result. If the proposal has succeeded, it can be queued and executed.

User Interface

We built the frontend by adapting the Uniswap interface to work with multiple blockchains. This allows users to interact with the DAO on both the Hub chain and various Spoke chains.

The design of the application features intuitive layout that matches the HUMAN brand and makes the app appealing. 

Vote aggregator

To aggregate votes, a backend service that limits the number of queries through the RPC Node was designed.

The app takes a proposal, and queries all the chains for the current results, aggregates them, and caches the results for a few minutes, to ensure a good balance between real-time data and response times.

The app was developed to provide a simple API for the frontend application to fetch the data and minimize the amount of RPC node queries.

Benefits

The potential benefits of the Cross-Chain Governance are:

  • Unified Governance: There is a single source of truth, that all protocol participants can vote on. There is no need to have a separate governance for each chain.
  • Easier Access: Users can vote on the proposals they care about. They don’t have to bridge their funds to the ‘governance chain’ as they are able to vote on all the chains.

Conclusion

By implementing the Cross-Chain Governance, Human Protocol enables users from all chains to participate in protocol-level decisions and decide the future direction of the project. Using the Wormhole and Hub/Spoke architecture we managed to overcome the limitations posed by single-chain governance.

BlockyDevs Team

latest from blockydevs' blog