Spark Program | CKB Wallet Behaviour Intelligence

Project Name

CKB Wallet Behaviour Intelligence

Team

Project Description

Problem

CKB provides transparent and rich on-chain data through its Cell-based architecture, but there is currently no open-source tooling that converts raw transaction data into actionable behavioral intelligence.

Developers can easily access transaction histories through explorers and APIs, but understanding how a wallet behaves still requires significant custom analysis and infrastructure.

Questions such as:

  • Is this wallet behaving like an individual user?
  • Does this wallet exhibit highly automated activity?
  • Is this wallet likely operating as an exchange-controlled wallet?
  • Does this wallet demonstrate unusual transaction behavior compared to typical network participants?

cannot currently be answered through a simple API or reusable ecosystem tool.

As the CKB ecosystem grows, analytics platforms, wallet providers, security tooling, explorers, and future infrastructure services can benefit from richer wallet context rather than relying solely on raw transaction records.

This project is not focused on detecting low-cost Sybil attacks. CKB’s Cell model and state occupation costs already increase the cost of mass wallet creation. Instead, the project focuses on behavioral analysis and wallet classification, providing ecosystem developers with reusable analytics infrastructure built specifically for CKB.

Solution

We propose an open wallet behaviour dataset, feature extraction framework, and baseline classification API for the CKB ecosystem..

The system will analyze wallet transaction histories using machine learning and behavioral feature extraction.

The initial version will focus on:

  • Transaction timing patterns
  • Transaction frequency patterns
  • Wallet interaction graph relationships
  • Cell usage and transaction flow characteristics

Using these features, the system will generate:

  • Human-like behavior score
  • Automated behavior score
  • Exchange-like behavior score
  • Confidence metrics

Developers will be able to submit a CKB wallet address through an API and receive a behavioral classification result.

The goal of this Spark Program project is to deliver a working prototype that demonstrates how behavioral analytics can enrich wallet intelligence across the CKB ecosystem.

Expected Deliverables

1. Open Source Repository

A public GitHub repository containing:

  • CKB data extraction pipeline
  • Feature engineering pipeline
  • Model training code
  • API implementation
  • Deployment instructions
  • Technical documentation

2. Wallet Classification API

A public REST API capable of:

  • Accepting a CKB wallet address
  • Returning wallet classification results
  • Returning confidence scores

3. Initial Wallet Dataset

A curated dataset containing approximately:

  • 500 human-like wallets
  • 500 automated and/or exchange-like wallets

The dataset will be publicly available and serve as one of the first open wallet behaviour datasets built specifically for the CKB ecosystem.

4. Documentation

Documentation covering:

  • API usage
  • Deployment instructions
  • Model methodology
  • Feature definitions
  • Evaluation results

5. Public Demonstration

  • Public API endpoint
  • Demonstration video
  • Project completion report

6. Formal Analysis Report

A formal report containing:

  • Model accuracy metrics
  • Precision, Recall and F1 Score
  • Confusion Matrix
  • Dataset size statistics
  • Label distribution statistics
  • API verification methods
  • Open-source repository links
  • Findings and limitations

How To Verify

The project can be verified without requiring code review.

Dataset Verification

Reviewers can:

  • Download the published dataset
  • Verify dataset size
  • Verify label distribution
  • Inspect feature definitions

Feature Pipeline Verification

Reviewers can:

  • Run the feature extraction pipeline
  • Generate behavioural features from CKB wallet data
  • Reproduce the dataset generation process

API Verification

Reviewers can:

  • Submit a CKB wallet address to the API
  • Receive classification results
  • Verify model outputs against published documentation

Model Verification

Reviewers can:

  • Train the baseline model using the published dataset
  • Reproduce evaluation metrics
  • Validate reported results

Repository Verification

Community members can:

  • Access the public GitHub repository
  • Review documentation
  • Reproduce data extraction and training workflows

Analysis Report Verification

Reviewers can verify:

  • Accuracy
  • Precision
  • Recall
  • F1 Score
  • Confusion Matrix
  • Dataset statistics

through the published report and repository artifacts..

Example integration: A Randomn wallet Provider

**

Required Funding

Developer Time

Phase Hours Description
Data extraction and feature engineering 30 hrs CKB-CCC integration, Explorer API integration, transaction ingestion pipeline, feature engineering
Model development and evaluation 30 hrs Dataset preparation, model training, model evaluation, classification pipeline
API implementation 25 hrs REST API development, model serving integration
Documentation and open-source release 15 hrs QA testing, deployment, documentation, demo preparation and final reporting
Total Developer Time 100 hrs Approximately 4 weeks of development

Infrastructure & Deployment Costs

