Are canisters not allowed control neurons?

I’m attempting to assign a canister principal as a neuron’s controller, but I’m getting the following error:
Cannot add neuron, controller PrincipalId must be self-authenticating

is this error being thrown because the principal is that of a canister? if so, when will canister’s be allowed to control neurons? Having this ability is a necessity for the application that I’m building. I wouldn’t expect this of all things to be what blocks me.

1 Like

AFAIK, a canister cannot natively control a neuron out of the box so the simple answer is “no”… however, I heard one could do the following (not straightforward process): A canister should be able to do an HTTPS outcall to the NNS canister and use Threshold ECDSA to control an NNS neuron. I am not aware of folks who have done this in practice though.

2 Likes

Is there a reason for requiring devs to undergo such a roundabout process in order to enable neuron staking within canisters? What’s preventing the restrictions in place from being lifted?

I ask because I’m currently building a product that’s meant to facilitate collective IC staking and governance amongst different communities. Additionally, it’s meant to allows users to be able to collateralize their neuron stake in order to receive liquidity in the form of a loan.

To do this, I’ll need a treasury canister that has the ability to control a neuron. I’ve already built most of the code needed. This restriction on canisters has become a roadblock for me in development.

It wouldn’t make much sense to write up some convoluted system for enabling the treasury canister to control a neuron when, instead, the 1 or 2 lines of code that restrict canisters from controlling neurons could simply be removed.

The OpenChat SNS is doing this in practice. The code can be found here: open-chat/backend/canisters/neuron_controller at master · open-chat-labs/open-chat · GitHub

I would personally vote in favor if you put forward a proposal.

3 Likes

I am not an expert on this topic, so I am not aware of what the design goals or constraints on these are (or if there is some security issue, or if its just its a feature that has been low in priority queue), so I am sorry I cannot shed more light on this.