Skip to content

Latest commit

 

History

History
295 lines (276 loc) · 11 KB

StakingStorageShared.md

File metadata and controls

295 lines (276 loc) · 11 KB

StakingStorageShared contract is inherited by Staking modules. (StakingStorageShared.sol)

View Source: contracts/governance/Staking/modules/shared/StakingStorageShared.sol

↗ Extends: Ownable ↘ Derived Contracts: CheckpointsShared, StakingProxy, StakingShared, StakingStorageModule

StakingStorageShared contract

Just the storage part of stacking contract, no functions, only constant, variables and required structures (mappings). Used by StackingProxy and Checkpoints contracts.

  • What is SOV staking? The purpose of the SOV token is to provide a pseudonymous, censorship-resistant mechanism for governing the parameters of the Sovryn protocol, while aligning the incentives of protocol governors with the long-term success of the protocol. Any SOV token holder can choose to stake (lock up) their tokens for a fixed period of time in return for voting rights in the Bitocracy. Stakers are further incentivised through fee and slashing rewards.

Structs

Checkpoint

struct Checkpoint {
 uint32 fromBlock,
 uint96 stake
}

Contract Members

Constants & Variables

//internal members
uint256 internal constant TWO_WEEKS;
uint96 internal constant MAX_DURATION_POW_2;
uint96 internal constant DEFAULT_WEIGHT_SCALING;
uint96 internal constant MIN_WEIGHT_SCALING;
uint96 internal constant MAX_WEIGHT_SCALING;
string internal name;
uint256 internal maxVestingWithdrawIterations;

//public members
uint96 public constant MAX_VOTING_WEIGHT;
uint96 public constant WEIGHT_FACTOR;
uint256 public constant MAX_DURATION;
uint256 public kickoffTS;
contract IERC20 public SOVToken;
mapping(address => mapping(uint256 => address)) public delegates;
bool public allUnlocked;
bytes32 public constant DOMAIN_TYPEHASH;
bytes32 public constant DELEGATION_TYPEHASH;
address public newStakingContract;
mapping(uint256 => mapping(uint32 => struct StakingStorageShared.Checkpoint)) public totalStakingCheckpoints;
mapping(uint256 => uint32) public numTotalStakingCheckpoints;
mapping(address => mapping(uint256 => mapping(uint32 => struct StakingStorageShared.Checkpoint))) public delegateStakingCheckpoints;
mapping(address => mapping(uint256 => uint32)) public numDelegateStakingCheckpoints;
mapping(address => mapping(uint256 => mapping(uint32 => struct StakingStorageShared.Checkpoint))) public userStakingCheckpoints;
mapping(address => mapping(uint256 => uint32)) public numUserStakingCheckpoints;
mapping(address => uint256) public nonces;
contract IFeeSharingCollector public feeSharing;
uint96 public weightScaling;
mapping(address => bool) public vestingWhitelist;
mapping(address => bool) public admins;
mapping(bytes32 => bool) public vestingCodeHashes;
mapping(uint256 => mapping(uint32 => struct StakingStorageShared.Checkpoint)) public vestingCheckpoints;
mapping(uint256 => uint32) public numVestingCheckpoints;
contract IVestingRegistry public vestingRegistryLogic;
mapping(address => bool) public pausers;
bool public paused;
bool public frozen;

Functions


constructor

function () internal nonpayable
Source Code
constructor() internal {
        //abstract
    }

Contracts