Compound Governance

Compound is on a goal to create a financial infrastructure that applications and developers can rely on, forever. To get there, Compound intends to fully decentralize the Compound protocol — removing the largest single point of failure (i.e. Compound's team), and creating an indestructible, open protocol that can evolve in entirely new ways.

What is Compound?

Compound is an autonomous, algorithmic money market built on Ethereum which can be used to supply and borrow assets. It is an interest rate protocol built for developers to unlock a universe of open financial applications via smart contracts. It is a DApp that allows users to earn interest on their crypto holdings

The platform works by letting users contribute or deposit crypto funds into a liquidity pool in order to earn interest on their assets. Users can currently use 14 different cryptocurrencies and the top three markets in Compound are USD Coin, Dai  and Ether.

Compound has an interesting logic behind its name. We know that Compound allows users to seamlessly lend, borrow, and earn interest in cryptocurrency. By locking in the crypto funds with the platform, increasingly lucrative returns can be observed. These returns come with compounding interest. For example, if you lent ETH to Compound’s pool of funds, you would begin to see interest accrue in the form of ETH almost immediately. 

How Compound Works?

The compound DAO has a quite unique working mechanism. It allows you to borrow money by putting up your money as collateral. 
In order to receive cTokens or borrow assets from the protocol via the cToken contracts, accounts on the blockchain supply capital in the form of either Ether or ERC-20 tokens. This involves holding other assets as collateral. The Compound cToken contracts track these balances and set interest rates for the borrowers.

This automated process can take place due to the smart contracts that are built into Compound’s native cTokens.

  • When the users lock in funds with Compound, their holdings are converted to cTokens that represent the value of the crypto they have put in. This also portrays their stake.
  • These cTokens behave somewhat similar to a contract at a bank, through which borrowers and lenders agree to the terms and conditions of a specific transaction. 
  • The Compound protocol proves to be a better option than a traditional loan for a plethora of reasons.Here, formal hassles and complications are completely ruled out as the contract terms are coded into the protocol and cTokens. 
  • These predetermined smart contracts serve as the basis for all the decisions regarding how much interest is to be rewarded etc.

cTokens and COMP tokens

There are two types of tokens in the compound DAO ie. the cTokens which are the supply tokens and COMP tokens which are the governance tokens. Let us explore both of these tokens in a detailed manner.

The cTokens

The Compound cTokens are used in the contracts which involve lending and borrowing. This token helps the users to interact with the Compound Platform. There are currently two types of cTokens: CErc20 and CEther. These are the tokens which we get when we provide DAI or ETH tokens for lending. 

The cToken is a vital element of Compound DAO as it plays the prime role in executing all the functions ranging from minting, redeeming and borrowing to repaying or liquidating a borrow. This token integrates all the assets supported by Compound.

Here is an example for you!

It is always better to understand anything with an example. Here’s one for you! For instance, someone supplies 1,000 DAI to the Compound protocol. Let us assume the exchange rate to be 0.020070. In this case, the person would receive 49,825.61 cDAI (1,000/0.020070).

Thereafter, if the person wishes to withdraw his DAI from the protocol he can transform his cDAI to DAI again, Let us assume the exchange rate has changed to 0.021591.

Now, 49,825.61 cDAI is equal to 1,075.78 DAI (49,825.61 * 0.021591)

This 1,075.78 DAI can now be withdrawn which would redeem all 49,825.61 cDAI.

The option of partial withdrawal is also available. For instance, if the original 1,000 DAI is withdrawn, this would redeem 46,315.59 cDAI. In this case 3,510.01 cDAI would remain in the wallet.

COMP Token

COMP, an ERC-20 token by nature, is the governance token of Compound which facilitates the delegation of voting rights to any address.The COMP token-holders and their delegates possess the right and power to propose and vote regarding all changes to the protocol. They also discuss and debate the changes pertaining to Compound.

The voting rights can be delegated by the token holders to their own address as well. 

The voting rights of the delegate are automatically adjusted in accordance to the changes in the token balance of the token holder.

The governance proposals can be created by the addresses which have been delegated 65000 COMP tokens. This is the minimum amount required in order to create a governance proposal. For creating an autonomous proposal a minimum of 100 COMP should be locked in the address. This autonomous proposal will subsequently become a governance proposal if 65000 COMP are delegated to it.

Initial distribution strategy

Compound opted for a planned and organized strategy to distribute the initial COMP token without the direct involvement of the public.

Initially, a portion of the COMP tokens were distributed amongst the company’s shareholders.These shareholders could further delegate the voting authority to themselves or the public. This decision making power rested with them initially.

Thereafter, when the governance system began to operate in a reliable and systematic manner, the distribution of COMP tokens to Compound protocol users was initiated.

Daily distribution strategy

Interestingly, as of now, around 2,312 COMP is being distributed to users of the protocol each day! The Reservoir contract transfers 0.50 COMP per Ethereum block (~2,880 per day) into the protocol for distribution.The distribution is allocated to each market such as ETH, USDC and DAI. This is set through the governance process by COMP token-holders. The distribution is in proportion to the interest being accrued in the market.

Within each market, half of the distribution is earned by suppliers, and the other half by borrowers. Moreover, the users earn COMP proportionate to their balance, irrespective and independent of the natural interest rates in the market.


Role in governance

COMP being the governance token assumes a prime role in the protocol governance. It facilitates the token holder to delegate the voting rights to the address of their choice. The rights can be delegated to the owner’s wallet, another user, any application, or a DeFi expert.

Anybody who has received delegation by a COMP holder can participate in Compound governance by receiving delegation. Anyone holding a COMP token can vote for or against the proposals. Each COMP token is equivalent to one vote. This further implies that the weight of one’s vote is directly proportional to the amount of COMP token one owns.

How Can Compound Holders Submit a Proposal?

Creating a proposal in Compound DAO is quite easy! Anyone can autonomously create proposals to change certain aspects such as assets’ collateral factor, interest rate models, addition or removal of markets, and other parameters used by the Compound protocol  by locking 100 COMP in an address. However, as stated earlier, this proposal will not be eligible for voting until the proposer’s address is delegated 65,000 COMP. After a 3-day voting process, a proposal that has garnered at least 400,000 positive votes is queued on the protocol’s Timelock for two days before being implemented. 

Governance in Compound

Governance is the essence of a DAO. Compound DAO has a fully developed and effective governance mechanism. It has a robust approach to on-chain governance. Let us have a look at the intricacies of the Compound governance model.

Usually voters can either opt for a Yes or a No vote, but here, voters can opt for a third option, which is Abstain.  Also, they can add comments to explain the reason for supporting or rejecting a proposal. Moreover, proposers can adjust parameters like voting delay, voting periods and submission threshold.

Key concepts

Explore these key concepts to have a crystal clear understanding of the governance in compound.

  • COMP — It is the ERC-20 token that designates the weight of a user’s voting rights. The more COMP a user has in their wallet, the more weight their delegation or vote on a proposal holds.
  • Delegation — COMP holders cannot vote or create proposals until they delegate their voting rights to an address. Delegation can be given to one address at a time, including the COMP holder’s own address.
  • Proposals — A proposal is executable code that modifies the protocol and how it works. In order to create a proposal, a user must have at least 60,000 COMP delegated to their address. Proposals are stored in the “proposals” mapping of the Governance smart contract. All proposals are subject to a 3-day voting period. If the proposer does not maintain their vote weight balance throughout the voting period, the proposal may be canceled by anyone.
  • Voting — Users can vote for or against single proposals once they have voting rights delegated to their address. Votes can be cast while a proposal is in the “Active” state. Votes can be submitted immediately using “castVote” or submitted later with “castVoteBySig.” If the majority of votes (and a 4% quorum of delegated COMP, i.e. 400,000 COMP) vote for a proposal, the proposal is queued in the Timelock.
  • Timelock — All governance and other administrative actions are required to sit in the Timelock for a minimum of 2 days, after which they can be implemented into the protocol.

Proposals

The proposals can be used to make changes in the compound protocol. For instance, A proposal can set a cToken's interest rate model or risk parameters on the Comptroller.

Proposals will be voted on by delegated voters. If there is sufficient support before the voting period ends, the proposal shall be automatically enacted. Enacted proposals are queued and executed in the Compound Timelock contract. The sender must hold more COMP than the current proposal threshold (proposalThreshold()) as of the immediately previous block. If the threshold is 65,000 COMP, the sender must have been delegated more than 1% of all COMP in order to create a proposal.

The proposal can have up to 10 actions (based on proposalMaxOperations()). The proposer cannot create another proposal if they currently have a pending or active proposal. It is not possible to queue two identical actions in the same block (due to a restriction in the Timelock), therefore actions in a single proposal must be unique, and unique proposals that share an identical action must be queued in different blocks.

Components of a proposal

Let us have a look at the various components of a proposals in the compound DAO-

  • Targets: When the proposals are to be executed, calls need to be made to the target addresses. This component i.e. Targets involves the ordered list of the same.
  • Values: During the execution of a proposal, the ordered list of values (i.e. msg.value) which is passed to the calls made is depicted here.
  • Signatures: Here, the ordered list of function signatures to be passed during execution is presented. 
  • Calldatas: It represents the ordered list of data to be passed to each individual function call at the time of execution of the proposal.
  • Description: This portion entails an understandable description of the proposal and all the changes proposed within it.
  • Return: This represents the identity (ID) of the newly created proposal.

Queue

Once the proposal is approved and has succeeded ,it is then forwarded to the Timelock waiting period. To execute this process, the Queue function comes into play! The waiting period begins when this function is called.

The queue function can be called by any Ethereum address.

Execution

The next step is proposal execution. After the completion of the Timelock waiting period, the actual execution of the proposal takes place via this function. The actions and changes prescribed in the proposal will be implemented in this phase. This function can be called by any Ethereum address.

An important point to be noted here is that this function is payable, so the Timelock contract can invoke payable functions that were selected in the proposal.

Cancellation

The proposal can be cancelled at any stage before the execution. By the use of this function, the proposal can also be cancelled while it is queued in the timeline.

The cancel function can be called by the proposal creator. Any other ethereum address can also carry out this function incase the proposal holder fails to meet the delegate votes criteria (ie. the votes are less than 65000.)

Voting Delegation

There are two methods by which a user can delegate their voting rights or cast votes on proposals

  1. Direct method- It involves calling the relevant functions (delegate, castVote) directly
  2. By Signature- Delegation can also take place by using by-signature functionality (delegateBySig, castVotebySig).

The by-signature functionality comes with an additional advantage for the users! Here, the users can create a signed delegate or vote transaction for free, and have a trusted third-party spend ETH on gas fees and write it to the blockchain for them.

Delegate Votes By Signature

COMP token holders can delegate their voting rights to any Ethereum address by using an EIP-712 “typed-structured data” signature. The users who have a signed delegation transaction are entitled to use the COMP smart contract’s delegateBySig method.

How to collect votes by delegate by signature method?

The delegatee can create a web page where users sign a delegateBySig transaction using MetaMask and their private key. This can be posted to the delegatee’s web server.  Thereafter, the delegatee can compile the signatures into a single Ethereum transaction, and officially collect the voting rights of their constituents by executing the delegateBySig method.

Cast Vote By Signature

The users can enable a third party to submit a vote on their behalf in any single Compound governance proposal, with the same type of signature as delegateBySig. Anyone that has a signed vote transaction is eligible to use Governer smart contract’s castVoteBySig method. One important point to be kept in mind here is that the voting power is held by the third party only for a single proposal instead of permanent delegation.

Also, if the third party has not yet published the signed transaction that was given to him, the signatory still holds the power to vote on his own behalf in the proposal.

Technologies Used for Governance

Interestingly, compound has its own governance module called “Governor Bravo”. It allows COMP token holders to propose changes to the protocol. However, only the addresses with more than 65000 COMP tokens are eligible for the same.

Addresses possessing voting power can submit their votes during a 3 day voting period. If a majority, and at least 400,000 votes are cast for the proposal, it further moves to the next stage. Thereafter, it is queued in the Timelock and can be implemented after 2 days.


Governor Bravo Features

Let us look at some salient features of Governor Bravo!

  1. Abstain option on voting - Along with yes and no, an additional option for voting is also available. This allows for users to abstain votes on chain. 
  2. Voting reason string - The users can explain the reason for their vote. This is stored along with the vote receipt.
  3. Setting governance parameters - The changes to the governance process are facilitated without the formation of new contracts as the fields such as voting period, voting delay, proposal threshold are settable.
  4. Proposal Cancellation- The proposer can himself cancel the proposal anytime before execution. This process proves to be highly beneficial in case a proposal is submitted by mistake. The error can effectively be rectified.

What can we learn?

Compound sets itself apart from other Decentralised Finance Protocols in a number of ways! It is a highly competitive application in the emerging field of DAOs. Let's have a look at what we can learn from the compound DAO!

  1. Timeboxed Voting mechanism - Compound entails a timeboxed voting mechanism wherein the voting task must be accomplished within stipulated time frame. This further implies a steady voting process.
  2. Token Threshold to Create Proposals - Proposal creator must hold more COMP than the current proposal threshold (proposalThreshold()) as of the immediately previous block. If the threshold is 65,000 COMP, the creator must have been delegated more than 1% of all COMP in order to create a proposal. This reduces the noise by only allowing most relevant members to create proposals
  3. Awarding COMP tokens to the users - Regular users assume an advantageous position as Compound awards its users with COMP tokens. They have more say in the governance. Each day, approximately 2,312 COMP will be distributed to users of the protocol. 
  4. Vote Delegation - The COMP token holders can either self-delegate or delegate their voting power to another user. The mechanism works with a precisely defined set of rules.
  5. Governor Bravoc - Compound invested into DAO and created their own contracts for governance. Governor Bravo, which is created by compound protocol, is an ideal platform for effective governance. It is used by uniswap as well!

Reference Links

https://www.comp.xyz/t/governor-bravo-development/942

https://compound.finance/docs/ctokens 

https://compound.finance/governance/comp

https://medium.com/tally-blog/understanding-governor-bravo-69b06f1875da

https://compound.finance/docs/governance#introduction

https://coinmarketcap.com/alexandria/article/what-is-compound

https://medium.com/compound-finance/expanding-compound-governance-ce13fcd4fe36

https://medium.com/compound-finance/compound-governance-decentralized-b18659f811e0

https://medium.com/compound-finance/comp-governance-distribution-update-f371c1cb9ca1

https://medium.com/compound-finance/compound-governance-5531f524cf68

https://medium.com/compound-finance/delegation-and-voting-with-eip-712-signatures-a636c9dfec5e

https://compound.comradery.io/post/1464