What is a Governor Contract, and why do DAOs use them?
What is Governor?
The Governor Contract pattern is a commonly used open-source smart contract that allows token holders to control a DAO with fully on-chain voting.
The Governor Contract is responsible for managing DAO proposals. It keeps track of the status of proposals, and it counts the votes to see if they pass. If a proposal passes, the Governor executes the proposal on-chain.
Proposals can do anything that's on chain: send funds from a treasury, update the parameters of a DeFi protocol, change permissions of sub DAOs, mint NFTs, or modify the rules of the Governor itself.
How does Governor work?
A Governor contract needs on a token contract. The token contract provides the Governor the voting power of different addresses. Tally supports Governors that work with both fungible (ERC20) and non-fungible (ERC721) token contracts.
The token contract needs to implement a voting interface so that a Governor can get the voting power of voters’ addresses. If your token doesn’t already have that interface, you can deploy a wrapper contract that does.
The Governor manages proposals and their lifecycle. For example, Compound’s proposals go through this lifecycle:
Why do DAOs use Governor?
The main benefit of the Governor pattern is that the DAO's decision-making happens completely on-chain. Token voters don’t need to trust a third party to count their votes or to execute their transactions, because the smart contract does it entirely on-chain.
Additionally, DAOs can use whatever application interface(s) they want to interact with Governance, because anyone can call the smart contract. Tally is, of course, a widely-used interface, but people also use Sybil or their own UI. Contributors also commonly make calls directly from Etherscan or the command line.
Who made Governor?
Governor was originally released by Compound as Governor Alpha and later Governor Bravo to run their lending protocol. That proved to be very popular! Many other projects forked that pattern.
Yes! Tally’s app expects a certain interface, but there’s lots of flexibility within that interface. OpenZeppelin’s version has several different modules, and the code is fully customizable with their deployment wizard. If you make changes to the contract, you can test them on Tally by deploying to a testnet.