Guidance on how to mint new tokens via SNS proposal

We would like to be able to mint tokens for airdrop recipients.

Here are our notes:

  • ICRC1 standard states “Transfers from the minting account (governance canister) act as mint transactions depositing fresh tokens on the destination account”.
  • Transfer is not a generic function included in the governance canister out of the box. For this reason we need to register it with the governance canister.
  • All registered functions need a corresponding validate function, icrc1_transfer does not seem to have a validate func available. This line from register func command makes me think we can use a validation from any canister:

To accomplish the transfer we attempted to first register the function icrc1_transfer but we received the following error:

ending message with

  Call type:   update
  Sender:      v6ttn-5om4j-empps-whe22-wjd7b-e6uim-5drt3-4d7yk-74qch-5iehc-rae
  Canister id: xvj4b-paaaa-aaaaq-aabfa-cai
  Method name: manage_neuron
  Arguments:   (
  record {
    subaccount = blob "\fd\05**fH5|\98L\d8\a0N\dc\b9\e3JH\96zF\f4M\b9&OQV\d7\e9la";
    command = opt variant {
      MakeProposal = record {
        url = "https://modclub.ai/";
        title = "Register icrc1_transfer function.";
        action = opt variant {
          AddGenericNervousSystemFunction = record {
            id = 1_693_851_994_581 : nat64;
            name = "icrc1_transfer";
            description = null;
            function_type = opt variant {
              GenericNervousSystemFunction = record {
                validator_canister_id = opt principal "gwuzc-waaaa-aaaah-qdboa-cai";
                target_canister_id = opt principal "xsi2v-cyaaa-aaaaq-aabfq-cai";
                validator_method_name = opt "validate";
                target_method_name = opt "icrc1_transfer";
              }
            };
          }
        };
        summary = "This proposal registers icrc1_transfer function.";
      }
    };
  },
)
Request ID: 0xc9d57d6212bec35351246656b51720bb24b8e0e3a641233ced616838323d94c6
The request is being processed...
The request is being processed...
The request is being processed...
The request is being processed...
(
  record {
    command = opt variant {
      Error = record {
        error_message = "1 defects in Proposal:\nFunction targets a reserved canister.";
        error_type = 15 : int32;
      }
    };
  },
)

It seems that registration is blocked for this method and may require an SNS upgrade to allow us to do proceed. Can someone at Dfinity please provide input?

1 Like

Yes, that is correct, the transfer seem to take a fixed address and doesn’t allow you to specify the minting address. This could be changed if SNSs need this by creating a proposal to upgrade the sns to the new version. The new version would need to add a new sns to the sns-w canister. In other words, the NNS needs to upgrade the SNS governance version and then the SNS has to upgrade to this new version.

Thank you for your reply. Yes, we require that this change be done as we will not be able to mint airdrop tokens without it. Please let us know the progress of this update.

Hi @modclub,

Thanks for raising this feature request. This is something that ultimately we’d like to provide as part of the SNS framework for the communities to use. The NNS team is going to take a look at this starting next week. Note that it may take a few weeks before it hits mainnet.

Meanwhile, have you considered using MOD tokens from the treasury to do the airdrop? This is what some of the other teams that went through the process did.

2 Likes

Hi @georgi ,

Thank you for your reply.

Meanwhile, have you considered using MOD tokens from the treasury to do the airdrop? This is what some of the other teams that went through the process did.

Yes, we can temporarily borrow from the treasury in this case but we will need to mint the 20M extra tokens eventually as it is required by our tokenomics model to have a 1B supply.

Thank you again and please keep us updated on progress/timelines.

Hi @georgi and @Ang,

Is there any update on this?

Hey @modclub, token minting is coming along!

Last week DFINITY proposed a new version of SNS Governance with some maintenance that’s important for this feature. That change allows the frontend teams to start preparing for when changes come to the voting thresholds (and changing the voting thresholds is a prerequisite to token minting).

Our tentative plan is that the next version of SNS and NNS canisters that we propose will implement Matched Funding. That will free up a lot of dev effort to work on other things, including token minting. I’m the main developer for the token minting feature, so I will keep you updated as we make progress!

3 Likes