Spark Program | TapFiber: Fiber Payment Intent and Verifiable Receipt Reference

1. Project Overview

Project name: TapFiber
One-sentence summary: An open-source Fiber payment-intent kit that binds a merchant order to one exact invoice, accepts settlement once and produces a signed receipt; NFC and QR are the first physical delivery methods for the request.
Project type: Core library + testnet FNN integration + reference terminal + reproducible failure report.
Funding requested: US$900 paid in CKB
Duration: 5 weeks

TapFiber is not another checkout page and it is not an NFC hardware project. Its core is the boundary between a Fiber invoice and a fulfilled real-world order:

Payment request → exact Fiber settlement → one terminal state → verifiable receipt

NFC is the first reference transport because it makes the boundary easy to test in person. The same signed request can be carried by a QR code, a browser link, or a future wallet deep-link.

2. Team Profile

I am a blockchain product engineer who has built across Solana, EVM and Bitcoin with additional work in Move and Stellar

Recent work:

  • Knapstore: a Solana protocol with a signed publishing and commitment flow. The work included Ed25519 instruction verification, PDA-bound publisher authorization, on-chain key rotation and recovery paths, tombstoned key history and adversarial authorization tests

  • Paymod: a programmable payment-authority system for agent-initiated transfers, with deterministic policy checks, human approval through Telegram and an auditable approval trail

I am new to building directly on Fiber. That is why TapFiber is scoped as an open, testnet-only reference implementation with pinned FNN compatibility evidence, reproducible tests and explicit failure reporting not as a claim of production merchant readiness

The relevant experience for TapFiber is not simply having used multiple chains. It is having built systems where a cryptographic action must be bound to the correct request, state transition, authorization rule, and audit record. TapFiber applies that discipline to a narrow Fiber question: when can an application safely treat a payment as fulfilling one exact order?

Github: 0xVida (vida) · GitHub Repo: GitHub - 0xVida/tapfiber · GitHub

3. The problem

Fiber provides the payment rail: invoices, payment hashes, channels, and settlement status. An app building on Fiber still has to define its own answer to the following questions:

  • What exact order does this invoice pay for?

  • Is the observed payment for the requested asset, amount, network, and expiry?

  • Can a late payment fulfil an expired order?

  • Can an application refresh, retry, or receive the same event twice without issuing two receipts?

  • What can a merchant or customer verify without trusting the application’s database?

That logic is easy to underestimate. A UI saying “paid” is not a payment primitive. A merchant needs deterministic fulfilment rules, and another developer should not have to recreate those rules from scratch for every ticket, vending, access, or pickup flow.

Existing work and what TapFiber reuses

Fiber already provides the underlying payment and invoice functionality. TapFiber uses standard FNN RPC methods for invoice creation, payment, and invoice-status observation; it does not modify Fiber or invent a replacement payment protocol.

FiberFlow already provides a self-hosted checkout, merchant dashboard, API, and webhooks. TapFiber does not compete with that work.

The new contribution is smaller and lower in the stack:

  • a signed, portable Fiber payment request;

  • a deterministic order-state rule;

  • a signed receipt format and offline verification;

  • test vectors and negative-path evidence;

  • a physical reference flow that tests those rules against FNN testnet.

Why Fiber and when Fiber is not needed

Fiber is relevant when an application needs an invoice-based payment between parties who do not share a billing provider, and needs the payment result to control a real action: entry, release, pickup, or service fulfilment.

If a merchant and customer fully trust each other, a cash payment, a manual transfer confirmation, or a printed voucher is simpler. TapFiber does not claim every local payment needs a channel.

The project asks a narrower question: can a Fiber application make a reliable fulfilment decision from a payment result, and publish enough evidence for another developer to reproduce that decision?

4. Current State vs Funded Scope

Already exists — not funded

The initial local implementation has two parts.

TapFiber Core

  • versioned tapfiber:1 request encoding;

  • canonical fields for order ID, amount, asset, network, invoice, expiry, and payment hash;

  • deterministic state machine:

AWAITING_PAYMENT → PAID | FAILED | EXPIRED
  • rejection of wrong amount, asset, network, payment hash, and late confirmation;

  • replay-safe terminal states;

  • Ed25519-signed receipt generation and offline verification;

  • six passing Core tests

What is not claimed yet

