What is a Governor Contract?
What is a Governor Contract, and why do DAOs use them?
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.
A Governor contract manages proposals and their lifecycle. For example, Compound’s proposals go through this lifecycle:
A Governor contract needs 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 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.
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.