/// @notice The minimum setable proposal threshold
uint public constant MIN_PROPOSAL_THRESHOLD = 50000e18; // 50,000 Comp
/// @notice The maximum setable proposal threshold
uint public constant MAX_PROPOSAL_THRESHOLD = 100000e18; //100,000 Comp
Addresses with more than 50,000 COMP (or any ERC20 token registered by function initialize) can invoke proposal. This threshold can be changed by admin within the range of [50000, 100000].
Voting Period
/// @notice The minimum setable voting period
uint public constant MIN_VOTING_PERIOD = 5760; // About 24 hours
/// @notice The max setable voting period
uint public constant MAX_VOTING_PERIOD = 80640; // About 2 weeks
After starting of the proposal, COMP holders can submit their votes during a voting period. The voting period can be changed by admin within the range of [5760, 80640] Ethereum blocks.
Each blockchain has a different block interval. Even at the same protocol, it can be changed after a hardfork.
Voting Delay
Users allow to vote for the proposal after a certain delay. The voting delay can be changed by admin within the range of [1, 40320] Ethereum blocks.
Quorum
According to majority, at least 400,000 votes are cast for the proposal to execute.
Max Operations per Proposal
The maximum number of actions that can be included in one proposal. Each action is same as booked function-call belongs to the proposal.
Storage
New Proposal State: Unfinalized
Enumerated type ProposalState. The types are Pending, Active, Canceled, Defeated, Succeeded, Queued, Expired, Executed, and Unfinalized.
Unfinalized state refers to a status in which casting has been completed but votes aggregation has not yet begun. It is changed into Defeated or Succeeded after executing the finalized function.
The admin can change e by assigning new expN and expD.
Expectation Value
pqvExpect gets expectation value of for, against, and abstain votes before finalizing proposal. It also returns bool of a proposal's success or failure.
Finalize
Finalizes an active proposal. After the proposal is finalized, votes aggregation is triggered and its state is changed into either Defeated or Succeeded.
/// @notice The min setable voting delay
uint public constant MIN_VOTING_DELAY = 1;
/// @notice The max setable voting delay
uint public constant MAX_VOTING_DELAY = 40320; // About 1 week
/// @notice The number of votes in support of a proposal required in order for a quorum to be reached and for a vote to succeed
uint public constant quorumVotes = 400000e18; // 400,000 = 4% of Comp
/// @notice The maximum number of actions that can be included in a proposal
uint public constant proposalMaxOperations = 10; // 10 actions
/// @notice Possible states that a proposal may be in
/// @dev Add `Unfinalized` state - represent that the proposal is ready to get a `baseRandom` number
enum ProposalState {
Pending,
Active,
Canceled,
Defeated,
Succeeded,
Queued,
Expired,
Executed,
Unfinalized // for PQV's random aggregation round
}
function feeUpdate(uint newFee) public
function requestFlagedRandomness() public returns (bytes32 requestId)
function requestBaseFlagedRandom(uint proposalId) external
// e = 1.05
uint32 public expN = 105;
uint32 public expD = 100;
function eUpdate(uint32 newExpN, uint32 newExpD) public
function pqvExpect(uint proposalId) public view returns (
bool isSucceeded,
uint aggregatedForVotes,
uint aggregatedAgainstVotes,
uint aggregatedAbstainVotes
)