Similar to the current DepositManager, which is used by the provider to check balance of bidders, we also need a StakeManager which tracks the stake of providers.
The StakeManager needs to do the following:
- Get minimum stake in the start and track if this value changes using events
- Respond to GetStake queries to other packages without querying the RPC but by tracking ProviderStake and Slash events. This would prevent the additional RPC call and also allow us to generate events when provider stake becomes low.
Similar to the current DepositManager, which is used by the provider to check balance of bidders, we also need a StakeManager which tracks the stake of providers.
The StakeManager needs to do the following: