The Road to Gov 2.0

This post on Gov 2.0. has been put together by @AugustoL, @Milton and @fnanni.

Hello Everyone,

We (the DXgov team) recently gave a Gov 2.0 update on the DevSync call. We are very excited about the developments and wanted to share them here.

Since its inception in 2019, Reputation (REP) holders have governed DXdao. REP is a non-transferable ERC20 token owned by the DAO and earned through contributions to the DAO. A year later, in 2020, DXdao launched the DXD token. DXD was intended to raise funds for product development and was never assigned any voting power. In addition, DXdao utilizes Holographic Consensus to help the DAO make decisions faster without compromising security. Holographic Consensus uses DAOstack’s ERC20 token, GEN, to stake on proposal outcomes. However, it was always intended to use DXD for this purpose. In 2021, DXdao agreed to a plan dubbed Governance 2.0 that would move DXdao to joint DXD-REP governance.

Gov 2.0 ushers in a new type of governance over the current governance 1.0 model, which only uses REP for voting and GEN for boosting proposals. DXgov has been working on creation of the new “Voting Power Token” that will combine the REP and DXD tokens into one voting token, with DXD to be utilized for its other intended purpose, boosting proposals.

Currently, DXdao’s “1.0” governance system features REP for voting power and GEN for staking on and boosting proposals. DXgov has been working on implementing two big upgrades. Governance 1.5 will have refactored DAOstack contracts along with DXD staking/boosting, and Governance 2.0 introduces a new "Voting Power” token that will combine REP and DXD tokens into a unified governance power. Below we go into further detail and progress on these major upgrades.

Current infrastructure in Governance 1.0

Right now DXdao is still using the following Daostack contracts deployed in May 2019:

  • Avatar: This contract represents the DAO. It is where the Treasury is.
  • Reputation: This is a non-transferable ERC20 token contract, REP. It is owned by the avatar, meaning the DAO, and can mint or burn REP tokens.
  • Schemes: These contracts keep track of the different types of proposals. Proposals are submitted and executed through the relevant Scheme contract.
  • VotingMachine: The voting machine is used by the Scheme contracts. It uses the Reputation contract for voting and it can change the state of a proposal to “Boosted” if the other ERC20 token, GEN, is used to stake on a proposal’s outcome. This “boosted” state is essentially speeding up the voting and execution period of a proposal.
  • Controller: This contract is at the core and it connects the Avatar, Schemes, and Reputation token.

With Gov 1.5 and Gov 2.0, the Avatar, Controller, and Reputation contracts are immutable (which means, once they are deployed, they can’t be changed). The Schemes are registered and unregistered on the controller, and the Voting Machine is registered on the Scheme. So, the Scheme and Voting Machine contracts can be changed or upgraded.

Governance 1.5

The governance 1.5 milestone will focus on redeploying the immutable contracts: the Avatar, Controller, and Reputation. Essentially migrating the current infrastructure to similar contracts, but better optimized to work with DXdao’s needs and roadmap. Additionally, it will use an innovative type of scheme called WalletSchemes. These schemes are very flexible, allowing for the execution of multiple calls in one proposal. They also have a permission layer over them, allowing the DAO to limit the actions each scheme can do and the assets it’s allowed to transfer. Finally, we have the VotingMachine contract that will be used to vote and stake on proposals created by those schemes that will use the DXD token for staking.

So overall, it would be the same experience as using the current Daostack system, but with more flexibility, safer, and specifically designed for DXdao’s needs.

Governance 2.0

Governance 2.0 is the merger of the two parts of DXdao, contributors and the community - Contributors who earned REP in the past four years by contributing to the DAO and community members that hold DXD. This merge will create the Voting Power token that will be used to govern the DXdao treasury.

REP token will remain non-transferable and only to be earned through contributions and DXD, would be like any other ERC20 token, available on the open market with the option to be staked in the DAO to be taken into consideration and counted as Voting Power.

This means that DXdao would have a solid governance side (REP) and a liquid governance side (DXD), allowing the community and contributors to govern together.

How exactly will this be done?

The DXgov team will make use of three contracts - The DXDstake contract that will handle the staking of DXD, the DXDInfluence contract that wraps the staked DXD in the DXDStake contract into an ERC20 token, and finally, the VotingPower contract that merges the REP ERC20 token and DXDInfluence ERC20 token into one single token that keeps track of all the Voting Power over time.

VotingPower will be an ERC20Snapshot token, which is important for voting on-chain. The VotingPower “token” will represent the sum of the new DAOReputation token and the new DXDInfluence token, which are also both ERC20Snapshot tokens.

Let’s get into the details of the terms, what they mean, and how they are derived.

DXDStake.sol Contract

For DXD holders wishing to participate in governance, it will be a requirement to stake DXD to receive the relevant voting influence. The DXDstake contract will handle the staking (locking) of this DXD and the relevant minting or burning of voting influence.

The DXDStake contract will have the following features:

  • For each DXD staked or withdrawn it will mint or burn the relevant influence.
  • A maximum staking period can and must be set by the DAO.
  • The option of early withdrawals.
  • The option of setting a penalty for early withdrawals.
  • The possibility of extending the commitment time of a stake before it ends.
  • Staked DXD will not be transferable, but ownership can change: Staked DXD is non-fungible because each DXD stake locked in the contract is linked to a specific staking time. DXD staked today and for the next four years is not the same as DXD staked for four years that will become available tomorrow. Therefore, staked DXD is not liquid and cannot be transferred. However, ownership of stakes could potentially be traded. More info in the Q&A.
  • DXDStake.sol uses an ERC20 interface and keeps a snapshot history of each of the DXDStake balances (potentially useful for voting, although only DXDInfluence balances are used in the voting power formula). The DAO will own this contract, which is upgradeable.