Item Unit Cost Quantity Subtotal (USD)
VPS hosting (API, model inference server) $12/month 2 months $24
Database $20/month 2 months $40
Domain name for public API and demo ~$12/year 1 $12
Infrastructure & Deployment Subtotal $76

These costs support the public deployment of the Wallet Analytics & Classification API, model serving, dataset storage, monitoring, testing, and demonstration infrastructure required for the Spark Program deliverables.

Effective Hourly Rate

Metric Value
Total developer hours 100 hrs
Developer budget $700
Effective hourly rate $7.00/hr

Total Developer Compensation

Item Amount
Infrastructure & deployment costs $76
Dataset preparation & validation $124
Developer time $700
Total grant requested $900

The requested funding supports approximately 100 hours of development work covering blockchain integration, wallet data extraction, feature engineering, machine learning implementation, API development, testing, deployment, documentation, and public demonstration delivery.

Estimated Completion Time

4 weeks total

  • Weeks 1–3: active development (data pipeline, feature engineering, dataset construction, model training)
  • Week 4: documentation, open-source release, and formal reporting

Clear To-Do List

Week 1

  • Integrate CKB-CCC
  • Integrate Explorer API
  • Build transaction ingestion pipeline

Week 2

  • Implement feature extraction pipeline
  • Create wallet labeling workflow
  • Build initial dataset

Week 3

  • Complete labeled dataset
  • Train classification model
  • Evaluate model performance
  • Generate benchmark metrics (Accuracy, Precision, Recall, F1 Score, Confusion Matrix)

Week 4

  • Publish dataset
  • Publish feature extraction pipeline
  • Publish model training code
  • Publish API code
  • Release open-source repository
  • Publish technical documentation
  • Publish formal analysis report containing:
    Accuracy
    Precision
    Recall
    F1 Score
    Confusion Matrix
    Dataset statistics
    Label distribution
    Repository links
  • Publish project completion report

Relevance to the CKB Ecosystem

Meeting Actual Needs in the CKB Ecosystem

The project provides a reusable wallet analytics layer that can benefit:

  • Wallet providers
  • Blockchain explorers
  • Analytics platforms
  • Security monitoring tools
  • Future infrastructure services

Today, teams that require wallet behavior analysis must build their own infrastructure and classification logic from scratch.

This project provides an open-source foundation that can be reused and extended by ecosystem participants, reducing duplicated effort while encouraging experimentation with behavioral analytics on CKB.

The project also contributes an initial labeled wallet dataset and wallet classification API that can serve as a starting point for future ecosystem tooling.

Utilizing CKB’s Technical Architecture

The project leverages CKB’s transparent transaction model and Cell-based architecture to extract behavioral signals that are difficult to obtain from simple account balances alone.

Using transaction flows, Cell consumption patterns, transaction timing, and wallet interaction relationships, the system demonstrates how machine learning can be applied to CKB-specific data structures to generate useful wallet insights.

Future Work

The current Spark Program scope focuses exclusively on:

  • Wallet dataset construction
  • Feature extraction pipeline development
  • Baseline model training
  • Open-source release

Future work, including advanced model finetuning, ecosystem integrations, dashboard expansion, partner onboarding, and larger-scale dataset growth, will be pursued through a future Community Fund DAO proposal after successful completion of the Spark milestone.

This showcases a practical analytics use case built directly on top of CKB’s unique architecture and provides a foundation for future wallet intelligence and ecosystem analytics tools.

7 Likes

Hi @mulinya,欢迎你在 Spark Program 提案!

以下是我在提交委员会审核前的一些个人看法,供你参考,不代表委员会立场。
通读提案后,我梳理了以下几点可能影响委员会评审的问题,建议你在正式评审前做针对性调整:

1. 提案结构顺序混乱,可读性较差。

当前提案的章节顺序:概述 → 已完成工作(里程碑+预算) → 问题陈述 → 解决方案 → 工作流程 → 技术实现 → 界面设计 → 预算 → 团队

这明显不符合 Spark Program 申请模板的标准格式,请务必将相关内容整理后置于同一章节。

2. 缺少独立的“交付物”和“如何验证”章节。

目前提案没有独立且完整的 Deliverables(交付物) 和 How to Verify(验证方式)章节;社区和委员会成员目前都很难直观了解该项目的交付物有哪些,以及无从了解如何直接有效地以非代码审查的方式验证你的工作。

建议:综合前两个问题,按照 Spark Program Mini-Grant 模板 重新组织章节。

3. 预算额度 $1,500 超出纯技术类项目 $1,000 标准上限。

根据 Spark Program 资助方案,常规项目资助上限为 $1,000,特殊项目经委员会审议后可提高至 $2,000。目前你的提案申请 $1,500,但没有说明为什么这个纯技术类项目需要突破 $1,000 的标准线。

