|
| 1 | +# BTC Risk Lab Policy Pack |
| 2 | + |
| 3 | +- Schema: `0.5` |
| 4 | +- Pack type: `policy_pack` |
| 5 | +- Consolidated risk: `medium` |
| 6 | + |
| 7 | +## Artifacts Detected |
| 8 | + |
| 9 | +| Artifact | File | |
| 10 | +|---|---| |
| 11 | +| `descriptor` | `descriptor.txt` | |
| 12 | +| `psbt` | `psbt.base64` | |
| 13 | +| `transaction` | `tx.json` | |
| 14 | +| `script` | `script.txt` | |
| 15 | +| `policy_notes` | `policy.md` | |
| 16 | +| `policy_notes` | `policy.yaml` | |
| 17 | +| `metadata` | `metadata.json` | |
| 18 | + |
| 19 | +## Evidence Documents |
| 20 | + |
| 21 | +| Artifact | File | Format | Summary | |
| 22 | +|---|---|---|---| |
| 23 | +| `policy_notes` | `policy.md` | `markdown` | bytes: 264; lines: 6; headings: 1 | |
| 24 | +| `policy_notes` | `policy.yaml` | `yaml` | bytes: 118; lines: 5; key_like_lines: 5 | |
| 25 | +| `metadata` | `metadata.json` | `json` | bytes: 166; lines: 7; json_type: object; top_level_keys: 5; keys: environment, owner, prepared_by, purpose, review_date | |
| 26 | + |
| 27 | +## Findings |
| 28 | + |
| 29 | +- **Descriptor and PSBT multisig signals differ** (`medium`, `descriptor-psbt-multisig-mismatch`): Descriptor signal is `true`, while PSBT signal is `false`. This may be valid for incomplete PSBT data, but it requires manual review. |
| 30 | +- **Descriptor and PSBT timelock signals match** (`low`, `descriptor-psbt-timelock-match`): Both descriptor and PSBT expose `false` for this signal. |
| 31 | +- **Descriptor threshold cannot be fully checked against PSBT** (`unknown`, `descriptor-psbt-threshold-unavailable`): The descriptor exposes threshold policy, but the current PSBT analyzer only exposes heuristic multisig/script signals, not an exact quorum or signer set. Real descriptor-to-PSBT equivalence is not verified. |
| 32 | +- **Descriptor-to-PSBT equivalence is not proven** (`unknown`, `descriptor-psbt-equivalence-not-verified`): The review pack compares available policy signals only. It does not derive addresses, reconstruct wallet origin data, or prove that the PSBT spends from the provided descriptor. |
| 33 | +- **Transaction and PSBT counts match** (`low`, `tx-psbt-counts-match`): Both artifacts report 1 input(s) and 2 output(s). This is a count-level check only, not transaction equivalence. |
| 34 | +- **Transaction-to-PSBT equivalence is not proven** (`unknown`, `tx-psbt-equivalence-not-verified`): The review pack compares input/output counts only. It does not prove that tx.json is the finalized or extracted transaction for psbt.base64. |
| 35 | +- **Threshold policy signal detected** (`low`, `threshold-policy-signal`): At least one artifact exposes threshold or multisig policy. Review signer count, quorum, key custody, backup paths, and emergency access. |
| 36 | +- **Fee evidence is incomplete** (`medium`, `fee-evidence-missing`): Fee review depends on UTXO or prevout evidence. Without it, economic review remains partial. |
| 37 | +- **Timelock signal detected** (`medium`, `timelock-signal`): At least one artifact exposes absolute or relative timelock policy. Confirm block height, median-time, sequence, and recovery semantics in policy notes. |
| 38 | +- **Descriptor satisfaction weight is available** (`low`, `descriptor-weight-available`): The descriptor analyzer reports a max satisfaction weight of 253 WU. This is useful review evidence, not a transaction-level fee-rate proof. |
| 39 | +- **Transaction fee estimate available** (`low`, `transaction-fee-estimated`): Transaction includes an estimated fee of 900 sats from available analyzer evidence. |
| 40 | + |
| 41 | +## Warnings |
| 42 | + |
| 43 | +- **Descriptor: Threshold or multisig policy detected** (`low`, `descriptor:threshold-policy`): The descriptor includes threshold-like signing policy. Review signer count, quorum, backup paths, and key origin documentation. |
| 44 | +- **PSBT: Cannot estimate fee** (`medium`, `psbt:missing-utxo-data`): The PSBT does not include enough UTXO data for every input. Fee and economic risk analysis remain partial. |
| 45 | +- **PSBT: Dust-like output detected** (`medium`, `psbt:dust-output`): At least one non-zero output is below the heuristic dust threshold for its script type. |
| 46 | +- **Transaction: Dust-like output detected** (`medium`, `transaction:dust-output`): At least one non-zero output is below the heuristic dust threshold for its script type. This can indicate uneconomic outputs, spam-like construction, or operational mistakes. |
| 47 | +- **Script: Timelock signal detected** (`medium`, `script:timelock-signal`): The script includes absolute or relative timelock opcodes. Confirm block height, median time, and sequence semantics before operational use. |
| 48 | +- **Descriptor and PSBT multisig signals differ** (`medium`, `descriptor-psbt-multisig-mismatch`): Descriptor signal is `true`, while PSBT signal is `false`. This may be valid for incomplete PSBT data, but it requires manual review. |
| 49 | +- **Descriptor threshold cannot be fully checked against PSBT** (`unknown`, `descriptor-psbt-threshold-unavailable`): The descriptor exposes threshold policy, but the current PSBT analyzer only exposes heuristic multisig/script signals, not an exact quorum or signer set. Real descriptor-to-PSBT equivalence is not verified. |
| 50 | +- **Descriptor-to-PSBT equivalence is not proven** (`unknown`, `descriptor-psbt-equivalence-not-verified`): The review pack compares available policy signals only. It does not derive addresses, reconstruct wallet origin data, or prove that the PSBT spends from the provided descriptor. |
| 51 | +- **Transaction-to-PSBT equivalence is not proven** (`unknown`, `tx-psbt-equivalence-not-verified`): The review pack compares input/output counts only. It does not prove that tx.json is the finalized or extracted transaction for psbt.base64. |
| 52 | + |
| 53 | +## Missing Evidence |
| 54 | + |
| 55 | +- psbt: witness_utxo or non_witness_utxo for every PSBT input |
| 56 | +- The descriptor exposes threshold policy, but the current PSBT analyzer only exposes heuristic multisig/script signals, not an exact quorum or signer set. Real descriptor-to-PSBT equivalence is not verified. |
| 57 | + |
| 58 | +## Per-Artifact Summary |
| 59 | + |
| 60 | +### `descriptor` (Analyzed) |
| 61 | + |
| 62 | +- Risk: `low` |
| 63 | +- descriptor_type: `wsh_sortedmulti` |
| 64 | +- script_type: `p2wsh` |
| 65 | +- sanity_check: `true` |
| 66 | +- max_satisfaction_weight_wu: `253` |
| 67 | + |
| 68 | +### `psbt` (Analyzed) |
| 69 | + |
| 70 | +- Risk: `medium` |
| 71 | +- inputs: `1` |
| 72 | +- outputs: `2` |
| 73 | +- inputs_with_witness_utxo: `0` |
| 74 | +- inputs_with_non_witness_utxo: `0` |
| 75 | +- Missing data: |
| 76 | + - witness_utxo or non_witness_utxo for every PSBT input |
| 77 | + |
| 78 | +### `transaction` (Analyzed) |
| 79 | + |
| 80 | +- Risk: `medium` |
| 81 | +- inputs: `1` |
| 82 | +- outputs: `2` |
| 83 | +- output_value_sats: `1100` |
| 84 | +- estimated_fee_sats: `900` |
| 85 | + |
| 86 | +### `script` (Analyzed) |
| 87 | + |
| 88 | +- Risk: `medium` |
| 89 | +- script_type: `unknown` |
| 90 | +- byte_len: `1` |
| 91 | +- opcode_count: `1` |
| 92 | +- complexity: `low` |
| 93 | + |
| 94 | +## Review Questions |
| 95 | + |
| 96 | +- Have reviewers independently confirmed that input/output counts, destinations, amounts, and fees match the intended transaction? |
| 97 | +- Which missing data must be collected before treating this review pack as complete? |
| 98 | +- Do descriptor.txt, PSBT data, transaction data, and policy notes describe the same intended signing and spending policy? |
| 99 | +- Does the written policy identify each signer role, quorum, custody model, recovery path, and approval authority? |
| 100 | +- Do descriptor, PSBT, and transaction artifacts match the documented policy intent without relying on this tool to prove formal equivalence? |
| 101 | +- Have custodians or auditors independently confirmed destinations, amounts, fee assumptions, and change handling? |
| 102 | +- Are absolute or relative timelocks documented with operational consequences and emergency procedures? |
| 103 | +- Does metadata identify owner, prepared_by, review_date, environment, and whether this pack is public-demo or production evidence? |
| 104 | +- Which missing evidence must be collected before approving, signing, or relying on this policy pack? |
| 105 | + |
| 106 | +## Limitations |
| 107 | + |
| 108 | +- This is an explainability and reporting tool, not a consensus-level Bitcoin validator. |
| 109 | +- The policy-pack command performs local file analysis only and does not make network calls. |
| 110 | +- The tool does not create wallets, sign transactions, custody funds, request seed phrases, handle private keys, or broadcast transactions. |
| 111 | +- Cross-artifact findings compare available signals and counts only; formal descriptor, PSBT, transaction, or wallet equivalence is not proven. |
| 112 | +- Fee and weight findings are analyzer evidence, not Bitcoin Core mempool acceptance or fee-rate validation. |
| 113 | +- Markdown and YAML policy evidence is summarized structurally; the tool does not semantically validate natural-language policy commitments. |
0 commit comments