github.com/codingfuture/orig-energi3@v0.8.4/energi/contracts/src/constants.sol (about)

     1  // Copyright 2019 The Energi Core Authors
     2  // This file is part of Energi Core.
     3  //
     4  // Energi Core is free software: you can redistribute it and/or modify
     5  // it under the terms of the GNU General Public License as published by
     6  // the Free Software Foundation, either version 3 of the License, or
     7  // (at your option) any later version.
     8  //
     9  // Energi Core is distributed in the hope that it will be useful,
    10  // but WITHOUT ANY WARRANTY; without even the implied warranty of
    11  // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
    12  // GNU General Public License for more details.
    13  //
    14  // You should have received a copy of the GNU General Public License
    15  // along with Energi Core. If not, see <http://www.gnu.org/licenses/>.
    16  
    17  // Energi Governance system is the fundamental part of Energi Core.
    18  
    19  // NOTE: It's not allowed to change the compiler due to byte-to-byte
    20  //       match requirement.
    21  pragma solidity 0.5.16;
    22  //pragma experimental SMTChecker;
    23  
    24  /**
    25   * Global constants with no storage space.
    26   * NOTE: it could be a library, but Solidity does not support such case.
    27   */
    28  contract GlobalConstants {
    29      address payable constant internal TREASURY = address(0x301);
    30      address payable constant internal MASTERNODE_REGISTRY = address(0x302);
    31      address payable constant internal STAKE_REWARD = address(0x303);
    32      address payable constant internal BACKBONE_REWARD = address(0x304);
    33      address payable constant internal SPORK_REGISTRY = address(0x305);
    34      address payable constant internal CHECKPOINT_REGISTRY = address(0x306);
    35      address payable constant internal BLACKLIST_REGISTRY = address(0x307);
    36      address constant internal MIGRATION_CONTRACT = address(0x308);
    37      address payable constant internal MASTERNODE_TOKEN = address(0x309);
    38      address constant internal SYSTEM_FAUCET = address(0x310);
    39  
    40      uint constant internal FEE_UPGRADE_V1 = 10000 ether;
    41      uint constant internal FEE_BUDGET_V1 = 100 ether;
    42      uint constant internal FEE_CHECKPOINT_V1 = 1000 ether;
    43      uint constant internal FEE_BLACKLIST_V1 = 1000 ether;
    44      uint constant internal FEE_BLACKLIST_REVOKE_V1 = 100 ether;
    45      uint constant internal FEE_BLACKLIST_DRAIN_V1 = 100 ether;
    46  
    47      uint constant internal PERIOD_UPGRADE_MIN = 2 weeks;
    48      uint constant internal PERIOD_UPGRADE_MAX = 365 days;
    49      uint constant internal PERIOD_BUDGET_MIN = 2 weeks;
    50      uint constant internal PERIOD_BUDGET_MAX = 30 days;
    51      uint constant internal PERIOD_CHECKPOINT = 1 weeks;
    52      uint constant internal PERIOD_BLACKLIST = 1 weeks;
    53  
    54      uint8 constant internal QUORUM_MIN = 1;
    55      uint8 constant internal QUORUM_MAJORITY = 51;
    56      uint8 constant internal QUORUM_MAX = 100;
    57  
    58      uint constant internal REWARD_STAKER_V1 = 2.28 ether;
    59      uint constant internal REWARD_BACKBONE_V1 = 2.28 ether;
    60      uint constant internal REWARD_MASTERNODE_V1 = 9.14 ether;
    61      uint constant internal REWARD_TREASURY_V1 = 184000 ether;
    62  
    63      uint constant internal MN_COLLATERAL_MIN = 10000 ether;
    64      uint constant internal MN_COLLATERAL_MAX = 100000 ether;
    65  
    66      uint constant internal MN_HEARTBEAT_INTERVAL = 60 minutes;
    67      uint constant internal MN_HEARTBEAT_INTERVAL_MIN = MN_HEARTBEAT_INTERVAL / 2;
    68      uint constant internal MN_HEARTBEAT_INTERVAL_MAX = MN_HEARTBEAT_INTERVAL * 2;
    69      uint constant internal MN_HEARTBEAT_PAST_BLOCKS = 10;
    70  
    71      uint constant internal BUDGET_AMOUNT_MIN = FEE_BUDGET_V1;
    72      uint constant internal BUDGET_AMOUNT_MAX = REWARD_TREASURY_V1;
    73      uint constant internal BUDGET_PROPOSAL_MAX = 100;
    74  }
    75