VTA Benchmark
Deep Technical Audit

Fee + Mempool + Transaction Relay

This audit follows VirtaCoin's public source from fee calculation through mempool policy, conflict checks, free-relay throttling, standardness checks, script/input validation, and final mempool insertion. Policy behavior is kept separate from consensus validity.

Fee Calculation

VERIFIED IN SOURCE

GetMinFee() derives a base fee from nMinTxFee or nMinRelayTxFee and scales it with serialized transaction size.

Mempool Conflict Gate

VERIFIED IN SOURCE

mapNextTx is checked for an existing transaction spending the same outpoint; replacement is explicitly disabled in this path.

Free Relay Protection

VERIFIED IN SOURCE

Low-fee transactions are rate-limited using an exponentially decaying counter and -limitfreerelay.

Relay / Mempool Flow

Transactionincoming candidate CheckTransactionbasic validity Standardnessmainnet policy Conflict / UTXOmapNextTx + inputs Fee Policyminimum + free relay Poolstored Fee policy nMinFee = (1 + nBytes / 1000) × base fee relay mode uses nMinRelayTxFee; free area may reduce minimum under policy conditions Anti-spam / CPU controls free-relay counter decays over ~10 minutes • default -limitfreerelay argument is 15 CheckInputs() is intentionally performed late to reduce CPU-exhaustion DoS exposure

Source Audit Matrix

AreaSource findingStatus
Minimum fee formulaGetMinFee() chooses nMinTxFee or nMinRelayTxFee, then computes (1 + nBytes/1000) × base fee.Verified
Free transaction policyWith fAllowFree, transactions below the applicable size threshold can receive a zero minimum fee; relay mode uses DEFAULT_BLOCK_PRIORITY_SIZE - 1000 as the threshold.Verified
Dust-related fee floorWhen sending, if the calculated minimum is below base fee and an output is below CENT, the base fee is restored as the minimum.Verified
Non-standard relayOn mainnet, AcceptToMemoryPool() rejects transactions failing IsStandardTx().Verified
Duplicate mempool transactionExisting transaction hash is checked before continuing.Verified
Same-input conflictpool.mapNextTx is checked for each input; the inspected path explicitly says replacement is disabled and rejects the conflict.Verified
Missing inputsCCoinsViewMemPool is used; missing previous transaction hashes are detected and can set pfMissingInputs.Verified
Already-spent inputsview.HaveInputs(tx) rejects unavailable/spent inputs with bad-txns-inputs-spent.Verified
Free-relay throttlingAn exponentially decaying counter is used over an approximately 10-minute window; the default -limitfreerelay argument is 15 thousand-bytes-per-minute units.Verified
Insane-fee guardWhen enabled, fees above nMinRelayTxFee × 10000 are rejected.Verified
Late script/input checksCheckInputs() runs after earlier policy checks, explicitly to help prevent CPU-exhaustion DoS.Verified
RBF replacement policyExplicit replacement of a mempool conflict is disabled in this code path.Verified
Current network relay behaviorNo network-wide measurement of what independent VTA nodes currently relay was performed.Not measured
Current effective fee floorThe exact runtime value of nMinRelayTxFee was not inferred from source alone; this requires a specific binary/runtime configuration measurement.Not measured

Why This Matters for Payments

Fee predictability

The source contains a deterministic minimum-fee policy, but a real payment benchmark still needs the runtime fee setting and observed transaction samples.

Relay vs consensus

A transaction can be valid at the consensus layer while being rejected by a node's relay policy. This audit keeps those two concepts separate.

Replacement behavior

The inspected mempool path explicitly disables replacement for an existing same-input transaction. This is a policy observation, not a claim about all historical/future versions.

Interpretation rule: This page documents source behavior. It does not claim a current network-wide fee market, mempool size, propagation percentage, or average relay time. Those require live multi-node measurements.