ZivoeGlobals.sol
Global Variables for Zivoe Protocol
Last updated
Global Variables for Zivoe Protocol
Last updated
This contract contains global variables for the Zivoe protocol.
This contract has the following responsibilities:
Maintain accounting of all defaults within the system in aggregate.
Handle ZVL AccessControl (switching to other wallets).
Whitelist management for "keepers" which are allowed to execute proposals within the TLC in advance.
Whitelist management for "lockers" which ZivoeDAO can push/pull to.
Whitelist management for "stablecoins" which are accepted in other Zivoe contracts.
View function for standardized ERC20 precision handling.
View function for adjusting the supplies of tranches (accounting purposes).
address
DAO
The ZivoeDAO contract.
address
ITO
The ZivoeITO contract.
address
stJTT
The ZivoeRewards ($stJTT) contract.
address
stSTT
The ZivoeRewards ($stSTT) contract.
address
stZVE
The ZivoeRewards ($stZVE) contract.
address
vestZVE
The ZivoeRewardsVesting ($vestZVE) vesting contract.
address
YDL
The ZivoeYDL contract.
address
zJTT
The ZivoeTrancheToken ($zJTT) contract.
address
zSTT
The ZivoeTrancheToken ($zSTT) contract.
address
ZVE
The ZivoeToken ($ZVE) contract.
address
ZVL
The Zivoe Laboratory.
address
ZVT
The ZivoeTranches contract.
address
GOV
The Governor contract.
address
TLC
The TimelockController contract.
address
proposedZVL
Interim contract for 2FA ZVL access control transfer.
uint256
defaults
Tracks net defaults in the system.
mapping(address => bool)
isDepositor
Whitelist for depositors, responsible for depositing rewards.
mapping(address => bool)
isKeeper
Whitelist for keepers, responsible for pre-initiating actions.
mapping(address => bool)
isLocker
Whitelist for lockers, for ZivoeDAO interactions and accounting accessibility.
mapping(address => bool)
stablecoinWhitelist
Whitelist for accepted stablecoins throughout Zivoe (e.g. ZVT or YDL).
adjustedSupplies() - Returns total circulating supply of zSTT and zJTT adjusted for defaults.
standardize() - Handles WEI standardization of a given asset amount (i.e. 6 decimal precision => 18 decimal precision).
decreaseDefaults() - Call when a default is resolved, decreases net defaults system-wide.
increaseDefaults() - Call when a default occurs, increases net defaults system-wide.
initializeGlobals() - Initialze state variables (perform after all contracts have been deployed).
proposeZVL() - Proposes ZVL access control to another account.
acceptZVL() - Accept transfer of ZVL access control.
updateIsDepositor() - Updates the depositor whitelist.
updateIsKeeper() - Updates the keeper whitelist.
updateIsLocker() - Modifies the locker whitelist.
updateStableCoinWhitelist() - Modifies the stablecoin whitelist.
adjustedSupplies()
Returns total circulating supply of zSTT and zJTT adjusted for defaults.
Returns
uint256
zSTTAdjustedSupply
zSTT.totalSupply()
adjusted for defaults.
uint256
zJTTAdjustedSupply
zJTT.totalSupply()
adjusted for defaults.
standardize()
Handles WEI standardization of a given asset amount (i.e. 6 decimal precision => 18 decimal precision).
uint256
amount
The amount of a given "asset".
address
asset
The asset (ERC-20) from which to standardize the amount to WEI.
Returns
uint256
standardizedAmount
The input "amount" standardized to 18 decimals.
decreaseDefaults()
Call when a default is resolved, decreases net defaults system-wide.
uint256
amount
The amount to decrease defaults.
Emits the DefaultsDecreased() event
increaseDefaults()
Call when a default occurs, increases net defaults system-wide.
uint256
amount
The amount to increase defaults.
Emits the DefaultsIncreased() event
initializeGlobals()
Initialze state variables (perform after all contracts have been deployed).
address[]
globals
Array of addresses representing all core system contracts.
address[]
stablecoins
Array of stablecoins representing initial acceptable stablecoins.
Emits the TransferredZVL() event
proposeZVL()
Proposes ZVL access control to another account.
address
_propsedZVL
The proposed address for ZVL.
acceptZVL()
Accept transfer of ZVL access control.
Emits the TransferredZVL() event
updateIsDepositor()
Updates the depositor whitelist.
address
keeper
The address of the depositor.
bool
status
The status to assign to the "depositor" (true = allowed, false = restricted).
Emits the UpdatedDepositorStatus()
updateIsKeeper()
Updates the keeper whitelist.
address
keeper
The address of the keeper.
bool
status
The status to assign to the "keeper" (true = allowed, false = restricted).
Emits the UpdatedKeeperStatus() event
updateIsLocker()
Modifies the locker whitelist.
address
locker
The locker to update.
bool
status
The status to assign to the "locker" (true = permitted, false = prohibited).
Emits the UpdatedLockerStatus() event
updateStableCoinWhitelist()
Modifies the stablecoin whitelist.
address
stablecoin
The stablecoin to update.
bool
allowed
The value to assign (true = permitted, false = prohibited).
Emits the UpdatedStablecoinWhitelist() event
DefaultsDecreased()
Emitted during decreaseDefaults()
address
True
locker
The locker updating the default amount.
uint256
False
amount
Amount of defaults decreased.
uint256
False
updatedDefaults
Total default(s) in system after event.
DefaultsIncreased()
Emitted during increaseDefaults()
address
True
locker
The locker updating the default amount.
uint256
False
amount
Amount of defaults increased.
uint256
False
updatedDefaults
Total default(s) in system after event.
TransferredZVL()
Emitted during initializeGlobals() and acceptZVL()
address
True
controller
The address representing ZVL.
UpdatedDepositorStatus()
Emitted during updateIsDepositor()
address
True
depositor
The address whose status as a despositor is being modified.
bool
False
status
The new status of "depositor".
UpdatedKeeperStatus()
Emitted during updateIsKeeper()
address
True
account
The address whose status as a keeper is being modified.
bool
False
status
The new status of "account".
UpdatedLockerStatus()
Emitted during updateIsLocker()
address
True
locker
The locker whose status as a locker is being modified.
bool
False
status
The new status of "locker".
UpdatedStablecoinWhitelist()
Emitted during updateStableCoinWhitelist()
address
True
asset
The stablecoin to update.
bool
False
allowed
The boolean value to assign.