All functions that Policy Contract should implement
You need to implement all the functions, but you should minimize the changes by inheriting the existing Policy Contract if you have nothing to change.
rewards
Takes the total number of staking and the total number of authenticated assets as arguments and returns the number of inflations (the number of mints) per block.
Takes the total number of inflations and the total number of staking as arguments and returns the total number of creator rewards. The staking rewards are calculated by subtracting this value from the total rewards.
Takes the total number of authenticated assets and the total number of staking for a Property Contract as arguments and returns the authentication fee. Property Contract authors must burn this authentication fee for each asset authentication.
Takes the total number of yes votes and the total number of no votes as arguments and returns the new Policy Contract is pass or not.
Policy Contract is a singleton, so if multiple Policy Contracts are voting simultaneously, only the earliest approved Policy Contract will be adopted, and the other options will be removed.
Community votes by votePolicy function of Vote Counter Contract. If policyApproval function of an existing Policy Contract returns true, the new Policy Contract will be activated immediately.
votePolicy function takes the following three arguments:
Address of a new Policy Contract
Address of a Property Contract you are staked
yes/no in boolean
Why use Property Contract's address in the second argument?
The voting rights of a voter are equal to the total number of staking for a voter. The number of staking to one Property Contract per vote is used as the voting right, and the used voting right cannot be exercised again. You can vote for one Policy Contract more than once or vote for multiple Policy Contracts.
This is a specification that implements the concept of quadratic voting.
When there are multiple options simultaneously, a simple majority vote does not choose all stakeholders' best options.
For example, given that the difference in the number of votes for each option is small, the option most people choose for second place may be better than the one for first place, which is slightly higher than the others. Quadratic voting reflects individual weights in your votes to help you choose the best option.