LogoLogo
Threshold WebsitetBTC v2 DocsTACo Docs
  • What is the Threshold Network?
  • THRESHOLD DASHBOARD
    • tBTC Minting Walkthrough
  • Applications
    • tBTC Bitcoin Bridge
      • Fees
      • Wallet Generation
      • Wallet Signing
      • The Path to Permissionlessness
      • Sweeping
      • Coverage Pool
    • Threshold USD
      • Overview of thUSD
      • Borrowing
      • Stability Pool and Liquidations
      • Redemptions and thUSD Price Stability
      • Recovery Mode
      • Bootstrapping
        • Initial Protocol Loan
      • B. Protocol
      • thUSD on Build on Bitcoin (BOB)
        • Connecting to BOB Network
        • Bridging Collateral to BOB Network
        • Opening Collateral Vaults and Minting thUSD
  • Governance
    • Threshold DAO
      • 🗳️Governance Process
      • 🙋‍♀️Guilds
      • 💰Threshold Multisigs
      • Threshold DAO Rules
    • Vote Delegation
      • Liquid Token Delegation
  • Staking & Running a Node
    • tBTC v2 Node Setup
      • Operator Account
      • Application Authorization & Operator Registration
      • Network Configuration
      • Data Storage
      • Installation
        • Docker Installation
        • Binary Installation
      • Updating tBTC v2 Node
      • Advanced Options
        • Alternatives to Dashboard
        • Logging
        • Config File
        • CLI Options
        • Client Info
      • Frequently Asked Questions
      • Sepolia Testnet
        • Testnet tBTC v2 node Setup
    • tBTC Beta Stakers Program
  • App Development
    • DAO Contracts
      • DAO Contracts API
        • BaseTokenholderGovernor
        • Checkpoints
        • GovernorParameters
        • IApplication
        • ILegacyTokenStaking
        • IStaking
        • IVotesHistory
        • KeepStake
        • PercentUtils
        • ProxyAdminWithDeputy
        • SafeTUpgradeable
        • StakerGovernor
        • StakerGovernorVotes
        • T
        • TokenholderGovernor
        • TokenholderGovernorVotes
        • TokenStaking
        • VendingMachine
    • Random Beacon
      • Random Beacon API
        • AltBn128
        • BeaconAuthorization
        • BeaconDkg
        • BeaconDkgValidator
        • BeaconInactivity
        • BLS
        • BytesLib
        • Callback
        • Governable
        • Groups
        • IRandomBeacon
        • IRandomBeaconConsumer
        • ModUtils
        • RandomBeacon
        • RandomBeaconChaosnet
        • RandomBeaconGovernance
        • Reimbursable
        • ReimbursementPool
        • Relay
    • tBTC
      • tBTC SDK
        • Quickstart
        • Architecture
        • Guides
          • Initialize SDK
            • Ethereum and Bitcoin mainnet
            • Ethereum and Bitcoin testnet
            • Crosschain
            • Custom mode
          • Deposit and mint
          • Unmint and redeem
        • API Reference
      • tBTC Contracts API
        • Bridge API
          • Bank
          • BitcoinTx
          • Bridge
          • BridgeGovernance
          • BridgeGovernanceParameters
          • BridgeState
          • Deposit
          • DepositSweep
          • DonationVault
          • EcdsaLib
          • Fraud
          • GovernanceUtils
          • Heartbeat
          • IReceiveBalanceApproval
          • IRelay
          • IVault
          • L2TBTC
          • L2WormholeGateway
          • LightRelay
          • LightRelayMaintainerProxy
          • MaintainerProxy
          • MovingFunds
          • Redemption
          • TBTC
          • TBTCOptimisticMinting
          • TBTCVault
          • VendingMachine
          • VendingMachineV2
          • VendingMachineV3
          • WalletCoordinator
          • Wallets
        • ECDSA API
          • EcdsaAuthorization
          • EcdsaDkg
          • EcdsaDkgValidator
          • EcdsaInactivity
          • IWalletOwner
          • IWalletRegistry
          • WalletRegistry
          • WalletRegistryGovernance
          • Wallets
  • Resources
    • T Token
    • Contract Addresses
      • Mainnet
        • Threshold DAO
        • tBTC
        • thUSD
        • Legacy
      • Görli Testnet
      • Sepolia Testnet
    • tBTC Pools
    • Upgrade NU & KEEP to T
    • Contribution
    • Security
    • Brand Assets
    • Links
