COMP Shared Lock: From Gas Pool to Open Message Spaces

I have always felt that CKB is different from other blockchains. Its Lock is more than an access condition—it is programmable on-chain logic, which gives developers a unique space for experimentation.

This led me to a question:

Can ordinary users experience Web3 without first setting up a wallet?

For many newcomers, installing a wallet, managing private keys, and obtaining CKB before sending a first transaction creates a significant barrier.

So, with the help of AI-assisted coding, I built a simple COMP Shared Lock. The initial idea was to create a public Lock and use a shared Cell as a Gas Pool, allowing users to interact with an application without handling the full wallet experience first.

Its core rule is simple:

Anyone may use the Cell, while no individual can take it over.

Each state transition creates exactly one successor Cell. The Lock, Args, and Type remain unchanged, while capacity can only decrease within a defined limit. This allows a CKB Cell to function as a long-lived shared state container maintained by a community rather than a central server.

Beyond a Gas Pool Cell

After building the Gas Pool concept, I started thinking about what else could be created with a shared Cell.

Because CKB Locks are programmable and Witness data can carry custom information, a Cell can also become an open public message space. This idea led to the CKB Open Message Protocol, which is also where the name COMP comes from.

Text Room

A permissionless on-chain text room.

Anyone can post anonymous messages. Once recorded on-chain, each message becomes part of the transaction history, and the application provides no delete function.

:backhand_index_pointing_right: Enter Text Room

Canvas Wall

A public on-chain graffiti wall.

Multiple people can paint on the same canvas, leave their own marks, and explore the history through replay.

:backhand_index_pointing_right: Enter Canvas Wall

This is a small experiment exploring how CKB Lock programmability and shared Cells can lower the barrier to Web3 and create open, community-maintained spaces on-chain.

Feel free to leave a message in the Text Room or add your own drawing to the Canvas Wall.

Note: This project was built in only a day or two. The focus was on exploring the possibilities and playability of CKB Locks, rather than designing rigorous data structures or protocol standards. It should be viewed as an early prototype, and feedback is very welcome.

Project source code:

10 Likes

这是一个很简单的想法,但是非常有趣。没有准入门槛可以让用户不需要有ckb钱包就能去使用应用,比如留言。但它让我想到,也许设置一定的门槛,也能很好的发挥这个 shared lock 的想法。比如某些项目lauch 的时候,他们可能会希望让一些用户去试用自己的应用,它们可以通过自己的服务器去设置一定的门槛,让满足的用户去享受这些链上的shared cells来体验产品。一个例子可能是,我们之前考虑解决的 air-drop 某个 udt 的接收问题:用户没有ckb 钱包,也就没办法去接收 udt 空投,要么项目方自己去付出这些成本,每空投一个 udt,就送出一百多个ckb 给用户,要么就只能让用户自己提供。也许通过这种 shared lock,可以实现某种中心化服务器必要的控制+链上领取的保证。

3 Likes