The Diva Staking DAO is a trustless Decentralized Autonomous Organization that aims to curate the Diva Staking protocol.
It may interact with certain configurable parameters of the Diva Staking protocol in the future when the main Diva Staking contracts are deployed.
This DAO uses Open Zeppelin's Governor with two custom extensions:
- Configuring timelock delays
- Customizing votes accounting
In order to remain fully trustless, the process of cancelling proposals does not rely on a guardian, nor does a multi-sig control it. A cancellation proposal has to be done following a governance process and has different constraints than standard proposals.
- ERC20
- Name: Diva Token
- Symbol: DIVA
- Decimals: 18
- Total supply: 1.000.000.000.
The total supply of DIVA was minted in a 2-step process:
- an initial supply and deployment time of 884,150,000 DIVA for early supporters, Initial Distribution DIVA claim, and DAO treasury.
- a second mint totaling 115,850,000 DIVA aimed to be distributed to a not-for-profit entity/organization. Finally, that deployment was triggered by the same deployment wallet and pointed to an address provided by The Staking Foundation.
The DIVA-specific customizations include:
- DIVA token smart contract sets initially the DAO Governor address as “owner”. Enabling transferability results on the DAO Governor contract address automatically renouncing ownership of the DIVA token smart contract (“renounce ownership” function being triggered by “enable transferability” function).
- Pausable (one-shot transferability fuse). The token is paused in the deployment and can only be unpaused through a governance process once the non-transferability period expires.
- Minimum non-transferability period 10 weeks.
- As explained before, the ownership of Diva Token is triggered with the unpause (being dependent functions).
- ERC20Votes extension to create snapshots of the voting power.
- Custom method added to Diva Token to facilitate the delegation of Diva Token from Merkle Distributor.
- Concerning pausability, there are two exceptions:
- transfers were enabled from address 0 (allowing the minting process).
- transfers were enabled from the MerkleDistributorWithDelegation contract (allowing whitelisted users to claim their tokens).
- Diva token contract has a custom function that eases self-delegations from the Merkle Distributor contract.
DivaGovernor is based on the Open Zeppelin governor with two in-house extensions. The main settings are:
- Governance token: Delegated DIVA Token
- Governor name: Diva Governor
- Proposal threshold: 1M Delegated DIVA Token
- Voting delay: 2 days
- Voting period: 3 days
- Quorum: 10M Delegated DIVA Tokens
- GovernorTimelockControlConfigurable: extension that adds different delays for the timelock controller. These delays are set up based on the function signatures of the actions within the proposal. There are three different delays:
- short delay: only for cancellation proposal.
- default delay: the common delay for proposals.
- long delay: an extended delay for critical proposals.
- GovernorCountingThresholds: extension that adds different success thresholds for a proposal to be approved. Following the GovernorTimelockControlConfigurable, these different thresholds are set up based on the function signatures of the actions within the proposal. The thresholds are:
- default treshold: >50%
- moderate treshold: >66%
- large treshold: >75%
DivaTimelockController inherits Open Zeppelin Timelock controller and extends it with a method for a custom initialization.
- A delegate must have more voting power than the Proposal thresholds to initiate a proposal. This requirement was introduced mainly to avoid proposal spamming (enabled with the
ProposalThreshold
parameter from Open Zeppelin GovernorSettings). - Once a proposal is approved, anyone can queue it.
- After the queueing period, anyone can execute it.
- If a potentially malicious proposal is submitted, the proposal can only be canceled by submitting another proposal. With this solution, there is a tradeoff between trust and community.
All the launch strategy relies on the "hardhat-deploy" plugin. There are three relevant directories for the launch strategy:
- ./deploy where all the scripts for the deterministic launch are in place.
- ./deploy-configuration where main deployment configuration parameters are set.
- ./distro where the parameters related to the tokens distribution can be found.
- Diva token (transaction)
- DivaTimelockController (transaction)
- DivaGovenor (transaction)
- Merkle Distributor with Delegation (transaction)
- DivaStakingDAO setup (transaction)
- Token distribution (transaction)
- Minting of The Staking Foundation tokens (transaction)
- Withdraw of unclaimed Diva tokens after claiming period expired (transaction)
As DivaStakingDAO relies on "hardhat-deploy", the deployment can be done by simply running the following command:
npx hardhat deploy --network [NAME OF THE NETWORK]
- Diva token:
0xBFAbdE619ed5C4311811cF422562709710DB587d
- Merkle Distributor with Delegation:
0x777E2B2Cc7980A6bAC92910B95269895EEf0d2E8
- DivaGovernor:
0xFb6B7C11a55C57767643F1FF65c34C8693a11A70
- DivaTimelockController:
0x4eBB20995B6264b4b1E25f4473a4636CDB6a9790
Tally is a web interface that eases the interaction with standard governor contracts. As DivaStakingDAO is built using Open Zeppelin's implementation of the governor, integration with Tally is straightforward. From Tally, users can delegate, propose (having enough voting power), queue and execute proposals. DivaStakingDAO
Diva's Merkle Distributor with Delegation is based on the de-facto standard contract for token distributions, the Merkle distributor from Uniswap.
Diva's Merkle Distributor inherits the Merkle distributor with deadline overriding its claim
method and enabling a claimAndDelegate
method to ensure that all Diva tokens claimed are for people willing to be part of DivaStakingDAO.
Diva Staking DAO tokens claim distribution criteria are described in the following repository.
DivaStakingDAO Contracts are released under MIT LICENSE or GPL 3.0.