Documentation Portal
Project Home
  • Core Documentation
    • Overview
    • Whitepaper
      • Abstract
      • I. Introduction
      • II. Protocol
        • II.I Operation
          • II.I.I Generation of M
          • II.I.II Protocol Fees
          • II.I.III Cancel and Freeze
          • II.I.IV Retrieving Free Collateral
          • II.I.V The Earn Mechanism
          • II.I.VI Removing a Permissioned Actor
          • II.I.VII Example Interactions and Flows
        • II.II Governance Controlled Protocol Actors
        • II.III Governance Controlled Protocol Parameters
      • III. Governance
        • III.I Inputs
        • III.II Operation
          • III.II.I Epochs
          • III.II.II Proposals
            • III.II.II.I Standard Proposals
            • III.II.II.II POWER Threshold Proposals
            • III.II.II.III ZERO Threshold Proposals
            • III.II.II.IV Proposal Matrix
          • III.II.III Checkpoints and Voting
          • III.II.IV Proposing
          • III.II.V Inflation Mechanics
          • III.II.VI Dutch Auction
          • III.II.VII Delegation
          • III.II.VIII ZERO Claiming of Residual Value
        • III.III Governance Controlled TTG Parameters
        • III.IV Immutable TTG Parameters
        • III.V Immutable POWER Parameters
        • III.VI Immutable ZERO Parameters
      • IV. The M0 Economy
        • IV.I Minters
        • IV.II Validators
        • IV.III Earners
      • V. Off-Chain Ecosystem
        • V.I Guidance
        • V.II Off-Chain Actors and Components
    • Adopted Guidance
      • Adopted Guidance v1.30
        • 1. Description of the Adopted Guidance
          • 1.1. Purpose of the Adopted Guidance
          • 1.2. Change Process for the Adopted Guidance
        • 2. Ecosystem Description
          • 2.1. Actors
          • 2.2. Mandatory Contracts
          • 2.3. Duty of Transparency
          • 2.4. Core Operational Flows
            • 2.4.1. Update Collateral Process
            • 2.4.2. Minting M
            • 2.4.3. Retrieval of Collateral
          • 2.5. High-Risk Jurisdictions
        • 3. Eligible Collateral
          • 3.1. Criteria for Eligible Collateral
          • 3.2. Valuation Policy for Eligible Collateral
          • 3.3. Collateral Storage
          • 3.4. Approved Jurisdictions
            • 3.4.1. Bankruptcy Remoteness
            • 3.4.2. Non-Petition and Non-Seizure Provisions
            • 3.4.3. Priority of Payments and Subordination
            • 3.4.4. Regulatory Compliance
            • 3.4.5. Legal and Regulatory Framework
            • 3.4.6. Political Stability
            • 3.4.7. Dispute Resolution
            • 3.4.8. Asset Segregation
            • 3.4.9. Limited Recourse
            • 3.4.10. Investor Protection
            • 3.4.11. Operational Infrastructure
            • 3.4.12. Custody Relationship
            • 3.4.13. Audit
        • 4. SPV Operators
          • 4.1. Contact Information of Currently Approved SPV Operators
          • 4.2. Eligibility Criteria for Approved SPV Operators
          • 4.3. Obligations of SPV Operators
            • 4.3.1. Obligations in the Normal Course of Business
            • 4.3.2. Obligations Outside of the Normal Course of Business
              • 4.3.2.1. Amicable Wind Down Process
              • 4.3.2.2. Non-Amicable Wind Down Process
              • 4.3.2.3. Minter Insolvency
              • 4.3.2.4. Unauthorized Termination of Minter – SPV Operator Agreement
            • 4.3.3. Operational Obligations of SPV Operators
              • 4.3.3.1. Co-signature of the SPV for significant payments
              • 4.3.3.2. Cooperation with Validators
              • 4.3.3.3. Maintenance of Administrative Buffer
              • 4.3.3.4. No Wire Back Instructions
          • 4.4. Guidelines for Submission of Approval Requests
        • 5. Validators
          • 5.1. Contact Information of Currently Permissioned Validators
          • 5.2. Eligibility Criteria for Permissioned Validators
          • 5.3. Obligations of Validators
          • 5.4. Guidelines for Submission of Permissioning Requests
        • 6. BD Minters and Minters
          • 6.1. Contact Information of Currently Permissioned Minters
          • 6.2. Eligibility Criteria for Permissioned Minters
          • 6.3. Obligations of Minters
          • 6.4. BD Minter and Minter Compliance Requirements
          • 6.5. Guidelines for Submission of Permissioning Requests
        • Adopted Guidance PDF Version
      • Adopted Guidance v1.20 (deprecated)
        • Adopted Guidance PDF Version
    • Glossary
    • Disclosures
    • Whitepaper PDF Version
  • Technical Documentation
    • Protocol Technical Specification
      • Main Invariants
      • Variables
        • Protocol Variables Controlled by TTG
        • Protocol Variables And Definitions
        • Protocol Variables Used For Interest Accruals
      • Protocol And M Token Actors And Actions
        • Protocol Core Functions
          • Minter Gateway
            • updateCollateral
            • proposeMint
            • mintM
            • cancelMint
            • freezeMinter
            • burnM
            • proposeRetrieval
            • activateMinter
            • deactivateMinter
          • M Token
            • startEarning
            • stopEarning
            • transfer
          • Interest Calculations And Indices
            • MinterGateway.updateIndex
            • MinterGateway.currentIndex
            • MToken.updateIndex
            • MToken.currentIndex
            • activeOwedM
          • Interest Rate Models
            • Stable Earner Interest Rate Model Contract
            • Minter Interest Rate Model Contract
    • TTG Technical Specification
      • Main Invariants
      • Core Architecture
        • 1. Registrar
          • Registrar Variables and Getters
          • Registrar Core Functions
        • 2. TTG Governors
          • Matrix Of TTG Proposals
          • 2.1 Standard Governor
            • Variables And Getters
            • Governor Proposal State Transitions
            • Core Functions
            • Core Governance Proposals
          • 2.2 Emergency Governor
            • Emergency Governor Variables And Getters
            • Governor Proposal State Transitions
            • Core functions
              • propose(targets[], values[], callDatas[], description): proposalId
              • castVote(proposalId, support): weight
              • castVotes(proposalIds[], supports): weight
              • execute(targets[], values[], callDatas[], description): proposalId
              • setThresholdRatio(newThresholdRatio)
              • getProposal(proposalId)
              • state(proposalId)
            • Core Governance Proposals
          • 2.3 ZERO Governor
            • Variables And Getters
            • Core Functions
            • Core Governance Proposals
        • 3. POWER Token
          • Variables And Getters
          • POWER Token Core Functions
        • 4. ZERO Token
          • ZERO Token Core Functions
        • 5. Distribution Vault
          • Variables And Getters
          • Core Functions
    • Source Code Reference
      • Protocol
        • Protocol Contracts
          • Core Protocol Contracts
            • MToken
            • MinterGateway
          • Abstract Protocol Contracts
            • ContinuousIndexing
          • Protocol Interfaces
            • IContinuousIndexing
            • IMToken
            • IMinterGateway
            • IRateModel
            • ITTGRegistrar
          • Libs
            • ContinuousIndexingMath
            • TTGRegistrarReader
          • Rate Models
            • Contracts
              • EarnerRateModel
              • MinterRateModel
            • Interfaces
              • IEarnerRateModel
              • IMinterRateModel
      • TTG
        • TTG Contracts
          • Core TTG Contracts
            • DistributionVault
            • Registrar
            • Governors
              • EmergencyGovernor
              • StandardGovernor
              • ZeroGovernor
            • Tokens
              • PowerBootstrapToken
              • PowerToken
              • ZeroToken
          • Abstract TTG Contracts
            • ERC5805
            • Governors
              • BatchGovernor
              • ThresholdGovernor
            • Tokens
              • EpochBasedInflationaryVoteToken
              • EpochBasedVoteToken
            • Interfaces
              • IBatchGovernor
              • IERC5805
              • IERC6372
              • IEpochBasedInflationaryVoteToken
              • IEpochBasedVoteToken
              • IGovernor
              • IThresholdGovernor
          • Deployers
            • EmergencyGovernorDeployer
            • PowerTokenDeployer
            • StandardGovernorDeployer
          • TTG Interfaces
            • IDistributionVault
            • IRegistrar
            • Deployers
              • IDeployer
              • IEmergencyGovernorDeployer
              • IPowerTokenDeployer
              • IStandardGovernorDeployer
            • Governors
              • IEmergencyGovernor
              • IStandardGovernor
              • IZeroGovernor
            • Tokens
              • IPowerBootstrapToken
              • IPowerToken
              • IZeroToken
          • Libs
            • PureEpochs
      • Common
        • Contracts
          • Main
            • ContractHelper
            • ERC20Extended
            • ERC3009
            • ERC712Extended
            • StatefulERC712
          • Interfaces
            • IERC1271
            • IERC20
            • IERC20Extended
            • IERC3009
            • IERC712
            • IERC712Extended
            • IStatefulERC712
          • Libs
            • SignatureChecker
            • UIntMath
    • 🏁Audits
    • 🔛Deployments
