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

subsidy: implementation for claimpegin, createrawpegin, and RPCs

Public commit record

What the developer wrote

Authored by Byron Hambly

50/100 · Thin
subsidy: implementation for claimpegin, createrawpegin, and RPCs
✓ Specific, descriptive subject✓ Names a concrete action or component! No meaningful explanatory body
The short version

What changed, and why it matters

This commit adds a new 'pegin subsidy' feature to the Elements sidechain. When users move small amounts of Bitcoin into the sidechain (a 'pegin'), the sidechain now sometimes adds an extra output that pays the network operators (the functionaries) a fee to cover the cost of later moving those coins back to Bitcoin. The change also adds a helper that reads how many signatures a federation script requires, and exposes new information in several RPC commands. There is no explicit security bug in the diff, but the new subsidy logic touches consensus-relevant money flows and relies on external fee data, so it deserves careful review.

Recommended action

Treat this as a high-risk feature change rather than a simple bugfix. Review the subsidy formula, edge cases around dust outputs, the trust model when validatepegin=0, and whether ParseFedPegQuorum correctly handles all valid fedpegscript forms (including non-standard and future dynamic federation scripts). Run targeted tests for small-value pegins, high fee-rate inputs, and federation script variations. Consider requesting a security write-up or audit from the maintainers before deployment.

Security signals we found

01

New money-flow logic that creates an additional transaction output paying a subsidy

02

Subsidy calculation depends on externally supplied or mainchain-RPC-derived fee rate

03

ParseFedPegQuorum assumes fedpegscript starts with threshold and only supports OP_N thresholds up to 16; malformed scripts return false but callers use CHECK_NONFATAL

04

Manual fee_rate parameter added to claimpegin/createrawpegin when validatepegin=0

05

RPC output now includes active/inactive flags for pegin minimum and subsidy based on current tip height

Risk score

Why this scored 34/100

Our methodology →
Potential impact 8/30
Exploitability 7/25
Stealth signal 5/15
Affected reach 6/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.