Next Generation Smart Contract Governance
The security of the open economy demands next generation smart contract governance. As the DeFi market grows and DAOs begin to influence traditional company structure, the architecture of crypto-first companies will become increasingly on-chain and therefore require secure, modular governance. We are pleased to announce OpenZeppelin Governor, our governance system released in Contracts 4.3, now available for use in our open source smart contract library and in Defender.
We developed OpenZeppelin Governor in collaboration with Compound, delivering full compatibility with GovernorAlpha and GovernorBravo while providing greater efficiency, additional capabilities, and a path forward for future governance options. Thanks to our partnership with Tally, OpenZeppelin Governor offers a full-fledged user interface experience for proposers and stakeholders alike. Read on to learn more about the features and functionality of our governance smart contracts; technical documentation is available here.
Contracts 4.3 includes the main Governor contract as well as modules and extensions for vote tracking, vote counting, timelocks, and compatibility.
OpenZeppelin Governor users can visualize voting power and advocates, navigate proposals, and cast votes using an intuitive interface provided by Tally. In particular, projects can use Defender Admin as an interface for proposal creation. To create a governor contract with Contracts Wizard, our lightning-fast smart contract creation tool, click here. On September 2nd, we will be hosting a workshop with Tally on “Introducing Next Generation Smart Contract Governance.” Register here!
Compound’s GovernorAlpha and GovernorBravo established initial state-of-the-art decentralized governance for many top teams in the space. As DeFi continues to “eat the world,” we anticipate on-chain governance will become important for all IT infrastructure, not just the crypto economy. With this in mind, we built a governance system that integrates with and leverages Compound’s foundational work. We are grateful for their contribution and blessings on this effort.
“The Compound governance tools are becoming foundational building blocks for the DeFi ecosystem;” said Robert Leshner, Compound Labs CEO, “we’re proud that OpenZeppelin is productionalizing them to increase access & speed up decentralization for the entire ecosystem.” OpenZeppelin Governor provides compatibility with Compound’s GovernorAlpha and GovernorBravo for easy migration of protocols and dapps while offering ease of customization, modularity, and significant gas cost reductions. Many modules are presented in two variants, one of which is fully compatible with Compound’s governance systems.
Compound GovernorAlpha and GovernorBravo compatible modules:
OpenZeppelin Governor is supported in the Tally interface, which allows stakeholders to view and vote on proposals. According to Rafael Solari, Co-founder and CTO at Tally, “OpenZeppelin Governor is a big step toward standardizing on-chain voting. Everyone in the ecosystem can now build with this modular, flexible “DAO lego” that already integrates with the rest of the decentralized organization stack.” Tally’s wiki provides a comprehensive overview of the OpenZeppelin Governor integration. If you have a governance project ready to go on Tally, apply here to have your project onboarded to OpenZeppelin Governor. Stakeholders, check out this guide on how to vote and best navigate with Tally.
Defender supports OpenZeppelin Governor proposals and will soon support proposals from GovernorAlpha and GovernorBravo. Defender will also soon add the use of timelocks in combination with Governors. Inside Defender, Admin will take care of submitting the proposal to your Governor and you can then point your community to your voting user-interface of choice. We recommend using Tally.
The Governor Smart Contract Explained
We set out to make OpenZeppelin Governor the most secure governance system possible, working across teams, and implementing suggestions from both our audits team and Compound’s team. We have taken lessons learned from auditing GovernorAlpha and GovernorBravo and will have our governor contract externally audited.
Decentralized protocols evolve constantly from the moment of public release. Often, the initial team retains control of the first stages of evolution but eventually delegates to a community of stakeholders. Community decision-making constitutes on-chain governance and has become a central component of decentralized protocols, fueling such varied decisions as parameter tweaking, smart contract upgrades, integrations with other protocols, treasury management, grants, etc.
Governance protocols are generally implemented in a special-purpose smart contract called “Governor,” designed to require minimal use of storage for more gas-efficient operations. For OpenZeppelin Contracts, we built a modular system of Governor contracts to eliminate the need for forking. We accommodate different requirements by writing small modules using Solidity inheritance. OpenZeppelin Contracts contain the most common requirements out of the box. Beyond these, OpenZeppelin Governor could potentially be configured with ERC721 voting power so certain NFT owners can participate in governance when specified, or voting power can also be distributed to multiple ERC20 tokens, among other options that open a variety of possibilities for more inclusive governance.
We believe that giving developers this level of control will lead to unique and imaginative governance use cases not imaginable using other tooling. Writing additional features is simple and we will add new community-requested features in future releases. Visit our forum to contribute. Timelocks, a best-practice for governance management, allows time-delayed opt-out changes in a system. This mechanism lets users exit the system before decision execution if they disagree with a given decision. OpenZeppelin’s TimelockController is used in combination with the GovernorTimelockControl module.
A few projects building governance on OpenZeppelin Governor include Unlock Protocol, Euler, Babylon Finance, and many more. As Vitalik remarked in his latest blog post, the future of on-chain governance might look different than it looks right now. We think OpenZeppelin Governor can be a platform for this kind of experimentation and look forward to exciting new, community-built use cases. If you are interested in seeing if OpenZeppelin Governor is right for your project, check out our documentation and try it for yourself.
- Create a new Governor contract for your project or a Compound compatible smart contract.
- Or use Contracts Wizard for an optimal contract-build experience
- Check out Defender for proposal creation and governance administration
- Visit Tally for voting and community experience.
On September 2nd, we will be hosting a workshop, “Introducing Next Generation Smart Contract Governance,” with guest speaker Dennison Bertram, Co-founder and CEO at Tally. Register here!
Install from npm for local development:
npm install @openzeppelin/contracts
npm install @openzeppelin/contracts-upgradeablefor upgradeable contracts
Vote with Tally: