Integration

Events to index

If you are building on this rather than reading it.

The factory emits a launch event carrying the token and curve addresses. Trades come from the curve before graduation and from the Uniswap v4 pool after it, which is why an indexer has to watch both and switch when a coin graduates.

The trap worth knowing about

Fee amounts are not all denominated in the same asset. On the curve the fee comes off the quote leg. In a graduated pool the hook charges on the output currency, so a buy pays its fee in the coin rather than in ETH.

Summing the two without checking the currency gives a number that adds ETH to a launched coin. Our own schema keeps the fee currency in its own column for exactly this reason, and our analytics converts each row by its own currency before adding anything.

Ordering

A token's first transfer can arrive in the same block as the launch event, since the supply mints during construction. An indexer that inserts transfers before it knows the launch exists will violate its own foreign key. Buffer holder changes and flush them at the end of the batch.