OS: States
-
Terms:
-
DISTRIBUTION_END -> Where the rewards end (end of credit line without incident) -
DEFAULT_DATE -> DISTRIBUTION_END + defaultPeriod. (date of definite declaration of default)
setUp DEFAULT_DATE in OriginatorStaking
-
UNINITIALIZED: inicial
-
no stake -
STAKING:
-
starts on setUp
-
public staking allowed -
manager withdraw not allowd -
liquidation not allowed -
redeem fails until DEACTIVATED -
ends when set to DEACTIVATED or DEFAULT -
STAKING_END: // End of distrubution, early payment, migration to new version...
-
set by declareDeactivated
, -
onlyGovernance -
sets DISTRIBUTION_END = block.timestamp (stop rewards) if DISTRIBUTION_END < block.timestamp -
stake disallowed -
redeem allowed -
withdraw allowed -
liquidation disallowed -
DEFAULT:
-
set by declareDefault(uint256 debt)
, save debt in contract property (in Ethix) -
allow if block.timestamp > DEFAULT_DATE -
onlyGovernance -
sets DISTRIBUTION_END = block.timestamp (stop rewards) -
stake not allowed -
redeem allowed if debt <= originatorBalance + auditorBalance -
withdraw not allowed -
liquidate allowed