Private beta · test money onlyRequest an invite

IntegrationEnglish

Onchain events

Every event, its signature, its emission order

Everything that happens on UNPRICED reconstructs from these events. There is no private API behind them.

Factory

event MarketCreated(
  bytes32 indexed profileId,
  address indexed market,
  address indexed opener,
  bytes32 metadataHash,
  uint64  presetVersion,
  uint256 creationFee
);

event CurvePresetUpdated(
  uint64 indexed version,
  uint256 feeBps,
  uint256 maxBuyCost,
  uint256 youngReserveThreshold,
  uint256 youngWalletCap,
  uint256 creationFee,
  uint256 minBuyCost,
  uint256 creatorFeeShareBps,
  uint256 creatorFeeFloorBps,
  uint256 creatorFeeFullReserve,
  uint256 creatorFeeDecayReserve,
  uint256 referrerFeeShareBps
);

event PauserUpdated(address indexed previousPauser, address indexed nextPauser);
event TreasuryUpdated(address indexed previousTreasury, address indexed nextTreasury);
event ReferralRegistryUpdated(address indexed previousRegistry, address indexed nextRegistry);

MarketCreated is the only discovery mechanism you need.

Market

event Bought(address indexed account, uint256 claims, uint256 reserveCost, uint256 fee, uint256 nextSupply);
event Sold  (address indexed account, uint256 claims, uint256 grossProceeds, uint256 fee, uint256 nextSupply);

event FeeSplit(
  address indexed trader,
  address indexed referrer,
  uint256 platformFee,
  uint256 creatorFee,
  uint256 talentFee,
  uint256 referrerFee
);

event FeesClaimed(address indexed account, uint256 amount);
event TalentClaimed(address indexed talent, address indexed previousTalent);

event BuysPaused(address indexed account);
event BuysUnpaused(address indexed account);
event MarketPaused(address indexed account);
event MarketUnpaused(address indexed account);

nextSupply is the total supply after the trade. Price and reserve are pure functions of supply, so nextSupply alone rebuilds the exact price and reserve at every historical point with no extra RPC call:

price   = nextSupply² / 720_000_000_000_000
reserve = nextSupply³ / 2_160_000_000_000_000_000_000

Micro-units throughout: supply in micro-claims, results in micro-dollars.

Ordering

`MarketCreated` is emitted before the first `Bought`, inside the creation transaction. The contract enforces it. An indexer sees "the market exists", then "first purchase". The reverse order breaks factory-pattern indexers.

`FeeSplit` is emitted before the `Bought` or `Sold` of the same trade. The fee split runs before the trade event. Pair them by transaction hash and log index.

Reconstructing

QuestionSource
Every market, everMarketCreated on the factory
Full price historyBought / SoldnextSupply → the curve formula
VolumereserveCost on Bought, grossProceeds on Sold
HoldersSum claims per account across Bought and Sold
Entry rank, first believersFirst Bought per account, ordered by block then log index
Creator lifetime earningsFeeSplit.creatorFee accrued, FeesClaimed withdrawn
Referrer earningsFeeSplit.referrerFee, keyed by the indexed referrer
Verified marketsTalentClaimed
Trading restrictionsBuysPaused / MarketPaused and their counterparts

Indexing

Index the past. Read the present from the chain. Price, supply and reserve are functions of supply. Awaiting them from an index puts an indexing gap between a trader and the price they pay.

Verify your index against the chain head, not against another index. Compare your stored supply to totalSupply() on the contract. Two indexes agreeing with each other proves nothing.

Sync caches mark a block range as read the moment the RPC answers. An incomplete answer becomes a permanent hole, and a rebuild that reuses the old cache re-reads nothing and finds nothing. A correct rebuild renames the sync cache and the application schema together, and starts at a 0 % cache hit rate.

Write a proof only once your indexer has seen it. Recording a creation transaction hash at mining time, while the indexer runs seconds behind, trips every reorg guard that asks "is this transaction indexed yet".