Powered by GitBook

M0 Project

  • Home
  • Research

Legal

  • Terms & Conditions
  • Privacy Policy

Copyright 2025 M0 Foundation

On this page
  • Functions
  • sendProposalFeeToVault
  • setCashToken
  • addToList
  • removeFromList
  • removeFromAndAddToList
  • setKey
  • setProposalFee
  • proposalFee
  • getProposal
  • getProposalFee
  • maxTotalZeroRewardPerActiveEpoch
  • numberOfProposalsAt
  • numberOfProposalsVotedOnAt
  • hasVotedOnAllProposals
  • cashToken
  • emergencyGovernor
  • registrar
  • vault
  • zeroGovernor
  • zeroToken
  • Events
  • CashTokenSet
  • HasVotedOnAllProposals
  • ProposalFeeSentToVault
  • ProposalFeeSet
  • Errors
  • FeeNotDestinedForVault
  • InvalidCashTokenAddress
  • InvalidEmergencyGovernorAddress
  • InvalidRegistrarAddress
  • InvalidVaultAddress
  • InvalidZeroGovernorAddress
  • InvalidZeroTokenAddress
  • NoFeeToSend
  • NotSelfOrEmergencyGovernor
  • NotZeroGovernor
  • TransferFailed
  • TransferFromFailed
  1. Technical Documentation
  2. Source Code Reference
  3. TTG
  4. TTG Contracts
  5. TTG Interfaces
  6. Governors

