QuotaCell: Let your team spend without handing over the treasury

Thanks @ArthurZhang, good catch. You’re right, the current application path still assumes a single protected fund Cell, and unsupported matching Cells can also cause discovery to fail.

That could become a real problem if someone sends additional funds to an existing Pocket, especially if the owner then can’t reopen it or recover the funds through the normal interface.

I’ll reproduce those cases and check the recovery path before treating the Pudge Pocket as ready for public testing. Appreciate you looking into the implementation.

2 Likes

Thanks @Ayoub_Lesfer, that makes sense. I hadn’t considered how involving the Pocket in every keeper transaction could create conflicts.

The refill approach sounds more practical, especially with your existing balance checks. I’ll look into how QuotaCell and CSR could handle that safely.

Once the current Pudge work is further along, I’d be interested in testing this with your keeper setup. Appreciate the insight!

2 Likes

QuotaCell update: Off localhost and running on public Pudge

In my November 6 update, QuotaCell could finally complete a spending and recovery cycle through a browser. But everything was still running on a local CKB chain with disposable signers.

I said real wallets and public Pudge testing were next.

Well, we’ve made that jump. :grin:

QuotaCell is now live as a public Pudge testnet beta.

Website: https://quotacell.netlify.app

App: QuotaCell — Shared spending, owner control

GitHub: GitHub - Ticoworld/QuotaCell: Experimental native CKB policy for shared delegated spending, with verifier and isolated-node evidence. · GitHub

Getting here wasn’t as simple as moving the app online

A lot of the work over the past two weeks has been dealing with things that didn’t show up in the local tests.

First was getting transactions prepared for real wallets like UTXO Global to review and sign, without QuotaCell holding anyone’s private keys.

Then came transaction recovery. A transaction could reach Pudge while the RPC response was lost, leaving the app unsure whether it succeeded. We had to preserve the original signed transaction and reconcile its outcome rather than risk submitting a second payment.

Even after deploying the website, I ran into another issue. My wallet connected, but the My Pockets section kept loading and eventually failed. Refreshing didn’t help.

We traced that to the discovery process rejecting normal indexer advancement, alongside the reliability problems of depending on one public RPC. Discovery now handles canonical indexer progress and can retry read-only queries through another Pudge endpoint. The regression tests passed, and I’ve confirmed Pocket discovery working again on the live site.

Getting the contract to work locally was one milestone. Making the whole experience survive real network conditions has been a different challenge.

What actually works now

An owner can create a Pocket, fund it, and give two independently controlled delegates permission to spend within a shared allowance.

Each delegate uses their own wallet, with individual limits and an approved recipient. CKB enforces the rules, rather than relying on the website to behave correctly.

The owner can adjust allowances, revoke or restore spending access, close the Pocket, and recover supported funds.

There’s also a public web app now, with Pocket discovery, transaction history, and English and Simplified Chinese support. You can inspect public Pocket activity without connecting a wallet.

And importantly, we now have actual Pudge transactions behind those claims.

On November 15, a documented nine-transaction lifecycle covered creation, funding, a 61 CKB payment by each delegate, revoking both delegates, closure, and recovery of a separate 73 CKB deposit made after the Pocket was closed.

On November 20, I completed another lifecycle through the real-wallet web app, including delegate payments, permission changes, and closure.

That second closure returned 78 CKB of protected funds and released 466 CKB of policy capacity, leaving the 134 CKB terminal Cell on-chain.

These were two separate testnet runs.

The November 15 transaction record and capacity accounting are available on GitHub.

Here’s also a confirmed close transaction from the newer run.

Following up on the feedback here

Some of the earlier comments helped shape what I worked on next.

@ArthurZhang, you raised concerns about extra deposits, multiple fund Cells, and recovery getting stuck when unsupported Cells were present.

We’ve changed fund discovery to distinguish supported ordinary fund Cells from unsupported matching Cells, with local tests covering those paths. I still need broader adversarial testing on public Pudge before considering that fully resolved. Delegate and recipient rotation is also still missing.

@Ayoub_Lesfer and @psawyerberlin, I’ve kept the keeper refill and CSR discussion in mind.

Automatic refills aren’t implemented. And looking at the current policy’s capacity and payment requirements, I’m not convinced this version makes economic sense for small, frequent keeper top-ups. That needs validation before building a refill mechanism around it.

@RetricSu, you also raised the importance of keeping this approachable for small organizations and people who aren’t developers.

The interface has moved a long way from the original developer harness. But making it look easier and proving that someone unfamiliar with QuotaCell can actually use it are two different things.

That’s something I want to test with people outside my own setup.

Why only two delegates?

One thing I should clarify about the current design is that two delegates are the scope I chose for this version, not the number I think every team should be limited to.

I wanted to get independent signing, the shared allowance, owner controls, and recovery working together before expanding the number of participants.

Right now, the two delegate identities and their approved recipients are fixed at Pocket creation. You can update allowances and revoke access, but you can’t add a third delegate or replace those identities afterward.

For a small spending arrangement, that might be enough. For a growing team where members and recipients change regularly, it clearly won’t be.

I’d rather learn which flexibility people actually need before expanding the contract.

Where things stand

This is still an experimental, unaudited Pudge testnet beta, not something to use with real funds.

The current policy occupies 600 CKB while active, retains 134 CKB after closure, and has a 61 CKB minimum ordinary payment. Those costs are significant for smaller budgets, and they’re part of what needs improving or reconsidering.

But we’re now at a point where people can actually open QuotaCell, connect a compatible Pudge wallet, and inspect real transactions instead of relying on my local test reports.

What I’d really like next is for someone else to try it.

If you’re working on CKB, running a small project, or have a spending workflow that might fit this, I’d appreciate you taking a look.

I’m particularly interested in what confuses you, where something fails or takes too long, and whether this type of control would be useful for your own project.

If anyone wants to go through a small testnet scenario together, I’m happy to do that too.

Thanks again to everyone who’s shared feedback and challenged the earlier versions. A lot of the improvements came from trying to answer those questions properly.

There’s still plenty to work on, but it’s good to finally have QuotaCell out there for others to try.

3 Likes