Introducing CKB Kickstarter: Decentralized All-or-Nothing Crowdfunding on Nervos CKB (Testnet MVP Live)

Hello Nervos Community,

I’d like to introduce CKB Kickstarter - a decentralized crowdfunding platform built natively on Nervos CKB, following the all-or-nothing funding model (like Kickstarter). The MVP is live on testnet with full lifecycle support, and I’m sharing it to get community feedback before moving toward mainnet.

Live Demo: decentralized-kickstarter-kappa vercel app


The Problem

There’s no trustless crowdfunding infrastructure on CKB today. If a builder or creator wants to raise funds for a project, the options are:

  • Off-chain platforms - custodial, fee-heavy, not aligned with the CKB ecosystem
  • Direct wallet transfers - no escrow, no accountability, no refund mechanism
  • No all-or-nothing guarantee - backers have no assurance that funds will be returned if the project doesn’t reach its goal

CKB Kickstarter fills this gap: a fully on-chain crowdfunding platform where pledges are locked until the campaign deadline, and funds are either released to the creator (goal met) or refunded to backers (goal not met).


How It Works

Campaign Lifecycle

Create Campaign → Backers Pledge → Deadline Passes → Finalize → Release or Refund → Destroy
  1. Creator sets a funding goal (in CKB), a deadline (block height), and a title/description - all stored on-chain
  2. Backers pledge CKB to the campaign. Each pledge is its own cell, linked to the campaign
  3. After the deadline block, anyone can finalize the campaign - it becomes either Success or Failed based on whether the funding goal was met
  4. On success: backers release their pledge CKB to the creator
  5. On failure: backers claim refunds, getting their CKB back
  6. Once all pledges are resolved, the creator can destroy the campaign cell and reclaim the capacity

Why CKB Is a Natural Fit

1. Cell model maps directly to crowdfunding primitives

  • Campaign cell = the campaign itself (goal, deadline, status, metadata)
  • Pledge cell = individual backer commitment (amount, backer identity, campaign reference)
  • Each is a discrete, ownable, verifiable on-chain object

2. Type scripts enforce the rules

Custom type scripts (written in Rust, compiled to RISC-V) validate every state transition:

  • Campaign creation: valid parameters, status must be Active
  • Finalization: only Active → Success/Failed, immutable fields preserved
  • Pledges: must reference a valid campaign, immutable once created

3. Lock scripts provide custody guarantees

Using standard secp256k1 locks, backers have full custody of their pledge cells. No one can move a backer’s funds without their signature. In v1.1, a custom lock script will make this fully automatic (more on that below).

4. On-chain metadata

Campaign titles and descriptions are stored directly in the cell data as variable-length UTF-8 after the 65-byte structured header. No IPFS dependency for the core flow.


Current Status - Testnet MVP

The MVP is deployed on CKB testnet (Pudge) and has been externally tested by a CKB team member who successfully created a campaign, pledged to an existing one, and ran through the full lifecycle.

What’s Working

On-chain contracts (Rust, RISC-V):

  • Campaign Type Script - creation, finalization, destruction validation
  • Pledge Type Script - creation, immutability enforcement, destruction

Transaction builder (TypeScript + CCC SDK):

  • 6 operations: createCampaign, createPledge, finalizeCampaign, refundPledge, releasePledgeToCreator, destroyCampaign

SQLite-backed indexer:

  • Background polling every 10s
  • REST API for campaign/pledge queries
  • Effective status computation (active, expired, success, failed)

Frontend (Next.js + React + Tailwind):

  • Campaign listing with progress bars, status badges (5 states), time estimates, backer counts
  • Campaign creation with form validation (title required, goal >= 100 CKB, deadline > current block)
  • Campaign detail page with pledge form, sortable pledge list
  • Role-based action buttons: Finalize, Release, Refund, Destroy
  • Toast notifications, skeleton loading, transaction progress indicator
  • JoyID wallet integration via CCC connector (verified working on testnet)
  • Network-aware: supports devnet, testnet, and mainnet configurations

Testing & docs:

  • 5 browser-automated E2E test scenarios
  • Security review (5 findings documented)
  • User guide, developer guide, testnet deployment guide

Architecture

