Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

staking-miner: balance thresholds #679

Open
chevdor opened this issue Sep 6, 2021 · 2 comments
Open

staking-miner: balance thresholds #679

chevdor opened this issue Sep 6, 2021 · 2 comments

Comments

@chevdor
Copy link
Contributor

chevdor commented Sep 6, 2021

The staking-miner requires access to a private key to operate.
The account needs no negligeable funds to operate. Those funds are used to:

  • make a deposit that is, under normal operations, returned (this is usually a rather significant amount)
  • pay for the fees (this is usually rather small

Considering the above, I feel the staking-miner should should have one or a few a fuse mechanisms that allows stopping sending transactions once a threshold is set to prevent draining an account or sending funds away (which has a similar effect since the account will only be able to spend its free balance).

The solution can consist in 2 thresholds:

  • lower threshold: if the balance of the acount goes below this threshold, the miner keeps running but no longer submit any solution. If the balance increases again, normal operations resume
  • high threshold: if the balance of the account goes above this threshold, some of the funds will automatically be "extracted" from the account and sent to a target account. This option requires a second parameter specifying how much will be transfered out.

cc @kianenigma

@kianenigma
Copy link
Contributor

Sounds like a very interesting addition, added to the project!

@Sophia-Gold Sophia-Gold transferred this issue from paritytech/polkadot Aug 24, 2023
@niklasad1 niklasad1 transferred this issue from paritytech/polkadot-sdk Sep 11, 2023
@niklasad1
Copy link
Member

We got only one "fuse" currently and that is dry-running the transaction and if the account doesn't have sufficient amount of funds the transaction is rejected but it won't help to prevent draining the account.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants