Integrate
Our markets are ordinary Uniswap v4 pools with one hook. Anything that can quote and swap v4 pools can use them; the SDK makes it a few lines.
What a router or aggregator needs to know
| Pool key | fee = 0x800000 (dynamic), tickSpacing 10 (stocks) or 60 (memecoins), hooks = our FeeHook |
| Hook flags | beforeInitialize, beforeAddLiquidity, beforeSwap, afterSwap, afterSwapReturnDelta |
| hookData | None needed; send empty bytes |
| Quoting | Uniswap's V4Quoter simulates the swap, so its result includes the LP fee and the protocol fee |
| Protocol fee | Taken from the unspecified side (output of exact-input swaps) through afterSwapReturnDelta |
| Reverts | A paused market rejects swaps and new liquidity; removing liquidity always works |
| Upgrades | None: no proxies, no owner on the hook |
SDK
import { createPublicClient, http } from "viem";
import { buildExactInputSingle, getDeployment, listMarkets, quoteExactInputSingle, robinhoodTestnet } from "@blackhookfinance/sdk";
const client = createPublicClient({ chain: robinhoodTestnet, transport: http() });
const d = getDeployment(robinhoodTestnet.id)!;
const [market] = await listMarkets(client, d);
const out = await quoteExactInputSingle(client, d, market.key, true, 10_000_000n);
const { timestamp } = await client.getBlock();
const call = buildExactInputSingle(d, {
key: market.key, zeroForOne: true, amountIn: 10_000_000n,
amountOutMinimum: (out * 995n) / 1000n, recipient: "0x…", deadline: timestamp + 600n,
});
// approve the input token to d.swapRouter, then send call.to / call.data / call.value with any walletThe SDK also builds limit orders, incentive and cashback claims, campaign funding and Black Whale payouts. It signs nothing. Use chain time (block timestamps) for deadlines, never the local clock.
Events for indexers
| Contract | Events |
|---|---|
| PoolManager | Swap (with the LP fee applied), ModifyLiquidity, Donate |
| MarketRegistry | MarketCreated, FeeParamsUpdated, MarketPaused, MarketOracleSet / Cleared |
| FeeHook | ProtocolFeeTaken, Harvested |
| LimitOrderManager | Placed, Cancelled, Closed, Withdrawn |
| LpIncentives | CampaignCreated, CampaignStopped, RootPosted, Claimed, Reclaimed |
| ArbExecutor / BlackWhale | Arb / PotFunded, Awarded, PrizePaid |
Uniswap interface routing
Hooks with return-delta flags or dynamic fees need Uniswap Labs' review before the Uniswap interface routes through them. We will apply once the contracts are verified on the explorer and audited; Uniswap's routing API does not list Robinhood Chain yet (checked October 2026). Until then, trade on our app or integrate directly.