Powered by GitBook
On this page
  • GovernorParameters
  • FRACTION_DENOMINATOR
  • AVERAGE_BLOCK_TIME_IN_SECONDS
  • quorumNumerator
  • proposalThresholdNumerator
  • QuorumNumeratorUpdated
  • ProposalThresholdNumeratorUpdated
  • VotingDelaySet
  • VotingPeriodSet
  • constructor
  • updateQuorumNumerator
  • updateProposalThresholdNumerator
  • setVotingDelay
  • setVotingPeriod
  • quorum
  • proposalThreshold
  • proposalThreshold
  • votingDelay
  • votingPeriod
  • _updateQuorumNumerator
  • _updateProposalThresholdNumerator
  • _setVotingDelay
  • _setVotingPeriod
  • _getPastTotalSupply

Was this helpful?

Export as PDF
  1. App Development
  2. DAO Contracts
  3. DAO Contracts API

GovernorParameters

GovernorParameters

Abstract contract to handle governance parameters

Based on GovernorVotesQuorumFraction, but without being opinionated on what's the source of voting power, and extended to handle proposal thresholds too. See OpenZeppelin's GovernorVotesQuorumFraction, GovernorVotes and GovernorSettings for reference.

FRACTION_DENOMINATOR

uint256 FRACTION_DENOMINATOR

AVERAGE_BLOCK_TIME_IN_SECONDS

uint64 AVERAGE_BLOCK_TIME_IN_SECONDS

quorumNumerator

uint256 quorumNumerator

proposalThresholdNumerator

uint256 proposalThresholdNumerator

QuorumNumeratorUpdated

event QuorumNumeratorUpdated(uint256 oldQuorumNumerator, uint256 newQuorumNumerator)

ProposalThresholdNumeratorUpdated

event ProposalThresholdNumeratorUpdated(uint256 oldThresholdNumerator, uint256 newThresholdNumerator)

VotingDelaySet

event VotingDelaySet(uint256 oldVotingDelay, uint256 newVotingDelay)

VotingPeriodSet

event VotingPeriodSet(uint256 oldVotingPeriod, uint256 newVotingPeriod)

constructor

constructor(uint256 quorumNumeratorValue, uint256 proposalNumeratorValue, uint256 initialVotingDelay, uint256 initialVotingPeriod) internal

updateQuorumNumerator

function updateQuorumNumerator(uint256 newQuorumNumerator) external virtual

updateProposalThresholdNumerator

function updateProposalThresholdNumerator(uint256 newNumerator) external virtual

setVotingDelay

function setVotingDelay(uint256 newVotingDelay) external virtual

Update the voting delay. This operation can only be performed through a governance proposal. Emits a VotingDelaySet event.

setVotingPeriod

function setVotingPeriod(uint256 newVotingPeriod) external virtual

Update the voting period. This operation can only be performed through a governance proposal. Emits a VotingPeriodSet event.

quorum

function quorum(uint256 blockNumber) public view virtual returns (uint256)

Compute the required amount of voting power to reach quorum

Parameters

Name
Type
Description

blockNumber

uint256

The block number to get the quorum at

proposalThreshold

function proposalThreshold() public view virtual returns (uint256)

Compute the required amount of voting power to create a proposal at the last block height

This function is implemented to comply with Governor API but we we will actually use proposalThreshold(uint256 blockNumber), as in our DAOs the threshold amount changes according to supply.

proposalThreshold

function proposalThreshold(uint256 blockNumber) public view returns (uint256)

Compute the required amount of voting power to create a proposal

Parameters

Name
Type
Description

blockNumber

uint256

The block number to get the proposal threshold at

votingDelay

function votingDelay() public view virtual returns (uint256)

module:user-config

Delay, in number of block, between the proposal is created and the vote starts. This can be increassed to leave time for users to buy voting power, of delegate it, before the voting of a proposal starts.

votingPeriod

function votingPeriod() public view virtual returns (uint256)

module:user-config

Delay, in number of blocks, between the vote start and vote ends.

NOTE: The {votingDelay} can delay the start of the vote. This must be considered when setting the voting duration compared to the voting delay.

_updateQuorumNumerator

function _updateQuorumNumerator(uint256 newQuorumNumerator) internal virtual

_updateProposalThresholdNumerator

function _updateProposalThresholdNumerator(uint256 proposalNumerator) internal virtual

_setVotingDelay

function _setVotingDelay(uint256 newVotingDelay) internal virtual

_setVotingPeriod

function _setVotingPeriod(uint256 newVotingPeriod) internal virtual

_getPastTotalSupply

function _getPastTotalSupply(uint256 blockNumber) internal view virtual returns (uint256)

Compute the past total voting power at a particular block

Parameters

Name
Type
Description

blockNumber

uint256

The block number to get the vote power at

PreviousCheckpointsNextIApplication

Last updated 1 year ago

Was this helpful?