Architectural recommended for a payment flow on Nervos

Hey everyone,

We’re finalizing the architecture for a self-custodial Visa payment platform on Nervos and would appreciate some architectural clarity.

The intended payment flow is:

  1. User taps their Visa card.

  2. Their Nervos wallet prompts them to approve the payment.

  3. Once they approve, we need to settle the corresponding CKB immediately so the Visa authorization can complete with minimal delay.

Our goal is to keep users in full control of their CKB until the moment they approve the payment, without requiring a pre-funded custodial balance.

I’m trying to determine the recommended CKB implementation pattern for this.

Specifically:

  1. What is the recommended way to achieve strong settlement assurance for this type of payment flow?

  2. Is broadcasting a signed transaction and acting once it has been accepted by the network considered a reasonable approach, or is waiting for block confirmation the only safe option?

  3. Given CKB’s transaction replacement (RBF) behavior, is there a recommended pattern that avoids settlement risk without requiring users to keep funds permanently locked in a separate payment pool?

  4. Would you recommend using Omnilock 2-of-2 cells, CoBuild, another lock-script pattern, or something else entirely for this use case?

I’d appreciate any guidance or examples of existing patterns that would fit this type of real-time payment application.

tagging @matt_ckb @phroi @CKBdev for visibility

2 Likes

I suggest looking into Fiber, channels can offer this immediacy and atomicity, but on-chain settlement will not

2 Likes

Roger that, thanks.

1 Like