IStandardGovernor

PreviousIEmergencyGovernorNextIZeroGovernor

Inherits: IBatchGovernor

Author: M^0 Labs

Functions

sendProposalFeeToVault

Sends the proposal fee for proposal proposalId to the vault, if it is Defeated or Expired.

function sendProposalFeeToVault(uint256 proposalId) external;

Parameters

Name
Type
Description

proposalId

uint256

The unique identifier of the proposal.

setCashToken

Set the cash token and proposal fee to be used to create proposals going forward.

function setCashToken(address newCashToken, uint256 newProposalFee) external;

Parameters

Name
Type
Description

newCashToken

address

The address of the new cash token.

newProposalFee

uint256

The amount of cash token required onwards to create proposals.

addToList

One of the valid proposals. Adds account to list at the Registrar.

function addToList(bytes32 list, address account) external;

Parameters

Name
Type
Description

list

bytes32

The key for some list.

account

address

The address of some account to be added.

removeFromList

One of the valid proposals. Removes account to list at the Registrar.

function removeFromList(bytes32 list, address account) external;

Parameters

Name
Type
Description

list

bytes32

The key for some list.

account

address

The address of some account to be removed.

removeFromAndAddToList

One of the valid proposals. Removes accountToRemove and adds accountToAdd to list at the Registrar.

function removeFromAndAddToList(bytes32 list, address accountToRemove, address accountToAdd) external;

Parameters

Name
Type
Description

list

bytes32

The key for some list.

accountToRemove

address

The address of some account to be removed.

accountToAdd

address

The address of some account to be added.

setKey

One of the valid proposals. Sets key to value at the Registrar.

function setKey(bytes32 key, bytes32 value) external;

Parameters

Name
Type
Description

key

bytes32

Some key.

value

bytes32

Some value.

setProposalFee

One of the valid proposals. Sets the proposal fee of the Standard Governor.

function setProposalFee(uint256 newProposalFee) external;

Parameters

Name
Type
Description

newProposalFee

uint256

The new proposal fee.

proposalFee

Returns the required amount of cashToken it costs an account to create a proposal.

function proposalFee() external view returns (uint256);

getProposal

Returns all the proposal details for a proposal with identifier proposalId.

function getProposal(uint256 proposalId)
    external
    view
    returns (
        uint48 voteStart,
        uint48 voteEnd,
        ProposalState state,
        uint256 noVotes,
        uint256 yesVotes,
        address proposer,
        uint256 quorum
    );

Parameters

Name
Type
Description

proposalId

uint256

The unique identifier of the proposal.

Returns

Name
Type
Description

voteStart

uint48

The first clock value when voting on the proposal is allowed.

voteEnd

uint48

The last clock value when voting on the proposal is allowed.

state

ProposalState

The state of the proposal.

noVotes

uint256

The amount of votes cast against the proposal.

yesVotes

uint256

The amount of votes cast for the proposal.

proposer

address

The address of the account that created the proposal.

quorum

uint256

The number of votes required to meet quorum.

getProposalFee

Returns the proposal fee information.

function getProposalFee(uint256 proposalId) external view returns (address cashToken, uint256 amount);

Parameters

Name
Type
Description

proposalId

uint256

The unique identifier of the proposal.

Returns

Name
Type
Description

cashToken

address

The address of the cash token for this particular proposal fee.

amount

uint256

The amount of cash token of the proposal fee.

