Upgrading predefined variables
Last updated
Last updated
Some variables can be easily upgraded with Policy Contract.
Adding/removing variables that Policy Contract should manage need core modules upgrades.
Currently, core modules upgrades are carried out by the ADMIN key after voting by DIPs, but ADMIN is working on decentralizing core modules upgrades.
It inherits the Policy Contract interface and adds a concrete implementation to every method. The interface is published on npm.
Import the Policy Contract interface in Solidity.
All interfaces are described the following.
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.
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 Market Contract is pass or not.
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.
Returns the voting period for a new Market Contract in blocks. Market Contracts that do not pass beyond this period are considered rejected.
Returns the voting period for a new Policy Contract in blocks. Policy Contracts that do not pass beyond this period are considered rejected.
Takes the total supply of a new Property Contract as arguments and returns the number of Property Contracts to a Treasury Contract.
Returns a Treasury Contract address.
Deploy the new Policy Contract to the mainnet or testnet and run the Policy Factory Contract's create
function.
The current Policy Factory Contract address can be obtained with the policyFactory
function of Address Config Contract.
The address of the Address Config Contract is 0x1D415aa39D647834786EB9B5a333A50e9935b796.
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
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.