This topic is for people to show what they work on and hopefully find help if they need guidance.
I work on CycleGuard: https://wumnz-2qaaa-aaaap-qu2xa-cai.icp.net/
Its automatic cycles top-ups app, where users can monitor own controlled canisters.
*If user own this app (in future buys from App Store), can add app as canister controller for easy monitor and top up.
*If user dont own app, can add this app backend ID as canister viewer and it shows balance and auto monitoring works as usual. If code proven to be safe and controller blackholed, can be safe to add app backend as co controller.
*Safest option, users can add any canister to Support Canisters, this is for auto top up with intervals, lowest risk, but cant see cycle balance. Its good for helping other projects keep cycle cost lower by basically donating own ICP into cycles.
Fees are 10% top up and 0.0001 per check if canister needs top up. Check is user controlled, 1h and up to 7D.
Goal is to sell replicas of it and be mainly for users personal canisters. From admin panel, who ever owns this can set fee from 0 to 30% and Check fee from 0.0001 to 0.001 ICP. So it can be used by offering service to other people.
My question, is there something i should add or fix.
This sounds great. I’m currently topping up two cans by manually checking balances, then going to my NNS wallet. If I understand correctly you’re saying I can monitor and top up from the same dashboard? Do I preload a third tank, and from that tank top up the two canisters ?
How this works is you log in, send icp to your wallet. Than you set spending limit from what backend can pull icp for topping up canisters.
Than you go to Canister tab, there you got 2 options, 1. add canister where you added CycleGuard as co controller. This option is little dangerous, unless you own CycleGuard app yourself. 2. Safe option is --add-status-viewer xvk27-biaaa-aaaak-qzg5a-cai , this makes sure CG can read your cycle balance without app being able to change or delete your canisters. Canister tab will top up canisters when your set balance drops, example: canister has 2.2T, you set top up at 2T, and top up amount 1T, time interval where it checks and triggers if needed, usual 1d, if dont consume much, than 7d.
If you go to Support Canisters, there you cant see cycle balance, can add any canister. Example, it you know your app consumes 1T cycles a month, you can put interval and 0.5 ICP per month (will add 14d and 30d later), i might put option it to calculate, so can pick cycle amount instead.
If all goes well, app can be bought and owned by everyone for theyr personal canisters. After some time i will blackhole CG, so it will be safe to add it as controller and people dont need to worry about trust.
It now turns out that token ledger spawns new canister at 2000 transfers/2000 blocks. It creates and pulls 1T cycles from ledger canister, when archive canister runs low on cycles, it will pull 500 bil again. After every 1000 blocks, it will move transactions to archive canister. Archive can hold 1Gib data, 6.6mil transfers, if it has burn transaction included in block, than about 3.3mil. If its full, cost should be about 16 usd per year. So if archive is full, oh boy oh boy, it makes new one and starts filling it again.
Index canisters will be problematic and not sure if we actually want them.
Is this sustainable? I have not really looked how other token standards work, but this one is working fine right now and cost seems to be low. AI spammed about 6k transactions and now total is 13k as burn spammed with each. Unfortunatly if someone does not add fee to token, or token value is so low, spam can go on for long with no cost and it will drain token cycles.
Whoever made Index canister, must be like millionaire. Paying 1.69T cycles per day is like tossing money away. Thats not all, it increases token ledger cycle consumption too.
AI managed to get it down to 9.17B a day, its 184x less, and it still works fine in Oisy wallet.
Custom index canister will hold 12 month of transactions or up to 1mil transactions. Idle freshness is now up to 5 min, if detects activity, it catches up fast, adaptive backoff. Old transactions are still saved to archive canister, so nothing is lost.
reminded me of https://forum.dfinity.org/t/are-two-canisters-for-a-icrc-ledger-suite-ledger-and-index-still-necessary/42513 … there was another great debate related to the Dev Journey tutorials and WG related to the role of index in order to be able to query long transactions history for specific accounts on mainnet because of high latency that’s why the icp index is on the nns subnet and such but can’t find it. Probably burried with other usefull deleted threads.
Most apps dont even need index canister, only 1 i know and its Oisy wallet.
About token standards, i started with icrc2 that stored all transactions in itself but it had limits, now it supports icrc3 and stores transactions in archive canister. Archive itself can hold about 6 mil transactions, if you look Boomdao, it has 2.5mil, i think. Even if 6 mil fills, it makes automatically new one, so my token can live long time without going in flames. And best part is i dont need to worry about archive running out of cycles as it pulls cycles from ledger when needed.
Too bad there are no more grants. Anyone want to be a sponsor?
It looks like Grid bot can be done, uses ICPSwap. Right now DCA bot works fine, grid bot next, but pool balance wont work that well as i have minimum 1h trigger. I think ICPSwap runs its own bot to balance pools with high intervals.
Rabbit hole goes deeper!
Currently can handle about 3-6 swaps a minute, but if i add option (sharding) to make extra canister for filling orders, this can scale 6-12 orders filled a minute. There is no limit of how many canisters can be spawned from admin panel for filling orders.