What is "principal controller" (to which accordingly to the docs cycles are returned on deletion)?

To withdraw cycles from a canister, the canister must be deleted. The cycles will be returned to the canister’s principal controller.

It seems that there is no such term “principal controller” and it should instead read: The cycles will be returned to the canister that deletes our canister.

Correct?

Hi @qwertytrewq,

I agree that the documentation is not very clear in this case, but it’s not wrong if the user is deleting the canister via dfx.

The cycles will be returned to the canister that deletes our canister

Almost — the cycles will be sent to a wallet canister that dfx would create and manage automatically for the user. The wallet itself isn’t going to be a controller of the canister being deleted.

We’ll try to clarify the documentation in this regard in the near future.

1 Like

It would be great if this just migrated to a deposit on the cycles ledger.

There is yet another version in this detective:

Deleting a canister cannot be undone, any state stored on the canister is permanently deleted and its cycles are discarded.

^^ About delete_canister in management canister.

Are cycles moved to ledger/wallet or discarded?!