Added cycle my wallet go to an automatic anonymous wallet without access

i added cycled from icp tokens to my wallet but the wallet cannister is not storing them. instead it created an anonymous canister and stores 4T that i added there. i dont know if i have acces to it all i can see in my wallet canister is the anonymous canister name and amout of cycles
this seems to happen everytime i add more that 4T cycles. it took me 3 tries to find out can someone help i have 12T unusable

1 Like

Can you add some more details? Like outputs that show your problem. I can’t quite follow your description.

sĂĄ i added cycles to this wallet through nns.

the wallet id is in the url. since i an currently logged in to this wallet i have controll of it. the problem is that i added more than 12Trillin cycles but all i have on balance is 0.7T cycles. is u look below there are three wallets with 4T cycles each. every time i add more than 4T cycles to the wallet it crates these anonymous canisters and store 4T cycles on it. when i try to log in to these anonymous cycles it says im not the controller. so they are basicly unusable and im losing money.

Okay, I think I see what’s going on. Thank you for explaining a bit more.

I am assuming you also can access it through dfx. To double-check, you can do the following:

  • dfx identity --network ic get-wallet is supposed to return your wallet’s id, in this case v24aq-iaaaa-aaaak-acjrq-cai
    • If this is not the case, please try dfx canister --network ic status v24aq-iaaaa-aaaak-acjrq-cai.
      • If this returns an error 404, this is pretty annoying.
      • If this returns something more sensible, please run dfx identity --network ic set-wallet v24aq-iaaaa-aaaak-acjrq-cai.

Small nitpick / terminology thing: those are canisters, not wallets (unless you actually installed the cycles wallet wasm, which you didn’t do as those canisters don’t show a wallet when I visit their URLs)

The wallet itself is very unlikely to do this. If it was, you would have a faulty (malicious?) wallet wasm in your wallet. Most likely you are running dfx deploy --network ic or some other way that creates canisters on mainnet, and just don’t realise you do. From visiting those canisters, it looks like it’s some NFT-like thing or a banking-like service?

At the very least I can confidently say that those canisters seem to be projects with some real code deployed.

Now, what can you actually do? Again, I’m assuming you have access to the wallet through dfx and are using the controlling identity.

  • Update dfx. This could have happened because you’re using an older version of dfx, where wallets were handled differently. I strongly recommend you dfx upgrade to get to a version that runs more of what we expect.
  • Gain control of the canisters. You can tell your wallet (which controls the rogue canisters) to add yourself as a controller. You can do this with the following command:
    • Base command: dfx canister --wallet <your wallet id> update-settings --all --add-controller <target canister>. The flag --wallet <your wallet id> tells dfx to proxy the call through the id you give it.
    • Actual commands:
      • dfx canister --wallet "v24aq-iaaaa-aaaak-acjrq-cai" update-settings --all --add-controller "e57jd-wiaaa-aaaak-acsca-cai"
      • dfx canister --wallet "v24aq-iaaaa-aaaak-acjrq-cai" update-settings --all --add-controller "eiyyo-xaaaa-aaaak-acsbq-cai"
      • dfx canister --wallet "v24aq-iaaaa-aaaak-acjrq-cai" update-settings --all --add-controller "vp3r5-jiaaa-aaaak-acjsa-cai"
  • Delete the canisters. If you want to delete the canisters (and withdraw their cycles to your cycles wallet), you can do so by running dfx canister --network ic --wallet "v24aq-iaaaa-aaaak-acjrq-cai" stop <target canister id> followed by dfx canister --network ic --wallet "v24aq-iaaaa-aaaak-acjrq-cai" delete <target canister id>. Again, I recommend you update dfx afterwards so that this doesn’t happen again.

Thanks, now i also have a much better understanding. they were not randomly created canisters. it seems every project i have created and deployed using the my main that specific wallet id and my controller principal are listed down in my wallet. each with 4T cycles that it took to make. when i one day delete the canister i get it back(quite handy.)It would be even better if we could turn cycles to ICP token then overtime My 4T cycle websites would actualy have real world monetary value.just for existing. hehe.

unfortunatetly, the problem of my creating a new canister everytime i have more than 4T is still there

It looks to me like you’re accidentally creating the canisters. Are you aware that dfx canister create and dfx deploy both can create canisters?