At the end of the staking period and the commitment period is complete, the user can either withdraw the stake or leave it in the contract. The DXD Influence will remain active until the stake is withdrawn.

DXDInfluence.sol Contract

The DXDInfluence contract is actually “owned” by and works in conjunction with the DXDStake contract. Its primary purpose is to continually report to the VotingPower contract about every change in every stake affecting the Voting Influence of the relevant holder.

The DXDInfluence contract keeps track of these changes through the complex Influence Formula.

The Influence Formula consists of both a linear (LM) and an exponential (EM) term:
DXDInfluence = +^k

LM & EM: are mutable rational numbers to be defined by governance.

stake: is the DXD amount staked in the DXDStake contract.

tc: is the time commitment of the given stake amount.

k: is the exponent, an immutable rational number - closer to 0 means that the longer you stake, the more influence you get, but the influence increment per additional second is less and less

Important notes:

  • A user can have multiple stakes and can set each of the other stakes to the same amount or any other amount, as well as the same or different time commitments for each stake.
  • If the parameters of the equation are incorrect, the influence formula can return negative values. It will be the responsibility of the DAO to make sure this doesn’t happen.

Essentially what this means is:

Influence is calculated on an increasing scale relative to the time for which the DXD is locked, but with diminishing influence rewards as time extends. There will also be a maximum period for which DXD can be locked. The idea behind this is to give long-term DXD holders more voting influence over short-term DXD holders but not to create outsized influence in longer staking/locking periods stakes.

For example:

  • 10 DXD staked for 1 month earns an influence score of 7, whereas
  • 10 DXD staked for 6 months only earns an influence score of 13.

So, DXD influence has been awarded on an increasing scale (more for a longer staking period) but with diminishing influence rewards as time increases (less rewards per DXD, per extra month).

This can be seen here on the example graph, where the purple function line first rises and then slowly flattens as time extends.

VotingPower.sol Contract

The VotingPower contract will pull together the other two contracts and provide the formula that assigns the final VotingPower, an ERC20Snapshot token. The VotingPower token will be a sum of the DAOReputation token and the DXDInfluence token, which are also ERC20Snapshot tokens. This step will be to “normalize” the newly created token by considering the holdings of REP and DXD of individuals in relation to the total supply of the respective tokens. The formulas can be seen below.

The formula that assigns the final Voting Power will be as follows:
Voting Power = weighted % ( DAOReputation) + weighted % (DXDInfluence)

weighted % - to be decided by governance.

The DAOReputation Token formula will be as follows:
DAOReputation = (The user’s REP balance) / (The total REP supply)

The DXDInfluence Token formula will be as follows:
DXDInfluence = (The user’s DXD Influence balance) / (The total DXD Influence supply)

For example:
Let’s make the formula: Voting Power = 50% of REP + 50% of DXD

The DAOReputation Token Calculation
The user’s REP balance: 1 REP
The total REP supply: 10 REP
∴ User’s REP % = 10%

The DXDInfluence Token Calculation
User DXD Influence balance: 10 DXD Influence
DXD Influence total supply: 1000 DXD Influence
∴ User DXD Influence % = 1%

Voting Power = 50%(10%) + 50%(1%)
Voting Power = 5% + 0.5% = 5.5%

What’s Next?

  1. Deploy the new set of DAO contracts (Gov 1.5).
  2. Migrate the REP contract: meaning we will replicate the current REP contracts and then add the parameters that we have invented.
  3. Deploy the VotingPower, DXDStake and DXDInfluence contracts.
  4. Deploy new VotingMachine and Scheme contracts.
  5. Audit contracts.
  6. Gov 2.0 contracts implementation on Project-Davi

After this is completed:

  1. Voting Power will be used for voting instead of REP.
  2. DXD will be used for boosting proposals.
  3. Register a new Scheme.

Some Questions we were asked:

  1. Isn’t changing the ownership of DXD essentially trading the DXD?

Essentially it is, but what happens is that the DXD remains staked in the staking contract even though the owner of the DXD has changed. Voting influence on the DXD moves to the new owner.

Stakes are more like NFTs than ERC20s. For example, it won’t be possible to create a Uniswap pool of DXDStake-ETH because stakes are non-fungible between each other. A DXD stake is like an NFT that contains an amount of DXD influence, an amount of DXD, and a withdrawal date.

  1. Why is there a minimal DXD threshold and is that related to a global constraint or an individual requirement?

DXD Influence will be included in the voting power formula at a given snapshot ONLY IF the DXD Influence total supply is above a minimum value. Otherwise, the voting power formula falls back to the legacy voting system based on REP.

It is a safety mechanism to protect the DAO from malicious actors. Let’s see what happens when a minimum threshold is not used:

If one person stakes 0.001 DXD and is the only one that has staked, then he will have a tiny amount of DXDInfluence. However, now the total supply of DXD Influence will belong to him. If the tokens were assigned a 50% weight each, this would mean that this person would then have 50% of the voting power and control the DAO with only 0.001 DXD.

So the threshold is applied to DXD Influence instead of to the DXD staked. This is to prevent manipulation of the staked DXD, which can be done by staking a large amount in a short time frame.

  1. Can locked DXD be used to boost proposals?

No, locked or staked DXD cannot be used to boost proposals.

We hope you enjoyed the update and peek behind the curtain. As always we welcome any feedback. Even with the contract development at an advanced stage, we’d like to remind everyone that the contracts still need to be audited and that things are still open to change.

For those interested to see behind the curtain, you can find the REPO here:


Thanks for the post @whatt4 and good to see that @Milton and @fnanni are coding up Governance 2.0. It’s an exciting system that I think is important for DAOs.


Great post.

Thanks for the sneak peak, it was a great read and overview of the governance 2.0.