You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The suggestion is to change lockup to have 0 access keys.
Instead have a master account that is specified on deployment.
Lockup contract is only aware of it’s master account
master account can have a multisig instead of full access key to improve security and allow key management
master account can authorize staking UI for using lockup contract on it’s behalf of it with stake,deposit,withdraw,unstake authorized functions.
Meaning that all public methods inside lockup for user just have a guard of assert_eq!(env::predessesor(), self.owner_id); and methods for foundation have assert_eq!(env::predessesor(), self.foundation_id);
On the wallets / custody side, this would mean that they can just control master account. A separate page for lockup operations can be created, where users can "Login with NEAR" and then withdraw vested tokens. Staking of locked tokens can be done from this page as well (or separate staking app can be used, but needs to be aware of this dynamics).
We can create master accounts via linkdrops with multisig contract as default and only enough $NEAR to cover the contract storage + 3 keys.
### `0.2.0`
- Replaced owner's access keys with the owner's account. The access is now controlled through the predecessor account ID similar to NEAR foundation access.
This allows to be more flexible with the account access including multi-sig implementation.
- The lockup contract account should not have any access keys until the account is fully vested and unlocked.
Only then the owner can add the full access key.
- Removed methods for adding and removing staking/main access keys.
- Added a view method to get the account ID of the owner.
Fixes: #31
The suggestion is to change lockup to have 0 access keys.
Instead have a master account that is specified on deployment.
stake,deposit,withdraw,unstake
authorized functions.Meaning that all public methods inside lockup for user just have a guard of
assert_eq!(env::predessesor(), self.owner_id);
and methods for foundation haveassert_eq!(env::predessesor(), self.foundation_id);
On the wallets / custody side, this would mean that they can just control master account. A separate page for lockup operations can be created, where users can "Login with NEAR" and then
withdraw
vested tokens. Staking of locked tokens can be done from this page as well (or separate staking app can be used, but needs to be aware of this dynamics).We can create master accounts via linkdrops with multisig contract as default and only enough $NEAR to cover the contract storage + 3 keys.
CC @kcole16
The text was updated successfully, but these errors were encountered: