Governance
Introduction
JustLend DAO protocol is governed and upgraded by JST holders. There are three components included in the governance system: JST(WJST) token, governance module(GovernorBravo) and Timelock. The governance of the JustLend DAO protocol is through proposals, whose process can be summarized as proposal posting-voting-taking effect.
GovernorBravoDelegate.sol
allows users to:
Propose
Queue
Execute
Cancel
Deposit
Vote
The source code is available on Github.
Proposals
Propose
Calling this method creates a proposal to change & update the JustLend DAO protocol.
Parameter description:
targets
: target addresses for calls to be made during proposal execution;values
: values to be passed to the calls;signatures
: function signatures;calldatas
: data for each function;description
: a readable message of what exactly the proposal changes.
Returns: the ID of this proposal.
Queue
Calling this method moves a successful proposal into the Timelock waiting period. The waiting period begins when this method is successfully called.
Parameter description:
proposalId
: ID of the successful proposal.
Returns: None, reverts on error.
Execute
Calling this method executes the proposal whose waiting period has already been ended. Actions in the proposal will be invoked during the execution.
Parameter description:
proposalId
: ID of the proposal to be executed.
Returns: None, reverts on error.
Cancel
Calling this function cancels a proposal. A proposal can be cancelled at any time prior to its execution.
Parameter description:
proposalId
: ID of the proposal to be cancelled.
Returns: None, reverts on error.
Get Actions
Calling this method gets the actions of an exact proposal.
Parameter description:
proposalId
: ID of the proposal.
Returns:
targets
: target addresses for calls to be made during proposal execution;values
: values to be passed to the calls;signatures
: function signatures;calldatas
: data for each function.
Get Receipt
Calling this method gets the votes of a specified voter on a proposal.
Parameter description:
proposalId
: ID of the proposal;voter
: address of the specified account.
Returns:
hasVoted
: voted or not;support
: for or against;votes
: vote count.
Proposal State
Calling this method returns the state of a specified proposal.
Parameter description:
proposalId
: ID of the specified proposal;
Returns:
ProposalState: Pending or Active or Canceled; Defeated or Succeeded or Queued; Expired or Executed.
Poll & Vote
Deposit
Calling this method exchanges JST for WJST at a one-to-one ratio.
Parameter description:
sad
: number of votes(WJST) to exchange.
Returns: None, reverts on error
Cast Vote
Calling this method casts a vote on a proposal. The voting weight will be calculated at the time the proposal's state becomes active.
Parameter description:
proposalId: ID of the proposal to vote;
votes: number of the votes to be cast;
support: for or against.
Returns: None, reverts on error.
Cast Vote With Reason
Calling this method casts a vote on a proposal. The reason can be submitted simultaneously.
Parameter description:
proposalId
: ID of the proposal to vote;votes
: number of the votes to be cast;support
: for or against;reason
: voting reason.
Returns: None, reverts on error.
Cast Vote By Signature
Calling this method casts votes on a specified proposal. Comparing with castVote()
, this method allows offline signature.
Parameter description:
proposalId
: ID of the proposal to vote;votes
: number of the votes to be cast;support
: for or against;v
: recover byte of the signature;r
: half of the ECDSA signature pair;s
: half of the ECDSA signature pair.
Returns: None, reverts on error.
Last updated