The current work is not presented as a finished Fiber payment product:

  • Core requests are not yet wired into the terminal flow;

  • the terminal uses an integrity hash receipt rather than the Core’s signed receipt;

  • no live FNN testnet settlement has yet been demonstrated;

  • no mainnet, production, custody, or real-money claim is made;

  • browser NFC is not native card emulation or Apple Pay-style tap-to-pay.

Funded by this grant

This grant funds the transition from a tested local state-machine prototype to a reproducible Fiber testnet reference:

  1. merchant-authenticated Payment Request v1;

  2. live FNN testnet settlement validation;

  3. Core-backed terminal integration;

  4. NFC, QR and link request delivery;

  5. failure-lab results and test vectors;

  6. public source, setup instructions, and final evidence report.

5. Solution

Payment Request v1

A TapFiber request will bind one merchant order to:

  • version;

  • merchant public-key fingerprint;

  • order ID;

  • network;

  • asset;

  • amount in shannons;

  • Fiber invoice;

  • payment hash;

  • expiry;

  • canonical Ed25519 signature.

A changed invoice, amount, asset, network, expiry, or order ID must fail verification before a payer is shown a payable request.

Settlement rule

The terminal can issue a receipt only if FNN reports a settled invoice and that settlement matches the saved payment request.

flowchart LR
    M[Merchant creates order] --> I[FNN new_invoice]
    I --> R[TapFiber signed payment request]
    R --> N[NFC / QR / link]
    N --> P[Payer pays Fiber invoice]
    P --> S[FNN get_invoice]
    S -->|Paid and matches request| O[Order: PAID]
    S -->|Wrong, late, failed or expired| X[No fulfilment]
    O --> C[Ed25519-signed receipt]
    C --> V[Offline receipt verification]

A successful button press, a copied invoice, or an HTTP response is not settlement. On RPC error, the order stays pending.

Physical reference flow

The initial reference terminal will use NFC because it provides a simple in-person handoff:

  1. Merchant creates an order.

  2. Terminal creates a Fiber invoice and a signed TapFiber request.

  3. Merchant writes an NFC tag or shows a QR code.

  4. Customer opens the request and pays from a compatible Fiber wallet or controlled test node.

  5. Terminal observes valid settlement and creates one signed receipt.

NFC is optional. QR and HTTPS links use the same request and receipt rules.

6. Pre-Registered Hypotheses

# Hypothesis Pass if If it fails, the report publishes
H1 TapFiber accepts valid Fiber settlement exactly once 100% of 10 valid controlled testnet payments create one PAID state and one signed receipt Payment hashes, timing, state transition, and failure class
H2 A wrong or stale observation cannot fulfil an order 100% rejection across 6 negative cases × 3 runs Which field or state transition failed and the resulting order state
H3 The terminal can distinguish node uncertainty from settlement FNN/RPC failure leaves every affected order AWAITING_PAYMENT, never falsely PAID Error, retry behavior, and recovered final state
H4 NFC is a viable request-delivery reference, not a settlement mechanism ≥90% successful request opens across 10 taps on two Android devices; QR/link is available when it does not open Device/browser result and exact fallback used

The negative cases are:

  1. wrong amount;

  2. wrong asset;

  3. wrong network;

  4. wrong payment hash;

  5. confirmation after expiry;

  6. replayed confirmation.

What this project does not claim: ten testnet payments do not prove consumer demand, production security, mainnet readiness, or universal wallet compatibility. They prove—or fail to prove—a narrow implementation claim about payment-intent binding and merchant fulfilment logic.

7. Technical Architecture

Merchant side

  • pinned FNN release, used unpatched;

  • a small authenticated adapter between TapFiber and FNN JSON-RPC;

  • TapFiber Core for request validation, state transitions, and receipt issuance;

  • terminal app for order creation and request delivery.

Payer side

  • second controlled FNN testnet node for reproducible settlement;

  • compatible wallet/manual invoice flow where direct controlled-node payment is unavailable.

Request delivery

  • NFC tag: HTTPS order link plus an inspectable TapFiber request where tag capacity allows;

  • QR code: same request;

  • browser link: same request.

Evidence

Each test run records:

  • order ID;

  • request digest;

  • network and FNN version;

  • invoice and payment-hash digest;

  • observed invoice status;

  • final TapFiber state;

  • receipt verification result;

  • duration and failure reason.

No private keys, private invoice preimages, or raw user identifiers will be published.

8. Weekly Execution Plan

