Propose

Propose

Create a Proposal to change the protocol. E.g., A proposal can set a cToken’s interest rate model or risk parameters on the Comptroller. Proposals will be voted on by delegated voters. If there is sufficient support before the voting period ends, the proposal shall be automatically enacted. Enacted proposals are queued and executed in the Compound Timelock contract.

The sender must hold more esLBR than the current proposal threshold (proposalThreshold()) as of the immediately previous block. If the threshold is 100,000 esLBR, the sender must have been delegated more than 0.1% of all esLBR in order to create a proposal.

To create a Governance Proposal:

  1. Write the code for your proposal, which can be voted on through any Governance Portal. More resources can be found here 226. All proposed code should be audited by a professional auditor. This auditing process could be paid or reimbursed by the community treasury.

  2. Ensure at least 10 million esLBR is delegated to your address in order to submit a proposal, or find a delegate who has enough delegated esLBR to meet the proposal threshold to propose on your behalf.

  3. Call the propose() function of the Lybra Governance to deploy your proposal.

Once the propose() function has been called, a 7 day voting period is started. Ongoing discussion can take place in the discord. If the proposal passes successfully, a 2 day timelock will follow before the proposed code is executed.

function propose(address[] targets, uint256[] values, bytes[] calldatas, string description) → uint256 proposalId
  • targets: ID of a proposal in which to cast a vote.

  • values: An integer of 0 for against, 1 for in-favor, and 2 for abstain.

  • calldatas: An integer of 0 for against, 1 for in-favor, and 2 for abstain.

  • description: An integer of 0 for against, 1 for in-favor, and 2 for abstain.

  • RETURN: ID of a proposal in which to cast a vote.

  • Emits a ProposalCreated event.

Proposal Info

Hash Proposal

The proposal id is produced by hashing the ABI encoded targets array, the values array, the calldatas array and the descriptionHash (bytes32 which itself is the keccak256 hash of the description string).

function hashProposal(address[] targets, uint256[] values, bytes[] calldatas, bytes32 descriptionHash)
  • targets: ID of a proposal in which to cast a vote.

  • values: An integer of 0 for against, 1 for in-favor, and 2 for abstain.

  • calldatas: An integer of 0 for against, 1 for in-favor, and 2 for abstain.

  • descriptionHash: The keccak256 hash of the description string.

  • RETURN: ID of a proposal in which to cast a vote.

Threshold

This restricts proposal creation to accounts who have enough voting power.

function proposalThreshold(uint256 proposalId)
  • proposalId: ID of a proposal in which to cast a vote.

  • RETURN: Enum Of Proposal State

State

Current state of a proposal

function state(uint256 proposalId)
  • proposalId: ID of a proposal in which to cast a vote.

  • RETURN: Enum Of Proposal State

Snapshot

Timepoint used to retrieve user’s votes and quorum.The snapshot is performed at the end of this block. Hence, voting for this proposal starts at the beginning of the following block.

function proposalSnapshot(uint256 proposalId)
  • proposalId: ID of a proposal in which to cast a vote.

  • RETURN: Enum Of Proposal State

Deadline

Timepoint at which votes close. If using block number, votes close at the end of this block, so it is possible to cast a vote during this block.

function proposalDeadline(uint256 proposalId)
  • proposalId: ID of a proposal in which to cast a vote.

  • RETURN: Enum Of Proposal State

Eta

Public accessor to check the eta of a queued proposal

function proposalEta(uint256 proposalId)
  • proposalId: ID of a proposal in which to cast a vote.

  • RETURN: The timestamp when a certain action or function call is scheduled to be executed or become available.

Proposer

The account that created a proposal.

function proposalProposer(uint256 proposalId)
  • proposalId: ID of a proposal in which to cast a vote.

  • RETURN: The account that created a given proposal.

Proposals

function proposals(uint256 proposalId)
  • proposalId: ID of a proposal in which to cast a vote.

  • RETURN: The account that created a given proposal.

Last updated