Skip to main content

Launch and rewardsCreator oracle

Creator oracle

The TWAP price feed for a creator's ShareOFT, used for launch pricing, fee buyback slippage limits, and share valuation.

CreatorOracle gives each creator stack a manipulation-resistant price. On Base it reads the ShareOFT/ETH Uniswap V4 pool TWAP and a Chainlink ETH/USD feed; remote chains receive Base's price over LayerZero.

At a glance​

RoleTWAP price feed for creator and share tokens
DeployedPer creator (same address on every chain via CREATE2)
Key relationshipsPrices the auction floor for the CCA launch arm; sets the slippage floor for WETH buybacks in the gauge controller; values shares for the LotteryManager; resolved through Registry4626

How it works​

  1. Read the pool. On Base, the oracle reads the ShareOFT/ETH V4 pool TWAP (default 30 minutes).
  2. Convert to USD. It multiplies by Chainlink ETH/USD to get a USD price.
  3. Guard against manipulation. Tick capping limits how far the price can move per observation, and the cap auto-tunes based on observation frequency.
  4. Share it. Base broadcasts its price to other chains over LayerZero, so remotes need no local liquidity.

A price counts as fresh only if the sequencer is up, a price exists, and it is younger than 2 hours.

Key functions​

FunctionWhat it doesWho can call
getAssetPrice()Asset USD price and timestampView
getEthPrice()ETH/USD price and timestamp (Chainlink)View
getAssetEthTWAP(duration)Asset/ETH TWAP over duration secondsView
isPriceFresh()True if the sequencer is up and the price is under 2 hours oldView

Numbers​

ParameterValue
TWAP duration30 minutes (DEFAULT_TWAP_DURATION, also the minimum)
Staleness threshold2 hours (MAX_STALENESS)
Sequencer grace period1 hour (SEQUENCER_GRACE_PERIOD)

Who uses it​

  • CCA launch arm. Derives the auction floor from getAssetPrice() and getEthPrice(); stale or invalid data reverts the launch.
  • Gauge controller. Uses isPriceFresh() and getAssetEthTWAP() to set the minimum ShareOFT out on WETH buybacks (_calculateMinOutput). If the price is stale, the buyback fails closed and fees stay pending.
  • LotteryManager. Uses getAssetPrice() to value ShareOFT and convert jackpot USD into shares.

Gotchas​

  • Lottery tickets don't use this oracle. A ticket's amountUSD is what the buyer spent at the venue, not an oracle price. See LotteryManager.

Source​