Pricing
Pricing in Rarity is not just about the last trade—it's about executable liquidity, manipulation resistance, and protocol-wide consistency. The CL AMM provides a focused set of pricing metrics essential for RWA tokenization: spot price for instant execution, TWAP for time-smoothed manipulation resistance, RWAP for depth-aware pricing that reflects true market capacity, and composite marks that combine these signals.
These metrics feed into every protocol product: lending LTVs, minting floor prices, and mark-to-truth auction triggers. The goal is straightforward: prices should reflect what you can actually trade at, not what someone claims they should be.
Design philosophy for RWA markets
Unlike high-frequency trading venues, RWA markets have distinct characteristics:
- Slow-moving beliefs about value - Participants' views on asset worth change gradually
- Thin liquidity - Lower trading volume than liquid crypto assets
- Self-healing convergence - Mark-to-Truth auctions let participants act on value beliefs
- Oracle-free design - The spot pool itself is the oracle
This means we focus on metrics that are:
- Computable on-chain without external oracles
- Manipulation-resistant even in thin markets
- Grounded in executable liquidity not theoretical midpoints
- Simple to maintain with minimal gas costs and attack surface
We deliberately exclude metrics like volatility feeds, toxic flow tracking, and high-frequency imbalance monitoring—those are for active trading markets, not asset-backed tokens where value beliefs move slowly.
Spot price
The spot price is the mid-price of the last trade—the current price at which the next infinitesimally small trade would execute. In a CL AMM, this is the price at the current tick, determined by the ratio of reserves in active liquidity ranges.
Purpose: Instant execution reference for small trades.
Limitations:
- Thin liquidity: Spot price can be manipulated by large trades in thin markets
- No depth information: Doesn't tell you how much liquidity exists at that price
- Momentary spikes: Flash crashes or pumps can create misleading spot prices
Use cases:
- Real-time trading interfaces
- Instant swap execution for small amounts
- Price charts and historical data
Why it's not enough: For protocol-critical functions like lending LTVs or liquidation triggers, spot price is too volatile and manipulable. This is why TWAP and RWAP exist.
TWAP (Time-Weighted Average Price)
TWAP smooths price over a time window by weighting each price observation by the duration it was active. This creates manipulation resistance because an attacker must sustain a manipulated price for the entire window to impact the TWAP significantly.
How it works
The protocol maintains a cumulative price accumulator that updates with every trade:
To calculate TWAP over window :
Example: Over a 1-hour window:
- Price is $5,000 for 45 minutes
- Price spikes to $5,500 for 5 minutes (manipulation attempt)
- Price returns to $5,000 for 10 minutes
The manipulation only moved TWAP by $42 (0.84%), despite a 10% spot price spike.
Window selection
Different protocol functions use different TWAP windows based on their manipulation risk and responsiveness needs:
| Function | Window | Rationale |
|---|---|---|
| Lending LTVs | 30 min | Balance manipulation resistance with market responsiveness |
| Liquidation triggers | 15 min | Faster response to real price movements |
| Minting floor prices | 1 hour | Strong manipulation resistance for supply management |
| Mark-to-Truth triggers | 4 hours | Very conservative, only triggers on sustained deviations |
Trade-off: Longer windows provide stronger manipulation resistance but slower response to legitimate price changes. Shorter windows are more responsive but easier to manipulate.
RWAP (Realized Weighted Average Price)
RWAP captures the actual execution cost of trading through the current liquidity curve, weighting prices by the volume that would be executed at each level. This creates an impact-aware pricing metric that reflects true slippage and market capacity.
How it works
RWAP simulates the execution path through the current liquidity curve for a specific notional amount , weighting prices by the volume executed at each level:
where is the execution price at level and is the volume executed at that level when trading through the curve.
Intuition: RWAP answers "What price would I actually pay to execute trade size through the current liquidity?" by simulating the curve traversal and computing the volume-weighted average execution price.
Key point: RWAP is based on current liquidity depth, not historical trades. It's a forward-looking metric that reflects what the market can absorb right now for a specific size.
Impact-aware execution
RWAP captures slippage reality for large trades moving through multiple liquidity ranges.
Example: Current spot price is $5,000. To buy 100 tokens:
- Range 1 ($5,000–$5,050): 50 tokens at avg $5,025
- Range 2 ($5,050–$5,100): 30 tokens at avg $5,075
- Range 3 ($5,100–$5,150): 20 tokens at avg $5,125
The realized execution price is $5,067, not the $5,000 spot price. RWAP captures slippage reality.
Manipulation resistance
RWAP is harder to manipulate than spot price because it reflects actual trade execution across multiple liquidity ranges. An attacker would need to:
- Execute large trades (expensive)
- Maintain manipulated prices across ranges (very expensive)
- Sustain this for the observation window (economically infeasible)
This makes RWAP ideal for fair-mark calculations and liquidation logic where execution cost matters.
Depth-aware price (Impact mid)
The depth-aware price measures what the market can actually absorb around the current spot by probing the AMM curve on both sides for a small, symmetric notional . It accounts for local liquidity thickness and slippage sensitivity, making it a highly manipulation-resistant mark.
How it works
- Choose a small notional (e.g., 5 bps of pool TVL)
- Simulate a buy of size and a sell of size through the CL curve:
- : price reached when swapping in stables
- : price reached when swapping out stables
- Take their midpoint:
This represents the impact-adjusted fair price at which a realistic, small trade could execute.
Example
If a ±$5,000 probe produces:
then
Uses
- Oracle/mark price for lending, minting
- Liquidity health indicator (thin pools have wider impact spreads)
- Market-maker quoting - defines the "neutral" price to center liquidity bands
Limitations
- Requires full tick-walk of liquidity (gas cost on-chain)
- Choice of matters: too small → same as spot; too big → overstates slippage
- Only captures local depth, not global market structure
Depth score
The Depth Score measures how much executable liquidity exists near the mid-price relative to a target depth .
How it works
Sum bid- and ask-side liquidity within a chosen band (e.g., ±1%) around current mid. Take the smaller side and normalize by the protocol's target depth.
Example
- Bid-side: $80,000
- Ask-side: $100,000
- Target depth: $120,000
Uses
- Risk scaling - Haircuts or collateral factors decrease when DepthScore < 1
- MM rewards - Incentivize balanced, thick books
- Circuit breakers - Suspend operations if depth collapses
Limitations
- Snapshot metric—can fluctuate quickly
- Does not capture distribution of depth across ticks
- Requires tick scanning (moderate gas if done every block)
Guarded pool price
The guarded pool price combines multiple metrics to create a manipulation-resistant reference for supply management mechanisms:
Purpose: Ensure minting mechanisms never undercut the market by using a smoothed, depth-aware price floor.
How it works:
- : Current spot price (immediate market reality)
- : Time-smoothed price over N minutes (manipulation resistance)
- : Depth-weighted price over Q quantity (capacity awareness)
Taking the maximum ensures that:
- New supply never enters below current spot price
- Manipulation attempts (temporary price drops) are ignored
- Thin liquidity (low RWAP) raises the floor
Example:
- Spot price: $4,950 (momentary dip)
- TWAP (30 min): $5,020 (smoothed)
- RWAP (100 tokens): $5,000 (depth-aware)
Minting mechanisms use $5,020 as the floor, ignoring the momentary dip.
Off-chain computation and verification
Some metrics (particularly RWAP with large windows and depth-aware calculations) can be gas-intensive to compute on-chain for every transaction. The protocol supports hybrid computation models:
Oracle-based computation
Off-chain oracles can compute expensive metrics and submit them on-chain with:
- Cryptographic attestations - Signed price feeds from trusted operators
- Slashing mechanisms - Oracles stake collateral that can be slashed for incorrect submissions
- Verification period - On-chain challenges allow disputing incorrect values
- Fallback to on-chain - If oracle feeds are stale, compute directly on-chain
Future: Zero-knowledge proofs
Advanced implementations can use zk-SNARKs or zk-STARKs to provide:
- Succinct proofs of correct metric calculation
- Trustless verification - No need to trust the computation source
- Gas efficiency - Verify proofs cheaper than computing metrics
- Privacy preservation - Hide intermediate calculation details if needed
Current approach: All core metrics (spot, TWAP, guarded pool price) are computed purely on-chain. Depth-aware and extended RWAP calculations are available as view functions or oracle-submitted values with verification.
Essential metrics summary
For RWA tokenization, the protocol focuses on a pragmatic set of metrics that balance manipulation resistance, gas efficiency, and executable liquidity awareness.
Core price metrics (essential)
| Metric | Definition | Computed | Primary Use | On-chain? |
|---|---|---|---|---|
| Spot Price | Current tick mid-price | Native | Trading UI, execution, mark inputs | ✅ |
| TWAP | Time-weighted average (N minutes) | Accumulator | Lending LTVs, mark-to-truth triggers | ✅ |
| RWAP | Realized weighted average (depth) | Simulated | Fair mark, minting, liquidations | ✅ View |
| Depth-Aware Price | Impact mid (±q probe) | Tick-walk | Oracle-grade mark, local liquidity | ✅ View |
| Guarded Pool Price | max(Spot, TWAP, RWAP) | Composite | Minting floor, supply discipline | ✅ |
| Depth Score | min(D_bid, D_ask) / D* | Liquidity sum | Risk scaling, circuit breakers | ✅ |
Why these metrics?
Spot Price: Foundation of all other metrics; required for execution.
TWAP: Cheapest, most robust manipulation resistance; native accumulator in CL AMMs.
RWAP: Captures true execution cost by simulating curve traversal for a specific notional. Grounded in current liquidity depth and actual slippage reality.
Depth-Aware Price: Local liquidity-adjusted mark using symmetric bid/ask probe; resistant to micro-tick manipulation.
Guarded Pool Price: Self-protecting composite that prevents minting below market by taking maximum of multiple price signals.
Depth Score: Simple health check; enables pause triggers when liquidity collapses below thresholds.
Metrics deliberately excluded
The following metrics are valuable for high-frequency trading venues but add unnecessary complexity for RWA markets:
VWAP (Volume-Weighted Average Price): Manipulable through wash trading; ignores untraded depth. RWAP provides better depth-awareness.
Volatility (σ): RWA fundamentals move slowly; mark-to-truth auctions handle large deviations. No need for dynamic volatility tracking.
Toxic Flow / Adverse Selection: Requires high-frequency trade data and adds oracle dependency. Unnecessary for asset-backed tokens where mark-to-truth auctions provide price discipline.
Imbalance Tracking: Useful for HFT fee optimization, but RWA pools are naturally imbalanced during minting phases. Not a risk signal in this context.
Impact Slope / LVR: Advanced LP analytics better handled off-chain. Protocol doesn't need these for core operations.
Liquidity Decay Monitoring: Mark-to-Truth auctions and depth score provide sufficient protection without historical depth tracking.
Implementation approach
| Layer | Metric | Computed | Used For | Notes |
|---|---|---|---|---|
| Execution | Spot Price | On-chain | Trading, UI | Instant, manipulable |
| Temporal smoothing | TWAP (15–60 min) | On-chain | Risk references, triggers | Native accumulator |
| Depth realism | RWAP (simulated) | View/off-chain | Marking, minting, liquidation | Depth-aware cost |
| Local liquidity | Depth-Aware Price | View/off-chain | Oracle-grade mark | Anti-manipulation |
| Supply discipline | Guarded Pool Price | On-chain (composite) | Mint/redeem floor | max(spot, TWAP, RWAP) |
| Health control | Depth Score | On-chain | Pause / haircuts | Simple liquidity monitor |
On-chain availability and composability
All essential metrics are computed or queryable on-chain in real-time:
- Accumulators: TWAP uses cumulative accumulators updated with every trade
- View functions: RWAP and Depth-Aware Price computed as view functions (gas-free queries)
- Liquidity snapshots: Depth metrics query current tick liquidity distribution
- Configurable windows: Different lookback periods for different risk profiles
- Gas-efficient storage: Optimized layout enables cheap metric reads
Composability: External protocols can query Rarity's pricing metrics, enabling:
- Third-party lending markets to use manipulation-resistant RWA pricing
- Aggregators to incorporate RWA assets into broader DeFi indices
- Risk management tools to monitor RWA market health
- Arbitrage bots to detect mispricings and facilitate mark-to-truth convergence
Price convergence: Mark-to-Truth backstop
While TWAP and RWAP provide manipulation-resistant pricing, they cannot prevent sustained mispricings where spot market price drifts from fair value. This is where mark-to-truth auctions come in.
The problem
Spot markets can become unreliable for many reasons:
- Thin liquidity - Few trades, easy to manipulate
- Death spirals - Cascading liquidations push price away from fundamentals
- Stale information - Market hasn't incorporated developments
- Manipulation - Attackers move price without economic justification
When spot price loses credibility, the protocol needs a capital-based mechanism to discover what assets are actually worth.
The solution: Capital-based price discovery
Mark-to-Truth auctions force price discovery by actually selling a sample of underlying assets:
- Trigger: Anyone can call for an auction when pool health is questionable (posting a bond)
- Sample: Protocol randomly selects a sample assets from the pool (homogeneous lots)
- Auction: Bidders put up real capital to buy these assets at uniform clearing price
- Statistics: Compute deviation and standard error from bid distribution
- Decide: Three outcomes based on and :
- CONFIRM (healthy): Keep current mark, slash caller bond
- RECENTER (mispriced): Reset pool mark to , refund caller
- WIND-DOWN (systemic): Begin orderly liquidation of entire pool
Core principle: Truth should cost money. Only when participants deploy actual capital to buy actual assets should the system update its mark. Opinions, appraisals, and oracle feeds are "cheap talk"—mark-to-truth auctions require skin in the game.
Manipulation resistance: To fake a mark, attackers must:
- Dominate auction clearing price (expensive—they own the assets)
- Keep bid dispersion low (requires multiple coordinated bidders)
- Also manipulate on-chain spot liquidity (double capital requirement)
If bid dispersion is too high (no market consensus), the auction result is voided (INCONCLUSIVE) and no price change occurs.
Why it works: The combination of economic penalties (caller loses money if pool is healthy), statistical confidence (SE determines validity), and capital deployment (bidders receive real assets) creates a robust, manipulation-resistant backstop for spot pricing.
See the Mark-to-Truth Auctions section for complete mechanics, economics, and parameters.
Pricing for protocol products
Different protocol products use different pricing metrics based on their risk profiles and responsiveness needs:
| Product | Metric | Window / Param | Purpose | Rationale |
|---|---|---|---|---|
| Spot trading | Spot price | Instant | Immediate execution | Real-time market clearing |
| Lending LTVs | TWAP | 30 min | Manipulation-resistant collateral valuation | Balance safety with responsiveness |
| Liquidations | RWAP | Q = size | Fair execution price for liquidators | Accounts for actual slippage at size |
| Minting floors | Guarded pool | Real-time | Never undercut live market | max(spot, TWAP, RWAP) protects supply |
| Redemption ceiling | Depth-Aware | q = 5 bps TVL | Fair exit price during redemptions | Accounts for local liquidity |
| Mark-to-Truth triggers | TWAP | 4 hours | Only trigger on sustained deviations | Avoid false positives from volatility |
| Risk monitoring | Depth Score | ±1% band | Detect liquidity collapses | Simple health check for circuit breakers |
This layered pricing approach ensures that each product uses the most appropriate metric for its requirements—spot for execution, TWAP for manipulation resistance, RWAP and depth-aware for liquidity-aware marking, and guarded composites for supply management.
Why this matters
Pricing is the foundation of the entire protocol. For RWA tokenization, the challenge is unique: you need manipulation resistance in thin markets where traditional crypto pricing assumptions break down.
Get it wrong and you have:
- Manipulation risk: Attackers exploit thin liquidity to trigger liquidations or game minting
- Poor composability: Other protocols won't trust pricing from illiquid RWA markets
- Unfair outcomes: Users get liquidated on momentary spikes; minting undercuts market makers
- Death spiral risk: Cascading liquidations in thin markets with inadequate depth awareness
Get it right and you have:
- Truthful pricing: Prices reflect executable liquidity, not theoretical midpoints
- Manipulation resistance: TWAP, RWAP, and depth-aware metrics resist attacks even in thin books
- Capital-based backstop: Mark-to-Truth auctions force price discovery through actual asset sales when spot markets fail
- Protocol-wide trust: Pricing is verifiable, composable, and grounded in real on-chain liquidity
- Gas efficiency: Essential-only metric set keeps transaction costs low
The RWA pricing advantage
By focusing on essential metrics only and grounding everything in executable liquidity, the protocol achieves:
- No external oracle risk - The pool itself is the oracle for day-to-day pricing
- Manipulation resistance - Multiple complementary metrics (spot, TWAP, RWAP, depth-aware)
- Capital-based backstop - Mark-to-Truth auctions force price discovery through actual asset sales
- Simplicity - Fewer metrics, less complexity, smaller attack surface
- Composability - Other protocols can trustlessly query RWA prices
The combination of spot price, TWAP, RWAP, depth-aware marking, guarded composites, and capital-based mark-to-truth backstops creates a robust pricing infrastructure specifically designed for tokenized real-world assets where traditional oracle approaches fail.
Related reading
- CL AMM Primer - Introduction to concentrated liquidity mechanics
- Liquidity management - Professional market making strategies
- Mark-to-Truth Auctions - How price converges to fundamental value
- Minting - How guarded pool price protects supply management
- Spot Trading - Overview of the CL AMM trading system