Truncated oracles
How Abyss records capped tick movement, serves time-weighted observations, and limits oracle claims.
What is truncated
A truncated oracle does not truncate a token price to fewer decimals. It truncates, or clamps, the change in tick committed by the auxiliary observation stream.
At the beginning of an eligible action in a new block, the pool compares the live spot tick with the previously committed truncated tick:
delta = normalizedSpotTick - previousTruncatedTick
boundedDelta = clamp(delta, -maxAbsTickMove, +maxAbsTickMove)
newTruncatedTick = previousTruncatedTick + boundedDeltaThe spot price is not clamped. Swaps still execute against the live concentrated-liquidity curve. Only the separate truncated history moves gradually toward spot.
A concrete example
Assume the previous truncated tick is 10,000, the spot tick jumps to 11,000, and the pool cap is 75 ticks per eligible block.
- First eligible block: truncated tick becomes
10,075. - Second eligible block, if spot remains
11,000: it becomes10,150. - After repeated eligible blocks: it approaches
11,000in increments no larger than75.
If spot immediately returns to 10,000, the next committed truncated tick moves back by at most 75. The cap limits rate of change. It does not decide which price is correct.
Eligible writes
The pool attempts a truncated write before:
- each swap; and
- an in-range liquidity change with a nonzero liquidity delta.
Only one truncated observation can be committed per block. Additional swaps or eligible liquidity changes in the same block do not give same-block price movement elapsed-time weight.
What the ring stores
The implementation uses a separate circular observation array. Its state includes:
- timestamp;
- truncated tick cumulative;
- seconds-per-liquidity cumulative;
- initialization state;
- current ring index and cardinality;
- current truncated tick; and
- the last block that committed a transition.
observeTruncated(secondsAgos) returns cumulative values at requested lookback times. Consumers derive a time-weighted average tick by subtracting two cumulative values and dividing by elapsed seconds.
averageTick = (tickCumulativeNow - tickCumulativePast) / elapsedSecondsThe method computes a non-mutating counterfactual for the current time. Idle time accrues at the previously committed truncated tick and active liquidity. A request older than retained initialized history reverts.
Quote normalization
A raw concentrated-liquidity tick is oriented as token1 per token0. For quote-oriented interpretation, Abyss negates the tick when the quote token is token0. This keeps the truncated series economically oriented as quote per base regardless of address ordering.
Mainnet configurations
| Interface label | Maximum tick move per block | Cardinality | Intended classification |
|---|---|---|---|
| Blue-chip | 15 | 1,801 | Measured low-volatility assets |
| Mid-cap | 75 | 1,801 | Default established-market profile |
| Volatile | 200 | 1,801 | Volatile or insufficiently classified assets |
These labels are not onchain attestations. Any caller may create a pool with any registered configuration. P1 is reserved by design guidance for measured blue-chip volatility, P2 is the established-market default, and volatile or unclassified assets should use P3 or expose no truncated-oracle consumer.
With approximately one eligible observation each second, cardinality 1,801 can retain roughly 30 minutes of fully populated history. Actual coverage depends on eligible activity and ring growth.
What truncation helps with
A cap can prevent one eligible block from moving the auxiliary tick by more than a configured amount. It can reduce how quickly a single-block spot displacement enters this specific history. Same-block movement receives no elapsed-time weight after the first eligible write.
What truncation does not solve
Truncation does not establish economic truth. It does not provide:
- a USD price;
- an external reference price;
- guaranteed manipulation resistance;
- a permanent liquidity floor;
- token quality validation;
- a collateral or debt valuation;
- a lending-listing signal;
- protection against sustained multi-block manipulation;
- protection against manipulated initialization; or
- safety when liquidity is shallow or adversarial.
The stream can lag genuine price discovery by design. A tighter cap slows both manipulation and legitimate repricing. A wider cap tracks legitimate moves faster but admits larger changes per eligible block. Consumers must analyze this tradeoff, require sufficient mature history, verify liquidity conditions, and combine independent safeguards. Abyss does not approve the stream for lending use.