OpenChainGraph · Explainer

ZIP-317 Transfer Fee

Recomputing the conventional Zcash transfer fee from a transaction shape you declare: counts and byte sizes go in, one integer fee in zatoshi comes out, and every step is arithmetic you can redo by hand from the published rule.

Presenter mode shows one step per screen. Arrow keys move, A toggles autoplay, Esc exits.
1
Step 1

The fee formula and its grace floor

The conventional fee is one number times one count: 5000 zatoshi per logical action, never less than two actions' worth.

declared shapelogical_actions = 5 5000 zat x max(2, 5)= 25000 zatoshi floor bindsbelow 2 only

The floor is the grace window. It exists so that adding a second input or output for privacy padding never raises the fee: a one-action shape and a two-action shape pay the same. The recompute applies exactly this formula to the shape you declare; it says nothing about what any wallet or miner will accept.

Who asks at this stepno agent yet
If a transaction declares 4 Orchard actions and nothing else, what conventional fee does the published rule yield?
2
Step 2

Four pools feed the action count

The logical action count is a sum of four contributions, one per pool, each derived from the shape you declare.

PoolContribution to logical_actionsDeclared input
Transparentmax(ceil(tx_in_total_size / 150), ceil(tx_out_total_size / 34))byte totals of the transparent inputs and outputs
Sprout2 x n_joinsplitnumber of JoinSplits
Saplingmax(n_spends_sapling, n_outputs_sapling)numbers of spends and outputs
Orchardn_actions_orchardnumber of actions
transparent: 2 sprout: 2 sapling: 2 orchard: 1 logical_actions2 + 2 + 2 + 1 = 7

The transparent pool is counted in whole standard-sized units, so byte totals round up: a 151-byte input total spans two units. Sapling takes the greater of its two sides, not the sum, because a payment spends one note and creates another. Absent pools contribute zero.

Who asks at this stepno agent yet
A transaction declares 150 bytes of transparent inputs, 68 bytes of transparent outputs, and nothing else. How many logical actions is that?
3
Step 3

Recomputing one declared shape end to end

One declared shape touching all four pools, recomputed line by line; the node emits exactly the last row.

Declared inputValueContribution
tx_in_total_size300 bytesceil(300/150) = 2
tx_out_total_size34 bytesceil(34/34) = 1, so transparent = max(2, 1) = 2
n_joinsplit12 x 1 = 2
n_spends_sapling / n_outputs_sapling1 / 2max(1, 2) = 2
n_actions_orchard11
logical_actions2 + 2 + 2 + 17
conventional_fee_zatoshi5000 x max(2, 7)35000

Change any declared value and the arithmetic moves with it: this is a recompute of a published formula, not a lookup table. The node's own output payload carries the four contributions, the action count, whether the grace floor bound, and the fee, so each intermediate is checkable against this table.

Who asks at this stepno agent yet
Recompute the conventional fee for: tx_in_total_size 300, tx_out_total_size 34, n_joinsplit 1, n_spends_sapling 1, n_outputs_sapling 2, n_actions_orchard 1.
4
Step 4

What the recompute does not tell you

The fee the rule yields for a declared shape is one thing; whether any wallet, miner, or node accepts that fee is a different thing, and this node claims only the first.

Honest label

The output is the fee the published conventional formula yields for the declared shape. It is not a prediction of acceptance, not a recommendation to transact, and not coin marketing.

No key material

The input is counts and byte totals only. No viewing key, no spending key, no address, no raw transaction: a string in a declared numeric field is refused and never echoed.

Draft revisions refused

The recompute implements the fee rule revision in effect today. Contributions defined only by later drafts, such as extra action pools or memo bundles, are refused rather than guessed at.

Domain refusals

Negative, fractional, or beyond-exact-integer counts and sizes are refused: they are not declared transaction shapes. Absent pools contribute zero.

Every refusal is a structured non-verdict naming the branch, each with its own reachable input and fixture; nothing refuses silently. The formula text itself states that following it is not a consensus requirement: wallets should create transactions that pay this fee to reduce information leakage, unless the user overrides.

Who asks at this stepno agent yet
What does this node refuse, and why does it refuse rather than estimate when a shape declares a draft-revision pool?
🔒 All inputs are processed locally in your browser. No data is transmitted. Do not enter real personal data — use synthetic or anonymised inputs only.