DEV Community

Antoni Pawlak
Antoni Pawlak

Posted on

dYdX Governance Mechanism

Who controls dYdX bridge ?

Ownership


Logic

voting power is held by dydx token owners

the proposal goes through stages Pending => Active => Succeeded => Queued => Executed


Proposal creation

DydxGovernor.create(...)
Enter fullscreen mode Exit fullscreen mode

Requirements for creation

PriorityExecutor.validateCreatorOfProposal()
Enter fullscreen mode Exit fullscreen mode
What is being checked
GovernanceStrategy.getPropositionPowerAt() >= getMinimumPropositionPowerNeeded()
Enter fullscreen mode Exit fullscreen mode
getMinimumPropositionPowerNeeded()
GovernanceStrategy.getTotalPropositionSupplyAt(blockNumber)
        .mul(PROPOSITION_THRESHOLD)
        .div(ONE_HUNDRED_WITH_PRECISION)
//PROPOSITION_THRESHOLD = 50
//ONE_HUNDRED_WITH_PRECISION = 10000
Enter fullscreen mode Exit fullscreen mode

current proposal threshold is 0.5%

so anyone with at least 0.5% of total supply of dydx token can create a proposal


Voting result

voting succeeds when

PriorityExecutor.isProposalPassed() && executionTime = 0` 
Enter fullscreen mode Exit fullscreen mode

it means the proposal was voted for by a majority and was not yet executed, now it can be enqueued for execution

What is being checked

isQuorumValid(governance, proposalId) && isVoteDifferentialValid(governance, proposalId)
Enter fullscreen mode Exit fullscreen mode
isQuorumValid
proposal.forVotes >= getMinimumVotingPowerNeeded(votingSupply)
Enter fullscreen mode Exit fullscreen mode
getMinimumVotingPowerNeeded()
votingSupply.mul(MINIMUM_QUORUM).div(ONE_HUNDRED_WITH_PRECISION)
//MINIMUM_QUORUM=200
Enter fullscreen mode Exit fullscreen mode

current minimum quorum is 2%

isVoteDifferentialValid
proposal.forVotes.mul(ONE_HUNDRED_WITH_PRECISION).div(votingSupply) > proposal.againstVotes.mul(ONE_HUNDRED_WITH_PRECISION).div(votingSupply).add(VOTE_DIFFERENTIAL)
//VOTE_DIFFERENTIAL=50
Enter fullscreen mode Exit fullscreen mode

current VOTE_DIFFERENTIAL is 0.5%


Execution

when the vote succeeds it can be executed by executor


dydx token

The token contract is at 0x92d5

Current total supply is 1,000,000,000
Minimum amount to create proposal is 5,000,000
Minimum quorum is 20,000,000

dydx token info

there are:

  • 21 addresses who can create a proposal
  • 8 addresses that can singlehandedly push proposal (if no other address votes)

dydx whales

Top comments (0)