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

Upgradable staking pool contract #162

Open
bowenwang1996 opened this issue Jul 7, 2021 · 1 comment
Open

Upgradable staking pool contract #162

bowenwang1996 opened this issue Jul 7, 2021 · 1 comment
Labels
core-contracts enhancement New feature or request

Comments

@bowenwang1996
Copy link
Contributor

bowenwang1996 commented Jul 7, 2021

The current staking pool contract is not upgradable, which causes a lot of trouble when we need to change it for some reason. For example, if we were to introduce a new staking action, the current staking pool would no longer be compatible.

Some considerations here:

  • Documentation on upgrading contracts https://github.com/near/near-sdk-rs/blob/master/HELP.md#upgrading-a-contract.
  • It is not sufficient to make it upgradable. We also need to make sure that the upgrade process is safe and secure. The contract is supposed to be permissionless, i.e, the contract will not have any access key. Therefore it is important to figure out how to prevent owner of the contract from deploying a malicious contract that can transfer out all the tokens. One idea is to have a whitelist (stored in some whitelist contract) and the staking pool contract would read the whitelist first and check whether the hash of the new contract is whitelisted.
@janewang
Copy link

janewang commented Nov 3, 2021

Based on updated Q4 OKR, this issue is removed from NodeX team
cc @bowenwang1996 @posvyatokum

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core-contracts enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants