Events
Every number on this site is rebuilt from these. If you index them, you have what we have.
Launchpad
event Launched(
address indexed token, address indexed creator,
string name, string symbol, string uri,
uint256 threshold, uint16 feeBps
)
event Bought(
address indexed token, address indexed buyer,
uint256 ethIn, uint256 tokensOut, uint256 fee,
uint256 refund, uint128 realEth, uint128 soldTokens
)
event Sold(
address indexed token, address indexed seller,
uint256 tokensIn, uint256 ethOut, uint256 fee,
uint128 realEth, uint128 soldTokens
)
event FeeAccrued(address indexed token, address indexed claimant, uint256 amount)
event Graduated(
address indexed token, address indexed pool,
uint256 nativeLiquidity, uint256 tokenLiquidity
)realEth and soldTokens are the curve's state after the trade, so you can price it without replaying everything before it. refund on a buy is the part that would have overshot the threshold and was sent back.
FeeAccrued fires twice per trade, once for the creator and once for the platform, and once more on a launch for the launch fee. A launch fee is a FeeAccrued with no matching Bought.
PositionLocker
event Locked(address indexed token, address indexed pool, uint128 liquidity, address creator)
event FeesCollected(address indexed token, uint256 amount0, uint256 amount1)
event FeeCredited(address indexed claimant, address indexed currency, uint256 amount)
event Claimed(address indexed claimant, address indexed currency, uint256 amount)These record when fees were booked, not when they were earned. Uniswap credits a position silently on every swap, and only a collect turns that into an event, so this ledger trails the pool rather than tracking it.
Trades after graduation
A graduated token's trades are Uniswap Swap events on its own pool, not Launchpad events. Read them from the pool address in Graduated.
event Swap(
address indexed sender, address indexed recipient,
int256 amount0, int256 amount1,
uint160 sqrtPriceX96, uint128 liquidity, int24 tick
)Amounts are signed from the pool's side: positive is what came in, negative is what went out. Which leg is the native one depends on address ordering, which is settled when the pool is created and never restated by the event. Compare the token's address to wrapped MNT's and you have it. Reading that backwards files every buy as a sell with the amounts transposed, and nothing throws.
A swap sent through the CurveRouter names the router as both sender and recipient, because it holds the tokens for the length of the call. The router emits its own event with the real trader:
event Swapped(
address indexed token, address indexed trader,
bool buy, uint256 amountIn, uint256 amountOut
)