contracts/
  campaign/src/main.rs     - Campaign Type Script (Rust, RISC-V)
  pledge/src/main.rs       - Pledge Type Script (Rust, RISC-V)

off-chain/
  transaction-builder/     - CCC-based tx construction (6 operations)
  indexer/                 - Express + SQLite, background polling
  frontend/               - Next.js 16 + React 19 + Tailwind CSS 4

Tech stack:

Layer Technology
On-chain Rust + ckb-std, RISC-V target
Tx building @ckb-ccc/core v1.12.2
Wallet @ckb-ccc/connector-react (JoyID, MetaMask Snap)
Indexer Express 5 + better-sqlite3
Frontend Next.js 16 + React 19 + TypeScript
Styling Tailwind CSS v4
Hosting Vercel (frontend), ngrok (indexer, temporary)

Key Design Decisions

A few choices worth explaining:

total_pledged is always 0 on-chain. Real totals are computed by the indexer from live pledge cells. Updating the campaign cell on every pledge would mean consuming and recreating it per pledge, creating contention when multiple backers pledge simultaneously.

Finalization doesn’t enforce deadline on-chain. The lock script ensures only the creator can finalize (spending the campaign cell). The off-chain layer checks that the deadline has passed. This is a known trade-off - adding since field enforcement is planned.

Standard secp256k1 locks on pledge cells. Backers have full custody. This means they could withdraw a pledge before the deadline (a feature, not a bug - backers should be able to change their mind). The downside: after finalization, backers must manually release or refund. This is the main gap v1.1 addresses.


What’s Next - v1.1: Trustless Automatic Fund Distribution

This is the most important upgrade. Right now, backers must cooperate to release funds (on success) or claim refunds (on failure). If a backer disappears, the creator can’t get those funds. This defeats the purpose of a trustless platform.

The plan: a custom Pledge Lock Script that replaces the backer’s secp256k1 lock:

  • On success: anyone can spend the pledge cell, but the lock script enforces that funds go to the creator’s address (read from the campaign cell via cell deps)
  • On failure: anyone can spend the pledge cell, but the lock script enforces that funds go back to the backer’s address (stored in pledge cell data)
  • While active: the pledge cell is locked - no one can spend it

This makes the entire flow trustless and automatic. A simple bot (or any user) can trigger the release/refund transactions - no private keys needed, since the lock script controls where funds go.