建议:将预算调整至 $1,000 以内;

4. 提案未回应"CKB 上是否存在女巫攻击问题"这一核心前提。

提案在"问题陈述"部分假设了"空投平台难以过滤女巫钱包"和"DEX 难以识别人类与机器人"等场景。但需要指出的是:CKB 是一条以记录重要数据为目的的链,任何个体在使用 CKB 保存重要数据时都需支付对应的 Cell 占用成本(State Rent)。这与那些依赖低成本的账户模型的公链有本质区别——在 CKB 上,"批量创建低成本钱包"本身就需要持续支付存储成本,天然提高了女巫攻击的门槛。除非"女巫钱包"有破坏 Fiber Network 中交易链路的能力,否则在 CKB 生态中,"区分人类与非人类钱包"这一需求的真实性和紧迫性似乎有待论证。

建议:在问题陈述中明确说明,为什么 CKB 生态需要这个工具——你的目标用户是谁(钱包开发商?DEX?审计团队?),他们在什么具体场景下面临"无法识别人类 vs 机器人"的痛点?这个痛点是否值得通过外部工具来解决,而非通过现有数据即可简单判断?

以上就是我梳理的几个关键问题,供你参考。在你调整后我会提请委员会尽快进入正式评审,相信修改后的提案会让评审过程顺畅很多。

期待你的更新版本。
祝好,
行天

3 Likes

Hi @xingtianchunyan,

Thank you again for the detailed feedback and guidance.

I have now reorganized and resubmitted the proposal according to the Spark Program Mini-Grant template. In the updated version, I have:

  • Restructured the entire proposal to follow the correct Spark format
  • Added clearer and more testable “How to Verify” sections
  • Adjusted the budget to strictly comply with the $1,000 cap, with a transparent breakdown between infrastructure, dataset preparation, and developer time
  • Refined the Problem Statement and CKB relevance section to better reflect real ecosystem needs and clearly define target users and use cases within CKB
  • Removed ambiguity around Sybil framing and focused the scope on wallet behavior analytics and classification

The revised proposal is intentionally scoped as a lightweight, verifiable prototype that can be delivered within the 6-week timeline, with clear outputs including an API, dashboard, dataset, and open-source repository.

Please let me know if there are any remaining gaps before formal committee review. I’m happy to refine further if needed.

Best regards,
Fadhil

3 Likes

Hi @mulinya ,

Thank you for your continued contributions and quick responses to the Spark Program. After review by the Spark Program Committee, your proposal is currently classified as Pending.

The committee has noted your efforts in restructuring, supplementing the How to Verify section, and clarifying the problem statement. The committee recognizes the technical direction and CKB ecosystem value of this project—wallet behavior analysis can indeed provide value to the CKB ecosystem in the future.

However, the committee’s assessment of the value of the weekly tasks in the To-Do List differs from the current proposal. The following are specific comments:

The primary reason is as follows:

The work planned for Weeks 4 and 5 does not add significant value to the core asset; it is recommended to focus on the initial data work

The committee believes that the project’s core assets are the annotated dataset and the feature extraction pipeline, rather than finetuning infrastructure or partner integrations. Therefore:

  1. Focus on the work in the first 3 weeks, remove the work planned for Week 4 and Week 5
  • Week 4 (model finetuning / expanding the feature set): offers limited value to the core dataset asset and is recommended to be postponed to a DAO proposal after the conclusion of Spark
  • Week 5 (Partner integration / Dashboard refinement): This belongs to ecosystem expansion work and exceeds Spark’s objective of validating the core hypothesis.

Keep the core data work for Weeks 1–3 (data extraction pipelines, feature engineering, initial dataset construction, baseline model training) and the Week 6 wrap-up open-source work.

After cutting Weeks 4 and 5, remove the labor and infrastructure costs corresponding to those two weeks, reducing the total budget from $1,500 to $900.

Open sourcing the dataset, feature-extraction code, classification model, and API code was already part of your Week 6 plan—please proceed accordingly. The open annotated dataset will become the CKB ecosystem’s first public wallet behavior dataset.

  1. Complete a formal analysis report

After the Spark funding ends, you must submit a formal analysis report that includes:

  • Specific model performance metrics on the test set (accuracy, F1 score, confusion matrix)
  • Dataset size and label distribution statistics
  • API documentation and verification methods
  • Link to the open-source repository
  1. Suggest applying to the DAO for a larger proposal after Spark concludes

The project’s full vision—finetuning infrastructure, broad ecosystem integrations, and large-scale labeled dataset expansion—goes beyond the scope of the Spark Program. Spark supports verifiable tool-like MVPs and the construction of core data assets. After Spark concludes, you can apply to the Community Fund DAO for larger funding to advance the full ecosystem integration vision.