And to debug: can you show me what you’re doing? I would assume the following happens:

  • dfx wallet --network ic balance shows <4T
  • dfx canister --network ic delete <some canister>
  • dfx wallet --network ic balance shows >4T
  • dfx deploy --network ic tries to create up to as many canisters as defined in dfx.json
  • dfx wallet --network ic balance shows <4T

My process in creating dapps is i first dfx new project then npm i and caribrate the setting and file. e.g webconfic, dependensies. I build out the whole project localy then dfx start the local blockchain and dfx deploy locally. I try to keep to one single project when the block chain is live because i had many issues with duplicate canister names if i had two and more. especially is the two dapps are to communicate locally.

now for deploying live. i have an where i have icp tokens. inside the nns i created a canister and fill it up with a bit over 4T cycles. the controller of this canister is not my local development controller sĂĄ i add it manually there. after i am authorized locally as controller. i go back to local development.

i use the canister i just filled with cycles as my live wallet and run the command dfx identity --network ic set-wallet <wallet id>. Then i deploy the wallet live first because it seems if i try to deploy the project live first i get a “no .wasm…” error. i deploy the wallet with the command dfx identity --network ic deploy-wallet <wallet id>. everything is usually good til this point.

after i start deploy my project with dfx deploy --network ic. this is i encounter three scenarios. 1 optimal two rather annoying.

scenario one -i get to publish the whole project both backend and frontend and my wallet i deducted 4T cycles

scenario two - i get an error message that i dont have enough cycles. for example if i had deposited 4.5T cycles from the i get the error only have 0.5T cycles , the threshold is 3.8T cycles. i go theck my live wallet and i find a new canister with 4T and my wallet/canister with only 0.5.

scenario three. - i get to publish my front end canister but that alone uses up 4T cycles thus i get an error that i could not deploy my backend. low on cycles. i then have to go fill up the wallet eith another 4T, then i get to deploy my backend as well.This deployment alone costs 8T.

This is my usual process.

i have never used dfx canister create yet

This should only be a one-time process. Once you have your wallet, you don’t really have to change it anymore. If it runs out of cycles, you simply can top it up and don’t need to create another one.

Only tangentially related: There’s also the --with-cycles flag in case you don’t want to create all your canisters with 4T cycles. If you do dfx deploy --network ic --with-cycles 1000000000000 your canisters will be created with 1T cycles each.

Every canister you create through dfx deploy (assuming you don’t use the --with-cycles flag) will use 4T cycles. Therefore this scenario should only happen if one canister was already created.

If dfx deploy --network ic tries to create two canisters and you don’t have enough cycles for both it will fail at some point, so this makes sense (or at least to me…).

This would be picking up from scenario 2 where you try again after topping up your wallet and sounds exactly like what I would expect to happen. If this is surprising to you, can you please explain a bit more what you would expect to happen? Maybe I’m just too familiar with weird behaviour to notice why it’s silly what actually happens.

Anyways, maybe there is another misunderstanding: Once your two canisters are created, you shouldn’t create any new canisters if you run dfx deploy --network ic. If you run it again dfx should update the content of the previously created canisters. If it doesn’t work this way, then one of two things has happened: Either you deleted canister_ids.json (you shouldn’t do that) or you found a way to trigger a bug in dfx very reliably. If it is a bug, I’d love to see your project setup if you’re willing to share.

1 Like

i understand Scenario 1 and 3. They are fixable by editing the canister_ids.json to match the canisters that are named on my live wallet. The problem is scenario 2.

it does this then we get scenarion 3 where only 1 canister is created with 4T. and fails to create the second, solved by adding more.
But in scenarion 2 it doesnt create a canister after i run dfx deploy --network ic. I right after i fill my wallet with cycles.

like, if we just focus on the nns and my live wallet.
lets say i have 3T in live wallet. i go to the nns and top up 4T cycles. then i go out of my nns and log in to my live wallet to find there is still 3T but a new canister was created automatically. without me having tried to deploy any project.
This happens sometimes feels random sometimes, not sure.
But it seems it only happens when i top up more than 4T from the nns.
topping up less multiple times seems to let me hold more than 4T at once.

dont know if its bug, but if it is it probably somewhere between nns or/and my wallet. deploying is working as intended

Thank you Severine, one more time you saved me I got back my cycles… I hope we will get more post like this in future, even if we are little beginner, i am sure these posts will help a lot of beginners in future. Thank you for your time.