maxTotalZeroRewardPerActiveEpoch

Returns the maximum amount of Zero Token that can be rewarded to all vote casters per active epoch.

function maxTotalZeroRewardPerActiveEpoch() external view returns (uint256);

numberOfProposalsAt

Returns the number of proposals at epoch epoch.

function numberOfProposalsAt(uint256 epoch) external view returns (uint256);

Parameters

Name
Type
Description

epoch

uint256

The epoch as a clock value.

Returns

Name
Type
Description

<none>

uint256

The number of proposals at epoch epoch.

numberOfProposalsVotedOnAt

Returns the number of proposals that were voted on at epoch.

function numberOfProposalsVotedOnAt(address voter, uint256 epoch) external view returns (uint256);

Parameters

Name
Type
Description

voter

address

The address of some account.

epoch

uint256

The epoch as a clock value.

Returns

Name
Type
Description

<none>

uint256

The number of proposals at epoch.

hasVotedOnAllProposals

Returns whether voter has voted on all proposals in epoch.

function hasVotedOnAllProposals(address voter, uint256 epoch) external view returns (bool);

Parameters

Name
Type
Description

voter

address

The address of some account.

epoch

uint256

The epoch as a clock value.

Returns

Name
Type
Description

<none>

bool

Whether voter has voted on all proposals in epoch.

cashToken

Returns the address of the Cash Token.

function cashToken() external view returns (address);

emergencyGovernor

Returns the address of the Emergency Governor.

function emergencyGovernor() external view returns (address);

registrar

Returns the address of the Registrar.

function registrar() external view returns (address);

vault

Returns the address of the Vault.

function vault() external view returns (address);

zeroGovernor

Returns the address of the Zero Governor.

function zeroGovernor() external view returns (address);

zeroToken

Returns the address of the Zero Token.

function zeroToken() external view returns (address);

Events

CashTokenSet

Emitted when the cash token is set to cashToken.

event CashTokenSet(address indexed cashToken);

Parameters

Name
Type
Description

cashToken

address

The address of the cash token taking effect.

HasVotedOnAllProposals

Emitted when voter has voted on all the proposals in the current epoch currentEpoch.

event HasVotedOnAllProposals(address indexed voter, uint256 indexed currentEpoch);

Parameters

Name
Type
Description

voter

address

The address of the account voting.

currentEpoch

uint256

The current epoch number as a clock value.

ProposalFeeSentToVault

Emitted when the proposal fee for the proposal, with identifier proposalFee, is sent to the vault.

event ProposalFeeSentToVault(uint256 indexed proposalId, address indexed cashToken, uint256 amount);

Parameters

Name
Type
Description

proposalId

uint256

The unique identifier of the proposal.

cashToken

address

The address of the cash token for this particular proposal fee.

amount

uint256

The amount of cash token of the proposal fee.

ProposalFeeSet

Emitted when the proposal fee is set to proposalFee.

event ProposalFeeSet(uint256 proposalFee);

Parameters

Name
Type
Description

proposalFee

uint256

The amount of cash token required onwards to create proposals.

Errors

FeeNotDestinedForVault

Revert message when the proposal fee for a yet defeated or yet expired proposal is trying to be moved.

error FeeNotDestinedForVault(ProposalState state);

Parameters

Name
Type
Description

state

ProposalState

The current state of the proposal.

InvalidCashTokenAddress

Revert message when the Cash Token specified in the constructor is address(0).

error InvalidCashTokenAddress();

InvalidEmergencyGovernorAddress

Revert message when the Emergency Governor specified in the constructor is address(0).

error InvalidEmergencyGovernorAddress();

InvalidRegistrarAddress

Revert message when the Registrar specified in the constructor is address(0).

error InvalidRegistrarAddress();

InvalidVaultAddress

Revert message when the Vault specified in the constructor is address(0).

error InvalidVaultAddress();

InvalidZeroGovernorAddress

Revert message when the Zero Governor specified in the constructor is address(0).

error InvalidZeroGovernorAddress();

InvalidZeroTokenAddress

Revert message when the Zero Token specified in the constructor is address(0).

error InvalidZeroTokenAddress();

NoFeeToSend

Revert message when proposal fee trying to be moved to the vault is 0.

error NoFeeToSend();

NotSelfOrEmergencyGovernor

Revert message when the caller is not this contract itself nor the Emergency Governor.

error NotSelfOrEmergencyGovernor();

NotZeroGovernor

Revert message when the caller is not the Zero Governor.

error NotZeroGovernor();

TransferFailed

Revert message when a token transfer, from this contract, fails.

error TransferFailed();

TransferFromFailed

Revert message when a token transferFrom fails.

error TransferFromFailed();
Git Source