Moony Protocol
Pricing Curve
The deterministic pricing curve that governs MNY.
Moony's primary price discovery mechanism is an onchain pricing curve, a deterministic exponential function encoded within the Reserve program. Unlike traditional market-based price discovery that relies on order books or liquidity pools, the pricing curve calculates the price of MNY based solely on the current circulating supply. As tokens enter circulation through acquisition from the Reserve, the price rises along a mathematically defined trajectory. As tokens are redeemed and removed from circulation, the price falls along the same curve in reverse.
#Explore the curve
Drag to set circulating supply and watch the spot price move along the curve. These are the live onchain constants, computed in real time.
No presale, no insider allocation. All 21M MNY begin in the Reserve and enter circulation only as capital flows in. The first coin sold for $0.01; the price rises about $0.01 for roughly every $11,400 added, up to $1,000,000 for the final coin. The same curve, for everyone.
That $1.14 trillion total is the definite integral of the pricing curve across the entire 0–21M range, encoded onchain as a protocol constant.
#Spot Price
The spot price represents the instantaneous price per MNY token at any given circulating supply level. It is a continuous mathematical function with no bid-ask spread and no dependence on external liquidity. It is defined by an exponential equation with three immutable constants:
P(S), spot price in USDF at supply level SS, current circulating supply of MNY tokense, Euler's number (~2.71828), the base of the natural exponential function
The exponential form ensures that the rate of price change is proportional to the current price itself, creating smooth, continuous price adjustment without discontinuities at any supply level.
// consts.rs - curve constants, scaled u128 (18-dp fixed point)pub const CURVE_A: u128 = 11400_230149967394933471; // a ≈ 11400.2301pub const CURVE_B: u128 = 0_000000877175273521; // b ≈ 8.7718e-7pub const CURVE_C: u128 = CURVE_B; // c == b // curve.rs - R'(S) = a * b * e^(c * s)pub fn spot_price_at_supply(&self, current_supply: &UnsignedNumeric) -> Option<UnsignedNumeric> { let c_times_s = self.c.checked_mul(current_supply)?; let exp = c_times_s.signed().exp()?; self.a.checked_mul(&self.b)?.checked_mul(&exp)}
Constants
Three immutable constants parameterize the curve to produce an initial price of ~0.01 USDF and a terminal price of 1,000,000 USDF at maximum supply (21M MNY):
a = 11400.230149967394933471
Amplitude constant. Scales the curve to reach $1,000,000 USDF at maximum supply.
b = 0.000000877175273521
Initial price coefficient. Sets the starting price at a × b ≈ $0.01 USDF when supply is near zero.
c = 0.000000877175273521
Growth rate. Controls how rapidly price increases with supply. Note: c = b by design, which simplifies integral calculations.
#Transaction Formulas
The spot price tells you the current price per token, but you cannot simply multiply it by the quantity you want, because each token you buy slightly increases the price of the next one. Instead, the total cost is computed by integrating the spot price function across the full range of the transaction. The formulas below handle this automatically: two for buying (cost and tokens received) and one for selling (value received).
Cost to Buy Tokens
Given a token quantity to acquire, this formula computes the total USDF cost by evaluating the definite integral from current supply to new supply:
S₀, circulating supply before the purchase (currentSupply)S₁, circulating supply after the purchase (S₀ + tokensToBuy)- Since b = c by design, the coefficient (a · b / c) simplifies to
a
// USDF cost to mint `tokens` starting at `current_supply`pub fn tokens_to_value( &self, current_supply: &UnsignedNumeric, tokens: &UnsignedNumeric,) -> Option<UnsignedNumeric> { // Integral of price function: // R(S) = ∫(a * b * e^(c * s)) ds = (a * b / c) * e^(c * s) // R(S) = (a * b / c) * (e^(c * S) - e^(c * S0)) let new_supply = current_supply.checked_add(tokens)?; let cs = self.c.checked_mul(current_supply)?; let ns = self.c.checked_mul(&new_supply)?; let exp_cs = cs.signed().exp()?; let exp_ns = ns.signed().exp()?; let numerator = self.a.checked_mul(&self.b)?; let ab_over_c = numerator.checked_div(&self.c)?; exp_ns .checked_sub(&exp_cs) .and_then(|diff| ab_over_c.checked_mul(&diff))}
The computed cost always exceeds (spot price × quantity) because each successive token in the transaction is priced marginally higher than the previous. This price impact is an inherent property of pricing curves and scales with transaction size relative to total supply.
Tokens Bought for Value
When participants specify a USDF amount to spend (the typical case), this inverse function determines the exact quantity of MNY received:
T, tokens received (tokensBought)V, USDF amount the participant wishes to spendS₀, circulating supply before the purchaseln, natural logarithm, the inverse of exponentiation (e^x)
// MNY received when spending `value` USDF at `current_supply`pub fn value_to_tokens( &self, current_supply: &UnsignedNumeric, value: &UnsignedNumeric,) -> Option<UnsignedNumeric> { // num_tokens = (1/c) * ln(value / (a*b/c) + e^(c * current_supply)) - current_supply let ab_over_c = self.a.checked_mul(&self.b)?.checked_div(&self.c)?; let exp_cs = self.c.checked_mul(current_supply)?.signed().exp()?; let term = value.checked_div(&ab_over_c)?.checked_add(&exp_cs)?; let ln_term = term.log()?.value; let result = ln_term.checked_div(&self.c)?.checked_sub(current_supply)?; Some(result)}
The logarithmic term arises from inverting the exponential cost function. Because the natural log is the inverse of e^x, this formula algebraically solves for the supply endpoint that yields exactly the specified cost when integrated from S₀.
Value from Selling Tokens
The same logic applies in reverse when redeeming tokens. Tokens return to the Reserve, supply decreases, and USDF is released:
S₀, circulating supply before the redemptionS₁, circulating supply after the redemption (S₀ − tokensToSell)- Returns the gross redemption value before protocol fees are applied
#Onchain Implementation
All curve values are precomputed at fixed supply intervals and embedded in the program as lookup tables. Transaction pricing reduces to table lookups with flat step pricing, producing identical results every time.
Precomputed Tables
The implementation maintains two parallel data structures, each precomputed from the continuous formulas at fixed supply intervals:
Discrete Pricing Table
Spot price P(S) evaluated at each discrete supply level. Used for displaying current market price.
Discrete Cumulative Value Table
The integral of P(S) from 0 to each supply level. Enables efficient transaction cost computation by subtracting values at transaction boundaries.
Arithmetic and Precision
The lookup tables are configured to balance storage efficiency against pricing accuracy:
100 tokensEach entry is the curve value at S = i × 100; price is held constant within a step.128-bit · 18 dpFixed-point integers with 18-decimal scaling. The MNY token itself uses 10 decimals.210,001Covers 0 → 21,000,000 MNY in 100-token increments.These tables are fully deterministic and independently verifiable. Any implementation can regenerate the complete table contents from the constants and formulas documented above and verify equivalence with the onchain contract data.
#Price Integrity and Secondary Markets
When price discovery is separated from actual ownership, price can move without any change in who holds the asset. Derivative markets allow leveraged participants to influence price without ever holding the underlying asset. Cascading liquidations and synthetic positions can drive price collapses that have no relationship to real demand or supply.
The Reserve eliminates this class of vulnerability by design. Because the Reserve is the sole mechanism through which MNY enters and exits circulation, the Reserve price changes only when capital is committed or withdrawn. There are no external order books, no leveraged positions, and no derivative markets capable of influencing the Reserve's deterministic pricing.
Secondary markets for MNY may exist, but they cannot alter the Reserve's deterministic pricing. Any divergence between secondary market prices and the Reserve creates an arbitrage opportunity that naturally drives convergence:
Secondary Price > Reserve Price
Arbitrageurs acquire MNY from the Reserve at the lower curve price, then sell on the secondary market at the elevated price. This increases circulating supply (raising the curve price) while adding sell pressure to the secondary market (lowering its price), converging the two.
Secondary Price < Reserve Price
Arbitrageurs purchase MNY on the secondary market at the discounted price, then redeem at the Reserve for the higher curve value. This adds buy pressure to the secondary market (raising its price) while decreasing circulating supply (lowering the curve price), converging the two.
This arbitrage mechanism establishes the Reserve as both a price floor and ceiling for external markets. Any price gap exceeding transaction costs creates an incentive for arbitrageurs to restore equilibrium, anchoring all external pricing to the Reserve.