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

feat(StakeManager): add function to owner enable emergency exit #148

Open
3esmit opened this issue Oct 7, 2024 · 0 comments
Open

feat(StakeManager): add function to owner enable emergency exit #148

3esmit opened this issue Oct 7, 2024 · 0 comments
Assignees

Comments

@3esmit
Copy link
Collaborator

3esmit commented Oct 7, 2024

In case something goes wrong with contract, and it gets unable to continue working properly, the owner should be able to enable a emergency exit, which allows StakeVaults to leave without any processing inside of the contract.

StakeManager would have a new global boolean emergencyExit = false which can be set by setEmergencyExit(true) by only owner. StakeVault would have a emergencyExit() function which would read StakeManager 'emergencyExit' flag and if true, allow withdraw.

Also consider using error handling on StakeVault.emergencyExit() to allow withdraw if reading flag gives an error different than out of gas.

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

1 participant