Trigger | Condition | Calls |
---|---|---|
STAKE | provision exists | HorizonStaking.stakeToProvision() |
STAKE | provision does not exist | HorizonStaking.stake() |
HorizonStaking.provision() / HorizonStaking.provisionLocked() |
||
UNSTAKE | during transition period and amount < idle stake |
HorizonStaking.unstake() |
UNSTAKE | during transition period and amount > idle stake |
Do not allow. |
UNSTAKE | after transition period and amount < idle stake |
HorizonStaking.unstake() |
UNSTAKE | after transition period and amount > idle stake |
HorizonStaking.thaw() |
WITHDRAW | funds fully thawed from a legacy unstake | HorizonStaking.withdraw() |
WITHDRAW | after transition period and funds fully thawed from provision | HorizonStaking.deprovision() |
HorizonStaking.unstake() |
When an indexer stakes in the explorer:
SubgraphService
stakeToProvision()
shortcut to directly stake and add funds to the provisionSubgraphService
stake()
to get funds into the protocolprovision()
to create the provision
provisionLocked()
if the caller is a vesting contractWhen an indexer unstakes in the explorer:
unstake()
to start thawing the fundsthaw()
to start removing the funds from the provision, funds being the difference between idle stake and amount to unstake
unstake()
and get trough a thawing period AGAIN.unstake()
for immediate withdrawalthaw()
to start thawing the funds from the provisionWhen an indexer withdraws in the explorer:
unstake()
withdraw()
to get the funds out of the protocolunstake()
withdraw()
to get the funds out of the protocolunstake()
will automatically withdraw funds, so no new calls to withdraw()
would be needed. However we need to keep it in case someone initiated an unstake()
before. Eventually the withdraw()
code will be removed.SubgraphService
provision
deprovision()
to get the funds out of the provision and into idle stakeunstake()
to get the funds out of the protocol - unstaking is immediateIdeas to simplify explorer
thaw()
- this means that if an indexer provisions stake to the SubgraphService
the explorer will not expose UI elements to allow thawing those funds.thaw()
call via Etherscan if someone needs it for some reason.