onflow / onflow/flow-core-contracts
Add support to Staking contract to separate operational from financial capabilities
@joshuahannan is already working on this.
Since Aug 23, 2023.
- Dominant language
- Cadence
- Stars
- 93
- Forks
- 53
- PR merge metrics
- No merged PRs in 30d
Description
Issue To Be Solved
Currently, a single capability is used by node operators to interact with the Staking contract for all updates, including updating the node's hostname, staking/unstaking, and removing funds. This works fine for small or individual operators, but adds risk for larger operators that may have a team/automations that help manage their nodes.
Suggest A Solution
Instead of a single capability, create 2 or more separate capabilities that handle each of the types of accesses. For example, it could be broken down in the following way
- Operational access - used to update the node's hostname and any other strictly operational changes. Operators could give access to this to an automated system or a team of operators
- Staking/unstaking - used to commit new tokens, unstake tokens, or restake rewards, etc. All financial operations that don't involve withdrawing funds. This could be granted to a small number of highly trusted individuals to allow managing their fleet.
- Withdrawing funds - used to withdraw unstaked funds. This would be kept securely in an HSM or cold storage with very restricted access.
By default, all 3 capabilities would be added to the node's staking account, but the operator would have the option to move/delegate them to different accounts.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.