I’ve submitted a detailed technical request for feedback on this design to the CKBuilder-projects repo (CKBuilder-projects repo (issue #6)).


Further Roadmap

  • v1.2: Campaign cancellation, editing (before first pledge), user dashboard
  • v1.3: sUDT/xUDT support (stablecoin campaigns)
  • v2.0: Milestone-based fund release with backer voting, NFT rewards via Spore, .bit identity integration
  • v3.0: Cross-chain pledging via RGB++

Feedback Welcome

I’d appreciate feedback on any of the following:

  1. Custom lock script design - Is the approach of reading campaign status via cell deps and routing funds accordingly a solid pattern on CKB? Any pitfalls?

  2. Campaign cell identity - When a campaign is finalized, the cell is consumed and recreated (new outPoint). Should I use TypeID to give campaigns a stable identity?

  3. Positioning - Does all-or-nothing crowdfunding fill a real gap in the CKB ecosystem? Any features you’d want to see as a potential backer or creator?

  4. Architecture - Is the hybrid model (on-chain state + off-chain indexer + client-side tx building via CCC) a reasonable approach?

Please try the testnet demo and let me know what you think. Direct and critical feedback is welcome - I want to get this right before mainnet.

Thanks for reading!

15 Likes

Welcome to the community, and congrats on shipping a live testnet MVP.

This is a clear and easy to understand use case, and it feels like a natural fit for CKB. It’s good to see something already built and testable, not just a concept.

Once this reaches mainnet, do you expect the first real users to be CKB builders raising funds for ecosystem projects, or broader creators using it as a native crowdfunding tool ?

4 Likes

SO GLAD to see this kickstarter thing being built!

Previously we have a similar demo attempt: 众筹: 使用CKB作为资金媒介完全由TypeScript开发 Unfortunatly the topic is written in Chinese, but here is the source code GitHub - joii2020/crowdfunding · GitHub Maybe it can help solving some of your questions.

I always think the crowd funding is a great addup for all the funding solutions in CKB ecosystem. it is decentrailized and no one decides who gets fund. Only users paying and voting with their actual money. I will be very curious to see what kinds of projects get CKB people’s support there. Thank you for building this!


BTW, the indexer api seems down in https://decentralized-kickstarter-kappa.vercel.app/

6 Likes

Thanks both for the warm welcome and feedback!

@Ophiuchus Great question. The initial target is definitely CKB builders and ecosystem projects, people who already understand the value of trustless funding and want to raise within the community. Think of it as a native CKB funding rail where the community votes with their CKB. Longer term, as UX improves (especially with v1.1 automatic distribution and stablecoin support), it could open up to broader creators. But ecosystem-first is the strategy.

@RetricSu Really appreciate the enthusiasm and the pointer to the crowdfunding demo by joii2020. I’ll dig into it, especially interested in how they handled the fund distribution mechanics, since that’s exactly what v1.1 is tackling with the custom lock script.

You’re right that the indexer was down, the backend was running behind a temporary tunnel that went offline. I’m migrating it to proper hosting now so the demo stays reliably accessible. Will update here once it’s back up.

And I share your curiosity about what kinds of projects would get funded, that’s one of the things I’m most excited to find out once this hits mainnet.

5 Likes

Quick update: the indexer is back up and the demo is fully functional again at decentralized-kickstarter-kappa.vercel.app. Migrated the backend from a temporary tunnel to proper hosting so it should stay reliably accessible going forward.

2 Likes

v1.1 Update: Trustless Automatic Fund Distribution is Live on Testnet

Hey everyone, wanted to share a progress update. Since the original post, the biggest gap in v1.0, backers needing to manually cooperate for fund release/refund, has been fully addressed. v1.1 is deployed on testnet with hardened contracts.

What changed

Custom Pledge Lock Script: The core of v1.1. Pledge cells now use a custom lock script instead of the backer’s secp256k1 lock. The lock reads the campaign status from a cell dep and enforces where funds go:

  • On success: anyone can trigger release, funds routed to the creator’s address
  • On failure: anyone can trigger refund, funds returned to the backers
  • While active: pledge is locked, no one can spend it
    No private keys needed to trigger distribution, it’s fully permissionless.

Campaign Lock Script: Campaigns now use a custom lock that enforces the deadline via CKB’s since field. Anyone can finalize an expired campaign, not just the creator. This removes the creator as a bottleneck.

Receipt Type Script: When backing a campaign, a receipt cell is created alongside the pledge as proof-of-pledge. Used for cross-referencing during refunds.

5 contracts total now deployed: Campaign Type, Pledge Type, Pledge Lock, Campaign Lock, and Receipt Type, all written in Rust, compiled to RISC-V.

Security Hardening

Big thanks to @Officeyutong for the thorough code review on CKBuilder-projects (issue #6). All 6 issues were addressed:

  • Fail-safe refund backdoor (HIGH): The original design defaulted to backer refund when the campaign cell dep was missing. A malicious backer could destroy the campaign cell and force-refund a successful campaign. Fixed with a grace period (1.9M blocks, ~180 days), campaign cell dep is mandatory within that window.
  • Receipt validation too loose (HIGH): Receipt creation now cross-checks against the sibling pledge cell (amount + backer identity must match). Refunds are now fully permissionless, any wallet can trigger them.
  • Partial refund amount mismatch (MEDIUM): Partial refund now cross-checks the reduction amount against the destroyed receipt.
  • Merge timing + lock args (MEDIUM): Explicit lock args validation on merge output.
  • Finalization since enforcement (MEDIUM): Campaign type script now enforces since >= deadline as defense-in-depth alongside the campaign lock.
  • Indexer + reserved bytes (SMALL): Network-aware indexer client, reserved bytes validated during finalization.
    All hardened contracts were redeployed to testnet on April 20th. Attack scenarios tested and rejected (unauthorized refund, premature destruction, premature finalization).

Infrastructure

  • Indexer is now on Render (stable free-tier hosting, replaces the temporary tunnel)
  • Frontend still on Vercel
  • Both updated with the latest contract hashes
    The demo remains live at decentralized-kickstarter-kappa.vercel.app

:warning: Heads up: The indexer runs on Render’s free tier, which spins down after inactivity. If the page shows “Indexer API: Offline” on first visit, just wait ~30-60 seconds and refresh, it’s waking up from a cold start, not actually down.

What’s Next

  • Automatic finalization bot: A lightweight service that watches for expired campaigns and auto-submits finalization transactions. Since finalization is permissionless on-chain, the bot needs no special permissions, just a small CKB balance for tx fees. If the bot is down, users can still finalize manually from the UI.

Would love to hear any feedback, especially from anyone who’s tried the testnet demo. The platform is now fully trustless end-to-end, no cooperation required from any party after the deadline passes.

5 Likes

It sounds interesting, especially as I still cannot figure what real app is built on nervos. There are some wallets, some Lightning-like but absolutely no defi nor dex, that would be good to have defi if possible.

1 Like

There are some dexes, it’s just that at the moment there’s no activity, but good defi apps can definitely be built on CKB.

https://omiga.io/

https://utxoswap.xyz /

5 Likes

Update: Automatic Finalization Bot live on testnet :white_check_mark:

Following up on the v1.1 update above: the bot is deployed and end-to-end verified on testnet as of yesterday (2026-04-27). The platform is now fully trustless on testnet, campaigns flow create → pledge → deadline → distribution with zero manual intervention from anyone (creator, backer, or platform operator).

What the bot does (each polling cycle, every 10s):

  • Detects expired campaigns still in Active status → submits permissionless finalizeCampaign tx (Success if total pledged ≥ goal, Failed otherwise)
  • For finalized Success campaigns with remaining live pledge cells → submits permissionlessRelease tx (funds → creator)
  • For finalized Failed campaigns with remaining live pledge cells → submits permissionlessRefund tx (funds → backer)

Architecture:

  • Single FinalizationBot class integrated into the existing indexer process (no separate service)
  • Runs on Render free tier inside the same container as the indexer
  • Bot wallet funded with 100k CKB testnet, fees are negligible (~0.001 CKB per finalize/distribute)
  • Bot is optional: if BOT_PRIVATE_KEY env var is unset, the indexer runs normally and users can still trigger finalize/release/refund manually from the UI
  • Bot needs no special permissions, every contract entry point it calls is permissionless on-chain. The bot is a convenience, not a trust dependency.

E2E verification on testnet (2026-04-27):

Path Goal Pledged Outcome
Success 200 CKB 250 CKB Bot auto-finalized as Success → auto-released to creator (release tx 0x564c6d7a...)
Failed 10,000 CKB 100 CKB Bot auto-finalized as Failed → auto-refunded to backer (refund tx 0x54fd7e40...)

Total time from deadline to full distribution: ~30 seconds.

Try it yourself: https://decentralized-kickstarter-kappa.vercel.app/ create a campaign with a short deadline, pledge from a second JoyID account, and watch the bot do its thing.

What’s next:

  • External code review of v1.1 contracts
  • Sustainable platform business model (fees + treasury), open to community input on what feels right for an ecosystem-funded project
  • Mainnet deployment
5 Likes

awesome! keep it going.

I just want to share that Sustainable platform business model is very important in the early stage for CKB applications. It might sound counter-intuitive. But I, personally, love to see more apps that has the pontencial to generate real cash flow in the CKB ecosystem. For crypto, money is the new attension.

5 Likes

Where this is going: strategic direction + v1.2 fee proposal

v1.1 (trustless automatic fund distribution) is live and verified on testnet. The full campaign lifecycle now runs without manual user cooperation. Before I start on v1.2 and the grant proposal, I want to step back and discuss direction with the community, because the right v1.2 design depends on where this platform is going.

Who is this for?

A few possible audiences, not mutually exclusive:

  1. CKB project launchpad: early-stage Nervos ecosystem projects raising from CKB-native users. Smallest TAM but easiest to serve well; users already have wallets, understand the model.
  2. BTC crowdfunding via CKB L1: BTC holders funding projects without leaving the Bitcoin trust assumption. Bigger audience, but UX has to abstract CKB almost entirely.
  3. General crypto-GoFundMe / charity: competing with Geyser (Lightning), Chuffed, etc. Largest reach, most UX work, hardest to differentiate.

My instinct is the path is 1 then 2 over time: launchpad first while the ecosystem is small, then lean into BTC as Fiber/RGB++ infrastructure matures. But I’d value pushback on this, especially from anyone who’s tried to bring non-crypto users into a CKB dApp.

Adjacent idea: subscriptions via Fiber

One thread worth flagging even though it’s out of scope for v1.2 (shoutout to @neon.bit for raising it): the current model is one-shot, all-or-nothing crowdfunding. A Patreon-style ongoing-subscription model via Fiber payment channels would serve a different need (sustaining creators, not launching projects) and could share a lot of frontend. Not committing to it, but interested whether the community sees demand.

v1.2: Platform fees & treasury

Within that direction, v1.2 is the concrete next step: put a sustainable fee/treasury mechanism in place now so it’s ready when volume arrives. Honest framing: at testnet/early-mainnet volume, fees fund essentially nothing. The point is to get the mechanism deployed and battle-tested before it matters financially.

Proposed design:

  • 3% creator-side success fee. Charged only when a campaign hits its goal. Failed campaigns refund 100% to backers, no platform fee on failure, ever.
  • Creator-side, not backer-side. Backer pledges X, X counts toward goal. On success, creator nets raised × 97%, 3% routes to treasury.
  • On-chain enforced. The fee isn’t an off-chain convention. The pledge-lock script will require any success-release tx to include a treasury output ≥ pledge_amount × fee_bps / 10000. Skipping the treasury output causes the script to reject. Keeps v1.1’s “nothing important off-chain” principle.
  • Configurable via a platform config cell. Fee rate + treasury address live in a singleton cell read via cell_deps, not baked into contract args. Later governance (v1.5+) can adjust the rate without redeploying contracts.
  • Multisig treasury. CKB secp256k1 multisig (me + 1-2 trusted community members) until v1.5+ ships governance and custody moves to a DAO-controlled address.
  • No backer-facing fee surface. Backers see no fee, no surcharge. Creator sees their net payout on the create-campaign form. An About/Fees page explains the model.

Sequencing past v1.2:

  • v1.3: Rebrand (the “Kickstarter” name isn’t usable on mainnet)
  • v1.4: User dashboard and other UI/UX improvements
  • v1.5+: Platform token, governance, staking; treasury custody transitions to DAO
  • v2: BTC/RGB++ integration
  • Open: Fiber subscriptions, other directions surfaced by community feedback

What I’d value feedback on:

  1. Audience. Launchpad first, then BTC. Does that match where you’d push this, or would you start somewhere else?
  2. Fee rate. 3% creator-side, success-only. Too high, too low, wrong side of the transaction?
  3. Treasury custody. Multisig in the v1.2 to v1.5+ gap. Acceptable, or wait for the DAO before turning fees on?
  4. On-chain enforcement. Any pitfalls in requiring a treasury output ≥ fee from the pledge-lock script?
  5. Fiber subscriptions. Real demand, or distraction?
  6. Anything I’m missing.

Holding off on v1.2 implementation to gather input. Thanks.

4 Likes

I will share my personal feedback:

  1. Yes, Launchpad first, then BTC.
  2. Yes, 3% creator-side, success-only. Since the fee rate can be adjusted I will even suggest turn it up a little bit higher, like 5% or something. I also believe that a config cell is a standard and reasonable way to do this.
  3. Multisig works fine. Don’t wait for the DAO. Frankly speaking, I don’t even mind if this treasury is controlled by the developer alone in the early stage.
  4. Not sure. It seems fine to me.
  5. No Fiber subscriptions. I am against this feature, at least in the early stage. We need to prove that basic needs are met for the launchpad first. and then consider advanced features like that.
2 Likes

Thanks @RetricSu, really appreciate the detailed reply.

Agree on the fee rate, config cell means we can dial it down later if it ever becomes a barrier, but it’s easier to start at a sustainable number than to raise it once people are anchored on 3%.

Noted for the treasury custody, and agree on both launchpad and fiber subscription points.

2 Likes