onflow / onflow/flow-core-contracts

Add support to Staking contract to separate operational from financial capabilities

Open
#358 4 comments 0 reactions 1 assignee View on GitHub

@joshuahannan is already working on this.

Since Aug 23, 2023.

enhancement Feature Feedback good first issue SC-Eng
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

  1. 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
  2. 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.
  3. 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.