Skip to main content

Module pricing

Module pricing 

Source
Expand description

Quadratic storage-pricing formula shared by node and client (ADR-0004). Quadratic pricing with a baseline floor.

Formula: price_per_chunk_ANT(n) = BASELINE + K × (n / D)²

The non-zero BASELINE makes empty nodes charge a meaningful spam-barrier price, and K is anchored so per-GB USD pricing matches real-world targets at the current ~$0.10/ANT token price. An earlier formula produced ~$25/GB at the lower stable boundary and ~$0/GB when nodes were empty — both unreasonable.

This is the single source of truth both the node (when pricing a quote) and the client (when verifying ADR-0004’s forced price before paying) must agree on. It lives here, in the shared wire/contract crate, so the two sides can never drift: ant-node re-exports calculate_price from this module rather than defining its own.

§Parameters

ConstantValueRole
BASELINE0.00390625 ANTPrice at empty (bootstrap-phase spam barrier)
K0.03515625 ANTQuadratic coefficient
D6000Lower stable boundary (records stored)

Functions§

calculate_price
Calculate storage price in wei from the number of close records stored.
derive_records_stored_from_price
Derive the quoted record count from a quote price.