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

bkpr: add `bkpr-currency` option to record currency rates on each event.

Public commit record

What the developer wrote

Authored by Rusty Russell

73/100 · Adequate
bkpr: add `bkpr-currency` option to record currency rates on each event.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-Added: Config: `bkpr-currency` option to record conversion rate at each event.
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
The short version

What changed, and why it matters

This commit adds an optional bookkeeping feature to Core Lightning that lets users specify a currency (like USD). The bookkeeper plugin then asks another plugin for the exchange rate at the time of each financial event and records it. It is a feature addition, not a fix for a known security bug. The main security-relevant observation is that the new code makes JSON-RPC calls to a 'currencyrate' plugin and stores the returned rate, but it does not validate the currency name or the returned rate beyond checking that the rate is a valid JSON double. A malicious or compromised 'currencyrate' plugin could return extreme or malformed values, but this only affects optional accounting records, not funds or consensus.

Recommended action

Treat as a routine feature commit. If reviewing for hardening, consider adding validation of the currency option (e.g., ISO-4217 code format) and sanity bounds on the returned rate before storing it. Users relying on this feature should ensure the currencyrate plugin is trustworthy, since its output is recorded as accounting data.

Security signals we found

01

New optional plugin option added: bkpr-currency

02

Plugin makes outbound JSON-RPC call to currencyrate with user-controlled currency string

03

Returned rate parsed as double via json_to_double without range validation

04

Rate stored in uintmap keyed by timestamp; duplicate timestamps ignored

05

Error handling logs once and continues; no abort or fallback rate

06

No input sanitization visible for ISO-4217 name beyond documentation note

Risk score

Why this scored 18/100

Our methodology →
Potential impact 2/30
Exploitability 1/25
Stealth signal 1/15
Affected reach 2/15
Confidence 8/10
Evidence quality 4/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.