AI-generated analysisPublished automatically and not human-verified. Validated context appears in community notes below.
← Watch feed
Low 28 Bitcoin

Allow BTCPay Server to start without any on-chain payment method

Public commit record

What the developer wrote

Authored by Nicolas Dorier

81/100 · Strong
Allow BTCPay Server to start without any on-chain payment method

The default value of `--chains` (or `BTC_CHAINS`) is `BTC`, so it wasn't possible
to start BTCPay Server without at least BTC (or other Bitcoin fork) support.

This PR add a new configuration `--nodefaultchain` (or `BTCPAY_NODEFAULTCHAIN`).
When specified, an empty `--chains` will start BTCPay Server without any Bitcoin like chain support.

Partially fix #7175.
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Links an issue, advisory, or supporting reference
The short version

What changed, and why it matters

This commit lets BTCPay Server start without any Bitcoin-like blockchain payment method enabled. It adds a new --nodefaultchain option and updates many parts of the code so the app no longer assumes Bitcoin is always available. Most changes are defensive null checks and UI message adjustments, but the broad scope means there is a risk of missed edge cases where the code still expects a default network and could crash or behave unexpectedly.

Recommended action

Treat this as a feature change with hardening. Review that all code paths consuming DefaultNetwork or GetNetwork<T> handle the null case, especially in background services, API controllers, and third-party plugins. Run integration tests with --nodefaultchain enabled and verify no unhandled InvalidOperationException or NullReferenceException occurs.

Security signals we found

01

Broad nullability propagation after making a core dependency optional

02

Defensive checks added in wallet/PSBT controllers to return NotFound when network is missing

03

StatusMessageModel null-reference guard added

04

New configuration option changes runtime availability of a core payment method

Risk score

Why this scored 28/100

Our methodology →
Potential impact 5/30
Exploitability 5/25
Stealth signal 5/15
Affected reach 5/15
Confidence 5/10
Evidence quality 3/5
Human-validated context

Community notes

Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.

No validated notes yet.

The AI analysis stands alone for now. Submit a note if you can add evidence or important context.