Skip to content

Latest commit

 

History

History
161 lines (145 loc) · 4.78 KB

File metadata and controls

161 lines (145 loc) · 4.78 KB

StabilityPoolStorage.sol

View Source: contracts/StabilityPoolStorage.sol

↗ Extends: Ownable, BaseMath ↘ Derived Contracts: StabilityPool

StabilityPoolStorage

Structs

FrontEnd

struct FrontEnd {
 uint256 kickbackRate,
 bool registered
}

Deposit

struct Deposit {
 uint256 initialValue,
 address frontEndTag
}

Snapshots

struct Snapshots {
 uint256 S,
 uint256 P,
 uint256 G,
 uint128 scale,
 uint128 epoch
}

Contract Members

Constants & Variables

//public members
string public constant NAME;
contract IBorrowerOperations public borrowerOperations;
contract ITroveManager public troveManager;
contract IZUSDToken public zusdToken;
contract ISortedTroves public sortedTroves;
contract ICommunityIssuance public communityIssuance;
mapping(address => struct StabilityPoolStorage.Deposit) public deposits;
mapping(address => struct StabilityPoolStorage.Snapshots) public depositSnapshots;
mapping(address => struct StabilityPoolStorage.FrontEnd) public frontEnds;
mapping(address => uint256) public frontEndStakes;
mapping(address => struct StabilityPoolStorage.Snapshots) public frontEndSnapshots;
uint256 public P;
uint256 public constant SCALE_FACTOR;
uint128 public currentScale;
uint128 public currentEpoch;
mapping(uint128 => mapping(uint128 => uint256)) public epochToScaleToSum;
mapping(uint128 => mapping(uint128 => uint256)) public epochToScaleToG;
uint256 public lastZEROError;
uint256 public lastETHError_Offset;
uint256 public lastZUSDLossError_Offset;

//internal members
uint256 internal ETH;
uint256 internal totalZUSDDeposits;

Functions

Contracts