Change Rules Proposal

This Proposal can be used by the Host address to change the Governance Rules of:

  • VoteProposal

  • DelegationTransferManagerProposal

The Proposal can be initialized with the data parameter executed by the lazyInit function:

function lazyInit(bytes memory lazyInitData) external returns(bytes memory lazyInitResponseData) {
    require(keccak256(bytes(uri)) == keccak256(""));
    (uri, lazyInitResponseData) = abi.decode(lazyInitData, (string, bytes));
    require(keccak256(bytes(uri)) != keccak256(""));

    (additionalUri, quorum, validationBomb, blockLength, hardCap) = abi.decode(lazyInitResponseData, (string, uint256, uint256, uint256, uint256));

    require(blockLength > 0 || hardCap > 0, "No termination rules");

    lazyInitResponseData = "";

The lazyInit function contains the following data:

  • uri -> this can contain Proposal Metadata such as title, useful links, etc...

and then:

  • string additionalUri -> this can contain Proposal description, risks, benefits, and other information to describe the proposal behavior.

  • uint256 quorum -> represents the new quorum parameter.

  • uint256 validationBomb -> represents the new validationBomb parameter.

  • uint256 blockLength -> represents the new blockLength parameter.

  • uint256 hardCap -> represents the new hardCap parameter.

Look at these pages for details regarding Governance Rules and in particular quorum, validationBomb, blockLength, and hardCap.

Quorum and hard cap (also called max cap) are percentage values and are applied to the total number of tokens stored in the Delegation when the Proposal is being voted on. Consequently, the number of tokens staked in the Delegation at the time of splitting and receiving grants does not count.

It's mandatory to have at least the blockLength or the maxCap parameter set. Other parameters are optional.

The execute function has the Delegation perform the desired behavior, i.e. change the Delegation Governance Rules.

function execute(bytes32) external {
    ISubDAO subDAO = ISubDAO(ILazyInitCapableElement(msg.sender).host());

    (address[] memory validators, address[] memory canTerminates) = IDelegationRulesChanger(subDAO.initializer()).createNewRules(address(subDAO), quorum, validationBomb, blockLength, hardCap);

    ISubDAO.SubDAOProposalModel[] memory proposalModels = subDAO.proposalModels();

    ISubDAO.SubDAOProposalModel memory prop = proposalModels[proposalModels.length - 2];
    prop.validatorsAddresses[0] = validators;
    prop.canTerminateAddresses[0] = canTerminates;
    proposalModels[proposalModels.length - 2] = prop;

    prop = proposalModels[proposalModels.length - 1];
    prop.validatorsAddresses[0] = validators;
    prop.canTerminateAddresses[0] = canTerminates;
    proposalModels[proposalModels.length - 1] = prop;


Voting For This Proposal

This Proposal is an Host only Proposal.

Last updated