Next steps

Please revise the proposal according to the feedback above (cut weeks 4 and 5, reduce the budget to $900, focus on weeks 1–3 data work + week 6 for open-source wrap-up), mention the updates in this thread by @-ing me, and the committee will complete the review as soon as the adjustments are confirmed.

Best,
xingtian
On behalf of the Spark Program Committee

Hi @xingtianchunyan,

Thank you for the thorough review and clear direction. I have gone through all the committee’s points and updated the proposal accordingly – the scope, budget, and deliverables now reflect exactly what was requested.

One additional note: the web dashboard has been removed from this Spark scope and will be picked up in a future DAO proposal alongside the broader ecosystem work.

The revised proposal is ready for committee review whenever you are. If any further alignments are needed before the review is finalized, I am happy to make additional adjustments.

Best regards,
Fadhil

5 Likes

Hi @mulinya,

We are pleased to inform you that the Spark Program Committee has approved the CKB Wallet Behaviour Intelligence proposal, with a funding amount of 900 USD (100% paid in CKB, 1 CKB = 0.000950 USD, 947,369 CKB).

The committee believes that an open wallet behavior dataset, feature extraction framework, and baseline classification API can help foster a healthier development of the ecosystem in the future.

Here are the next steps:

  1. Funding & Wallet Address

    The total grant is 900 USD (for the current cycle Spark grants are paid 100% in CKB).

    • The first installment (20%) equivalent to 189,474 CKB will be disbursed as soon as possible.
    • Please provide the CKB wallet address to receive the funds.
    • The remaining 80% is flexible: it can be requested during weekly syncs as needed or claimed upon project completion.
  2. Weekly Sync

    We would like to establish a regular weekly synchronization mechanism, with two options:

    • Text-based updates in this post, with progress updates at a fixed time each week and committee feedback in reply.
    • Or a brief video call.
      Please let us know your preference and a convenient time.
  3. Proposal Content Lock

    • Once a proposal is approved, we will lock the current version of the proposal post as the reference baseline for subsequent delivery and acceptance. This is standard procedure for all approved Spark projects. If adjustments are needed during development, they can be discussed and documented during the weekly syncs.

Congratulations again, and we look forward to working together!

I also apologize for wasting your valuable time. Due to unstable VPN connectivity recently, I was unable to release this announcement in a timely manner. I hope for your understanding and forgiveness.

Best,
xingtian
On behalf of Spark Program Committee

2 Likes

Hello xingtianchunyan,

Thank you to you and the Spark Program Committee for approving the proposal. I appreciate the opportunity to contribute to the CKB ecosystem.

My CKB wallet address is:

ckb1qyqvkel34xpgrdtja8fddy93fgkp6lduy90q2u385q

For the weekly syncs, I prefer text-based updates in this thread. I’ll post updates every Saturday at 6:30 PM UTC.

The proposal lock and funding process work for me. I also understand the delay no worries.

Looking forward to working together.

Best,
Fadhil

2 Likes

Hi @mulinya ,

The first installment has been disbursed.

Transaction Hash: 0x3bbaecf1b871643edb1fd635c399cf502cfad1ae22fe89851859cf01a380aa16

Please confirm once received.

Looking forward to your first progress update.

Best,
xingtian
On behalf of the Spark Program Committee

Hello @xingtianchunyan

I have received , Thank you.

Best,
Fadhil

1 Like

Hi @ xingtianchunyan,

What’s done in week 1:

  • Initial commit pushed: GitHub - FadhilMulinya/ckb-intel · GitHub
  • Ingestion pipeline: give it a CKB address → it resolves the lock script hash (via CCC), pulls the transaction history from the CKB Explorer API (paginated), filters by a configurable time window, normalizes it into a canonical transaction schema, and upserts wallets + transactions into MongoDB.
  • Versioned REST API (Fastify, /api/v1) with ingestion, wallet lookup, paginated transaction history, and health/preflight endpoints.
  • The full project structure and layered architecture controllers->services ->repositories/clients is documented in the README.

The attached diagram shows the high-level end-to-end system flow.

Run it Locally:

git clone https://github.com/FadhilMulinya/ckb-intel
cd ckb-intel
npm install
cp .env.example .env   # needs a local MongoDB running
npm run dev

Then ingest an address via the POST /api/v1/ingest endpoint (body: a JSON list of addresses), and read the results back from GET /api/v1/wallets/{address}/transactions - it returns the wallet’s clean, normalized transaction history as JSON. The exact commands are in the Quickstart section of the README.

Next up: feature engineering on top of the normalized history - turning raw transactions into behavioural signals for wallet labeling and classification.

3 Likes