Protocol

Smart contracts

The launchpad interface the app is built against.

Pook's frontend talks to a single launchpad contract. Its address is configured per deployment with NEXT_PUBLIC_POOK_LAUNCHPAD_ADDRESS; until it's set, the app reports on-chain actions as unavailable rather than faking them.

Interface

struct Route { uint8 destination; uint16 bps; }
struct LaunchParams {
  string name; string symbol; string metadataURI;
  uint8 hookId; Route[] routes; address treasury;
}

function launch(LaunchParams params) payable returns (address token);
function launchFee() view returns (uint256);

function buy(address token, uint256 minTokensOut, address referrer) payable returns (uint256);
function sell(address token, uint256 tokenAmount, uint256 minEthOut) returns (uint256);
function quoteBuy(address token, uint256 ethIn) view returns (uint256);
function quoteSell(address token, uint256 tokenAmount) view returns (uint256);

function feeConfig(address token) view
  returns (uint8 hookId, Route[] routes, address treasury, uint16 creatorFeeBps);
function pendingCreatorFees(address token) view returns (uint256);
function routeCreatorFees(address token);

function tokenCount() view returns (uint256);
function tokenAt(uint256 index) view returns (address);
function launchesOf(address creator) view returns (address[]);
function tokenInfo(address token) view
  returns (address creator, string metadataURI, uint64 launchedAt, bool graduated, uint256 reserveEth);

event TokenLaunched(address indexed token, address indexed creator, uint8 hookId, string name, string symbol);
event Trade(address indexed token, address indexed trader, bool isBuy, uint256 ethAmount, uint256 tokenAmount);
event CreatorFeesRouted(address indexed token, uint256 amount);

Destination and hook ids

Destination: 0 buyback · 1 liquidity · 2 holders · 3 jackpot · 4 treasury · 5 referrals
Hook:        1 buyback · 2 liquidity · 3 holders · 4 jackpot · 5 treasury · 6 referrals · 7 custom

Launch curve

Every token trades on a constant-product curve held by the launchpad: a virtual ETH reserve seeds the price, all of the supply starts on the curve, and each buy or sell moves along x · y = k. The creator fee and a small protocol fee are taken from every trade. When the real ETH reserve passes the graduation threshold the token is flagged as graduated — a milestone shown on its page; the curve keeps trading.

Jackpot draws

The jackpot hook accumulates fees into a pool. Once the draw interval has passed, anyone can call drawJackpot; the pool goes to one holder chosen with probability proportional to balance. Randomness is block-derived (prevrandao and the previous block hash) — fine for a community prize pool, not for adversarial high-value lotteries.

Data sources

Explore, token pages and the creator dashboard read from an indexer. Pook ships one built in (/api/indexer) that scans the launchpad's events over the RPC; NEXT_PUBLIC_POOK_INDEXER_URL can point at it or at an external service with the same REST shape. Without any indexer, the app reads what it can straight from the contract and says plainly which figures are unavailable.