Lotus V2 indexed dust and wallet sweep pricing
Status: research for the pre-genesis specification. Amounts are native atoms. The pricing model uses the resource schedule and fee rule and checks the current rules against the shared fee vectors.
Indexed dust
Set the ordinary native-output minimum to the quiet-chain fee quote for a transaction spending one standard keyhash coin and creating one standard keyhash output. Calculate the quote at the same maturity-lagged subsidy-per-work index used for the byte floor. Keep the fee quote's fixed minimum EMA, empty block base, zero token burn and existing integer rounding. This makes the floor respond to long-run price changes without imposing a higher minimum output amount on every payment when the chain is temporarily busy.
In the reference schedule, the transaction is 242 bytes, with linear cost 1,279 cu and effective cost 1,285 cu. Let a be the index-source block chosen by the byte-fee rule, with block 1 as the initial anchor. In pseudocode using the existing exact fee quote:
D_ordinary(h) = wallet_fee(
size = 242,
effective_cost = 1,285,
ema = E_min, base = 0, token_burn = 0,
byte_index = I_a, cu_index = I_a
)
Equivalently, the current values give max(IndexedByteFee_a(242), 2 × round_up_indexed_linear(5140, I_a) + 2), where the indexed-linear round-up is the integer version in the existing wallet fee formula. Derive the standard cost from the finalized schedule before freezing the rule. The state-key charge in the current schedule is a placeholder awaiting node measurements. The quote uses the existing wallet framing convention. If that convention changes, recompute the standard cost and the vectors.
| Price snapshot | Ordinary dust | Standard spend fee at that snapshot |
|---|---|---|
| Quiet calibration, subsidy index 1 | 10,282 | 10,282 |
| Block 1 at the planned genesis work | 205,044 | 205,044 |
| Quiet post-bootstrap, 16× genesis work and index 1/4 | 5,142 | 5,142 |
| High-load example, calibration index, EMA four times its minimum, selected block work at the minimum EMA | 10,282 | 61,682 |
Keep the fixed coinbase minimum so a price spike does not affect mining liveness. Keep the token-output burn on its current separate scale until there is a token-pricing decision. The native minimum applies when a new ordinary output is created. Wallets continue to resolve and spend older, smaller coins under their original amount and expiry rules. The minimum adds no separate balance or refund to the coin record.
A minimum-value coin covers the reference fee at a steady, quiet index. Creating another minimum-value output requires a second amount on top of that fee. More generally, a sweep of n coins all worth exactly D can create a spendable output only if n × D - actual_fee >= current_output_minimum. At the three quiet price snapshots above, the smallest successful current-rule chunk in the model is six coins. With shared authorization it is four. Ten coins at the calibration minimum leave 18,066 atoms under current fees or 41,354 atoms with the shared authorization estimate. The high-load example leaves too little for a spendable output at every legal chunk size, even with sharing. Wallets should quote at the current price, consolidate ahead of expiry, and show when a sweep needs more value or a quieter block. A price move between creation and spend, a more expensive covenant, or a fee spike can still make a minimum-value output uneconomic.
Sweep quotes
Each first-stage transaction has standard native keyhash inputs and one standard output. The model uses an empty block base for each independent quote in the quiet scenarios, keeps the current framing convention, and excludes future spends of the resulting outputs. The shared estimate assumes all inputs in a transaction can be authorized by one key, see below. It does not reflect the fee of an existing shared signature transaction.
| Coins swept | Current, one transaction | Current, cheapest chunks | Shared, one transaction | Shared, cheapest chunks |
|---|---|---|---|---|
| 10 | 8,475.40 | 8,475.40 | 6,146.60 | 6,146.60 |
| 100 | 10,965.62 | 8,471.74 | 7,020.76 | 6,053.88 |
| 1,000 | Over input limit | 8,471.37 | Over input limit | 6,052.21 |
All table entries are atoms per original coin, at the quiet calibration price. For 100 inputs the current chunks are ten of nine and one of ten. Shared authorization uses two of sixteen and four of seventeen. For 1,000 inputs the current chunks are 110 of nine and one of ten. Shared authorization uses eight of seventeen and 48 of eighteen. The wire format allows at most 256 inputs per transaction. The fee optimum is smaller because output creation and transaction overhead are spread across inputs while the knee increases the cost as each transaction grows.
| Price snapshot | Current chunks, 10 / 100 / 1,000 | Shared chunks, 10 / 100 / 1,000 |
|---|---|---|
| Block 1 | 169,043 / 168,970 / 168,962 | 122,594 / 120,746 / 120,713 |
| Quiet, index 1/4 | 4,238 / 4,236 / 4,236 | 3,073 / 3,027 / 3,026 |
| High load, index 1 | 50,851 / 50,829 / 50,827 | 36,879 / 36,323 / 36,313 |
These figures leave one output per chunk. A second-stage ordinary merge of the displayed calibration layouts raises the costs for 100 and 1,000 inputs to 9,405 and 9,725 atoms per coin under current rules, or 6,564 and 6,593 atoms with shared authorization in the first stage. A wallet that needs exactly one output can optimize for that whole outcome. At 100 inputs, the quoted ordinary merge of chunks already costs less than one 100-input transaction.
How to earn the discount
Start with wallet consolidation. A wallet can use the present format to spread fixed costs across inputs and combine coins before expiry. It can choose the batch size using actual transaction quotes and split on input age, key, or policy where appropriate. State-tree reads and erasures are still paid for.
Prototype one explicit whole-transaction signature for same-key inputs. Restrict the first design to the standard native keyhash branch. The existing full signature commits to the input and branch indices, so it must retain its current meaning. A separate signing domain should commit the chain, transaction, resolved coins, key and canonical group membership with the selected paths and branches. Every member must resolve to the same signing key through its own committed policy. The validator must still resolve and erase every coin individually, check maturity, locks, expiry and path membership, and validate every output. Require one unambiguous leader and direct references, and charge every reference lookup. The first design can exclude mint, token, legacy, stateful and multi-branch spends. Wallets with an independent key per input can continue to use ordinary consolidation.
The estimate reserves the existing signature charge for the leader. For each later input, it retains the revealed key, script check and coin work, replaces the 64-byte repeated signature with a two-byte reference, and allows 32 cu for reference and key binding in place of a 210 cu signature charge. The allowance is a model input awaiting calibration. For the modeled shape, each later input saves 124 wire cu, one hashing cu and 178 signature-related cu, while retaining 331 cu just for resolving, reading and deleting its coin. The unchanged knee and block pricing then apply to the lower measured work. For example, a 100-input transaction falls from 18,161 to 12,023 bytes and from 99,388 to 69,391 linear cu. The small-group estimates still require a consensus format and pricing review before adoption.
Keep the existing batch verifier as capacity headroom. The resource calibration measured about 6.7 microseconds per signature in an 8,192-signature batch. Charging that optimistic full-batch rate throughout the model would give 7,531 atoms per input in minimum-fee chunks at calibration. Real admission may see a small or invalid batch and need scalar checks. A fee discount based on measured batch performance would need an independently enforceable work bound for every validation path. The existing measurements do not supply that bound.
Keep inputs in the knee. Excluding every input after the first from the current knee gives a hypothetical 7,952 atoms per input for 100 coins at calibration, or 7,938 for fee-minimizing chunks of 1,000. All the work is still present. The reduction comes from excluding that work from the sizing and burn rule and pushes the preferred chunk size toward the structural cap. Shared authorization naturally lowers the knee as work disappears and keeps the sizing rule uniform.
Before changing consensus
- Test index boundaries using the same maturity-lagged anchor as the byte fee. Cover block 1, the first block whose lagged ancestor advances, reorgs across the anchor, different current and lagged indexes, exact square-root rounding, and the maximum representable amounts.
- Test an ordinary output at the new minimum and one atom below, spending a previously valid lower-value coin, output and expiry rules through reorgs, and unchanged coinbase, token and burn behavior.
- For shared authorization, start with a single scalar prototype and differential vectors. Check reordered, removed and added members, unrelated keys, wrong branches or domains, signatures copied between modes, malformed references, duplicate inputs, and invalid and interrupted signatures. Confirm that all validation paths agree on the result and cost independently of cache warmth and batching.
- Benchmark the full admission and block paths, including worst-case checks and reference parsing, before replacing the provisional allowance. Compare measured wire, CPU and state operations to the quoted charge. Keep scalar, current-batch and shared authorization workloads distinct.
- Automatic removal of expired coins is a separate block operation. These wallet figures count only signed spends before expiry. The expiry sweep's ordering, cap, bounty and work accounting need to be specified separately.
Reproduce
From the repository root, using the reference virtual environment:
ref=tools/lotus-v2-reference
PYTHONPATH="$ref:$ref/vectors" "$ref/.venv/bin/python" "$ref/research/sweep/sweep_pricing.py"
PYTHONPATH="$ref:$ref/vectors" "$ref/.venv/bin/python" -m unittest discover -s "$ref/research/sweep"
The tests check existing keyhash fee vectors, indexed dust and pooling at steady prices, a load increase, one-signature accounting, and legal fee-minimizing chunks. The model quotes against declared index and load snapshots and assumes the calibration profile's approved resource formula. It does not measure node performance or define a serialization.