VTA Benchmark
Deep Technical Audit

UTXO Set + Coin Selection + Transaction Construction

This audit follows the spendable-output lifecycle: UTXO lookup, input selection, transaction construction, fee calculation, change output and final script/signature validation. It distinguishes wallet-side coin selection from node-side consensus validation.

UTXO Lookup

CORE PATH

A spendable input must reference an existing unspent output and satisfy its locking conditions.

Coin Selection

WALLET PATH

Wallet logic chooses inputs to cover outputs and fees; selection policy is distinct from consensus validity.

Exact Selection Algorithm

RELEASE VERIFY

The exact VTA wallet coin-selection heuristic should be pinned to the target release before claiming a specific algorithm.

Spend Construction Flow

UTXO Setavailable outputs Coin Selectionchoose inputs Transactionvin + vout Change + Feevalue accounting Sign → Validatescripts + amounts + signatures Consensus boundary Wallet selection decides which UTXOs to spend; node validation checks whether those selected inputs are actually valid. A wallet cannot make an already-spent or nonexistent output spendable by choosing it. Previously verified VTA path HaveInputs / spent-input checks CheckInputs → scripts, signatures, amounts Wallet evidence gap Exact VTA coin-selection heuristics and change policy need release pinning.

Audit Matrix

AreaFindingStatus
UTXO existenceThe reviewed VTA validation path checks whether referenced inputs exist before accepting them.Source path verified
Already-spent inputsThe reviewed path uses input-state checks and rejects already-spent inputs.Source path verified
Coin selection boundaryInput selection is a wallet policy decision; it is not itself a consensus rule.Architecture
Value accountingReviewed validation checks input/output amounts and fee-related value constraints.Source path verified
Change outputChange creation is wallet behavior and should be distinguished from consensus validation.Wallet release-specific
Dust / standardnessPreviously reviewed VTA standardness and dust checks can affect relay acceptance without being identical to basic UTXO existence.Source path verified
Exact coin-selection heuristicNo release-pinned reconstruction of the VTA wallet's complete selection heuristic is asserted here.Needs source pin
Independent selection testsNo controlled wallet corpus was executed to measure input-count, change or fee behavior.Not measured

Release-Pinned Test Plan

1. Pin exact VTA Core release / commit.
2. Create a disposable wallet with several controlled UTXOs.
3. Create a payment smaller than one UTXO.
4. Record selected inputs, fee and change.
5. Repeat with fragmented UTXOs.
6. Repeat with exact-value and near-exact-value combinations.
7. Test insufficient funds.
8. Test dust/change thresholds.
9. Decode the resulting transaction.
10. Submit to a local VTA node and compare wallet construction with node validation.
Key distinction: “Which coins did the wallet choose?” and “Is this transaction valid?” are different questions. This audit keeps wallet policy and consensus validation separate.