TL;DR
We provide additional information about the NNS proposal 108634.
- SNS canister installation is currently limited to pre-approved principals
- The proposal approves a DFINITY principal and allows it to install the SNS canisters that are required to launch an SNS for OpenChat
- In the long term these manual steps will be removed and we will move to a single NNS proposal for SNS creation
Intro
Yesterday, the OpenChat team submitted an NNS proposal with title “Enable principal omnzo-7qaaa-aaaal-qbtpq-cai in SNS-W to initiate the generation of an SNS for OpenChat” and with proposal ID 108634. As the proposal explains, “this proposal offers the OpenChat dapp to the NNS to be turned into a decentralized service by creation of an SNS to govern the OpenChat canisters”. Thus, should this proposal be adopted, this is the first step towards enabling an SNS launch for the OpenChat dapp.
In this forum post, we will
- Confirm that the principal omnzo-7qaaa-aaaal-qbtpq-cai is owned by DFINITY as claimed in the proposal,
- Explain in more detail what this principal will be able to do if the proposal is adopted, and
- Explain in more detail how the SNS launch process works now and in the future.
We start with the last point as this will help with understanding the other points.
How an SNS will be deployed in the future.
The vision is that a dapp can be handed over to the NNS and be offered for decentralization in one single proposal. That is, we propose a design where there is one single NNS proposal that can be voted on by the NNS community and that, as a result, creates the SNS canisters, sets the initial parameters for all SNS canisters, sets the parameters for the decentralization sale, and automatically starts the decentralization sale at a later date.
Instead of waiting for all features, we release features as they are ready so that the community can already use them and aim to continuously improve the SNS. This includes the SNS launch, where the implementation does not yet implement the above described design.
How an SNS is deployed today.
Currently, the process of launching an SNS is split up in two parts and still requires some manual steps.
- First, the SNS canisters are created and their initial parameters are set by a manual call to the NNS canister called SNS-W (SNS wasm modules canister). The dapp’s control is then handed over to the SNS canisters, which are in a pre-decentralization-sale state with limited capabilities. In this state, the developer neurons exist and they can upgrade the dapp canisters through the SNS already.
- Second, an NNS proposal is submitted. The NNS voters can now verify the parameters in the already existing SNS canisters as well as the sale parameters that are set in the proposal. If the proposal is adopted, the SNS sale is started and if the sale is then also successful, the SNS is launched. If the proposal is rejected, for example because the NNS community rejects the chosen parameters from Step 1 or the sale conditions proposed in Step 2, then the SNS launch fails and the dapp is handed back to the developers.
To ensure that malicious parties cannot simply perform the first step and fill the SNS subnet with non-approved SNS canisters, SNS-W contains a list of allowed principals that are allowed to install an SNS. This is what proposal 108634 is about: it adds the principal omnzo-7qaaa-aaaal-qbtpq-cai to the allowed principal list in SNS-W so that it can install exactly one SNS. After this one call, SNS-W automatically removes the principal from the list again, so this can only be done once.
The effect of an adopted proposal 108634 and what this means for the principal omnzo-7qaaa-aaaal-qbtpq-cai.
If the proposal is adopted, the principal omnzo-7qaaa-aaaal-qbtpq-cai is added to a list in SNS-W that allows it to install one SNS.
Let’s look at the details and where you can look in the code to convince yourself that this is the case.
- If the proposal 108634 is adopted, it will call the method update_allowed_principals on SNS-W. This will add principal omnzo-7qaaa-aaaal-qbtpq-cai to the list allowed_principals that SNS-W stores. There are the principals allowed to install an SNS. If you look at the method update_allowed_principals here you can see that only NNS governance can call it, which means that this list can only be changed by an NNS proposal.
- After principal 108634 is in allowed_principals, it is allowed to call the method deploy_new_sns on SNS-W, which installs and SNS.
- deploy_new_sns uses the method consume_caller_from_whitelist which has two effects:
1: it checks that the caller principal is in allowed_principals. If someone else calls this method, SNS-W will return an error.
2: The caller principal is “consumed”, which means that it will be removed from allowed_principals. This implies that the principal can only make this call once. Only another NNS proposal to add the principal again to the list would allow the principal to repeat this process and install another SNS.
- deploy_new_sns uses the method consume_caller_from_whitelist which has two effects:
What the principal omnzo-7qaaa-aaaal-qbtpq-cai is and who controls it.
The principal omnzo-7qaaa-aaaal-qbtpq-cai is a cycles wallet. This is because a call to install SNS canisters needs to send along cycles with which the SNS canisters are initialized.
The cycles wallet omnzo-7qaaa-aaaal-qbtpq-cai has multiple controllers, each of which is controlled by a different DFINITY engineer.
Q&A
Q: If we envision a different design in the future, why do we not wait for this design to be done?
A: We think we should release whatever is ready so that the community can build on it. It should be up to the individual projects to decide whether the current product is sufficiently meeting their needs or whether they would like to wait for future versions of it.
In particular, some projects might need the funding that an SNS decentralization sale can help collect or they might need the SNS as a marketing tool to attract more users. We want to unblock them.
Q: How do I need to trust the controllers of the cycles wallet omnzo-7qaaa-aaaal-qbtpq-cai?
A: The worst thing that any controller of this wallet can do is to install an SNS, possibly with useless configurations. However, this SNS will not be fully functional, especially no tokens can be moved, without the second NNS proposal to start the decentralization sale.
In particular this can only be done once, as such a call would remove the cycles wallet from the list again (see explanation above).
Q: What if I do not like the parameters that the SNS canisters are initialized with?
A: As explained above in “How an SNS is deployed today“ and as also mentioned in the proposal, the NNS community can and should review the parameters that the SNS canisters were initialized with in the second NNS proposal to start the decentralization sale. The still have the possibility to reject the parameters, and thereby the SNS launch, at this point and the dapp would then be handed back to the developers.