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

contracts pausing / withdraw / stop scenario logic needs to be reviewed #81

Open
ct-ctrl opened this issue Dec 7, 2022 · 1 comment
Labels

Comments

@ct-ctrl
Copy link

ct-ctrl commented Dec 7, 2022

This is to clarify the current state and security, and document it in a comment or hackMD, of pausing and withdrawals in the current contracts.

Also to review the current functionality wrt to pausing and/or stopping the contracts to ensure it satisfies the following specification:

PAUSING

  • are there multiple meanings and implementations of 'pausing' across the contracts? define them and their behaviour (allowed/not allowed)?
  • pausing should not allow recovering the stakes.
  • emergency stop should exist, & enable everyone to recover their stakes (i.e. withdraw)
  • if it is paused it can be resumed and therefore the stake should be retained (i.e. no withdrawals unless total stoppage whereby the contracts have been seen to be vulnerable and need replaced to resume)

WHEN PAUSED:

  • staking off
  • commit off
  • claim off
  • reveal off
  • set the price to zero

WHEN RESUMING

  • reset the price to what it was

STOP

  • should we have a big red button permanently stopping all of the above?
  • where is the emergency button? PAUSE withdrawal?
  • we should add a pause but no withdraw situation

Staking contract pausing and withdrawals behaviour to create tests for:

  • Cannot withdraw too much
  • Cannot withdraw slashed stakes
  • Slashed stakes are stuck in contract (or otherwise?)
@bee-runner bee-runner bot added the issue label Dec 7, 2022
@significance
Copy link
Member

@n00b21337 this would be perhaps a good forum to discuss your reservations wrt to current pausing usage

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

No branches or pull requests

2 participants