Week Focus Concrete output
1 Payment Request v1 Signed request implementation, canonical specification, test vectors, Core adversarial tests
2 Live FNN integration Two-node testnet environment; new_invoice, send_payment, and get_invoice validation; pinned-version notes
3 Terminal integration Terminal uses Core state rules and signed receipts; NFC, QR, and browser-link delivery
4 Failure lab Six negative scenarios × three runs; NFC device/browser matrix; machine-readable evidence log
5 Release and report Public source, reproducible setup, demo recording, final report, known limitations, upstream FNN notes

If live FNN integration is blocked by an FNN incompatibility, the report will publish the exact version, reproduction steps, logs with secrets removed, and upstream issue link. The project will not silently substitute mock results for FNN evidence.

9. Funding Requirements — US$900 in CKB

Bottom-up estimate: 58 development hours at US$15/hour, plus small test equipment and deployment costs.

Item Hours Cost
Payment Request v1, signatures, vectors, Core tests 12 $180
Two-node FNN testnet setup and settlement adapter 14 $210
Terminal/Core integration; NFC, QR, and link delivery 12 $180
Failure lab, evidence logs, Android device matrix 12 $180
Documentation, reproducible environment, final report 8 $120
NFC tags and short-lived test/demo infrastructure — $30
Total 58 $900

Proposed release structure: 20% at launch and 80% after completion against the deliverables below.

10. Deliverables and Verification

None of these checks requires trusting a claim in the UI.

Deliverable How to verify
TapFiber Core Run the published test suite; inspect the canonical request and receipt vectors
Signed payment request Alter a field in a published vector and verify that validation fails
FNN testnet flow Run the documented two-node environment; create an order, settle it, and inspect the generated evidence
One-time fulfilment Replay the same confirmation and verify that the order and receipt do not change
Negative-path evidence Run the six documented mismatch/expiry/replay scenarios and inspect final states
Signed receipt Verify the published receipt with the expected merchant public key using the CLI
Physical reference Scan the NFC tag or QR code; complete the controlled testnet flow; compare the evidence record to the receipt
Final report Rebuild the reported totals from the published JSON evidence and test output

11. Risks and Mitigations

Risk Mitigation
FNN RPC differs from the expected release Pin the tested FNN version, publish the compatibility result, file deviations upstream
No routable payment path between test nodes Use a controlled funded direct channel first; document routing separately rather than conflate the two
Android browser does not support Web NFC QR and HTTPS-link delivery remain equal reference paths; the device result is recorded
FNN/RPC fails during order observation Keep the order pending; never infer PAID; record the error and retry behavior
NFC tag is altered or points to a substituted request Verify the signed payment request before showing payable fields
Scope expands into a wallet or hosted payment service Explicitly out of scope: custody, account creation, merchant onboarding, mainnet, and hosted processing

12. CKB Ecosystem Alignment

TapFiber is a Fiber application primitive, not a new payment network.

It reuses Fiber for the actual payment, creates no alternative settlement system, and returns reusable artifacts to the ecosystem:

  • a signed request format;

  • deterministic settlement semantics;

  • verifiable receipts;

  • test vectors;

  • an FNN testnet compatibility record;

  • a physical reference flow that future ticketing, access, vending, merchant, or wallet projects can adapt.

The project’s value is not that NFC is novel. Its value is that an application can make one correct, testable fulfilment decision after a Fiber payment and another developer can inspect and reproduce why

3 Likes

Hi @vida,

Thank you for taking the time to submit the TapFiber proposal. The committee has completed its review and, after careful discussion, regrets to reject the TapFiber proposal at this time.

We want to be transparent about the reasoning behind this decision:

  1. Redundant with existing ecosystem work: The core concept of binding a Fiber payment intent to a merchant order and providing a verifiable payment receipt has already been implemented multiple times within the CKB ecosystem. Notably, Fiber Checkout—a Spark-funded and completed project—already provides a page-based payment solution for Fiber. The committee does not believe that rebuilding a similar payment-intent layer brings sufficient incremental value to justify further funding.
  2. Overlapping scope with previously rejected proposals: The committee previously rejected Fiber Pay Studio (2026-07-21) for the same reason—the direction was deemed too similar to Fiber Checkout. TapFiber, while adding NFC as a physical delivery method, does not fundamentally differentiate itself from the existing payment flow infrastructure. NFC and QR are merely transport mechanisms; the underlying payment-request → settlement → receipt logic remains largely duplicative.

We appreciate the work your team has put into TapFiber — the commitment to reproducible tests and failure reporting is noted and commendable.

Keep building, and feel free to reach out anytime!

Best,
xingtian
On behalf of the Spark Program Committee

1 Like