OstraHook on Robinhood Chain
Uniswap v4 Hook Contract 0x63a784afb8905452adcec471a45e555f5cae68cc on Robinhood Chain · Launchpad · Verified contract
- Volume (24h)
- $0
- Value locked (TVL)
- $0
- All-time volume
- $0
- Pools using this hook
- 1
- Swaps (24h)
- 2 (1 traders)
- Total swaps
- 2
What it does
OstraHook is a launchpad hook that charges every swap a 1% hook fee split between creator and protocol, plus the pool's buy or sell tax and an anti-snipe tax on early buys, so buyers pay more than sellers during the launch window while the post-tax period charges only the 1% fee and dynamic LP fee.
How it works step by step
- Registers each pool OstraLaunchpad creates and holds per-pool config: tax rates, anti-snipe, max buy, graduation threshold, creator vault and dividend settings
- Charges every swap a hook fee of 1% of the quote leg, split 70% to the creator and 30% to the protocol, with half of the protocol part kept for buyback; a referrer named in hookData receives half of the protocol part
- Charges the pool's buy or sell tax (capped at 10%), a linearly decaying anti-snipe tax on buys during the launch window, and sets a dynamic LP fee each swap via OstraFees (0.25% base, 0.50% while a stock quote's market is closed, optional volatility fee up to 1%, plus an MEV surcharge on same-second reversals by one actor)
- Mints the charged amounts as ERC-6909 PoolManager claims to the OstraDispatcher and books them per pool and per protocol share, to be paid out later by the dispatcher
- Implements a circuit breaker: when enabled, one transaction cannot move the price further than maxTxMoveTicks from its pre-transaction tick, and a swap ending at a price without liquidity reverts
- Gates liquidity: before graduation only the locker and dispatcher may add liquidity; buys are capped at maxBuy until limits end; graduation is triggered once when the threshold is reached
- Swap behaviour
- On every swap not made by the dispatcher, the hook charges the quote-side leg: a 1% hook fee plus the buy or sell tax, plus the anti-snipe tax on buys during the launch window (except the creator's dev buy in the launch block). Exact-input swaps take the charge from the specified side in beforeSwap for quote-specified trades and from the unspecified side in afterSwap otherwise. Buys face the buy tax and anti-snipe, sells face the sell tax, and after the tax end time all taxes are zero. The dispatcher's own swaps pay no hook fee, tax or LP fee. Swaps that leave the price beyond the circuit breaker band or ending in a zero-liquidity price revert when the breaker is enabled. Pre-graduation buys above maxBuy revert.
- Liquidity behaviour
- Before graduation, beforeAddLiquidity reverts for any sender other than the locker or dispatcher. After graduation and the anti-farmer end, adding liquidity is open to anyone. Removing liquidity has no hook callback.
- Fee behaviour
- The LP fee is dynamic and set by OstraFees on each swap: 0.25% base; 0.50% for stock-quoted pools while the market is closed; optionally up to 1% from a volatility measure; plus an MEV surcharge up to 5% for same-second reversals by the same actor. The hook fee is 1% of the quote leg, 70% to the creator and 30% to the protocol (half of which is kept for buyback, and half of the protocol part may go to a referrer). Tax and anti-snipe amounts are split across creator, dividend, burn, LP and floor buckets, with the creator bucket taking rounding remainder.
- Owner & admin controls
- Owner (Ownable2Step) can call initialize once to bind launchpad, locker, dispatcher, devBuy and airdrop addresses, and can renounce or transfer ownership. Pool rules can only be changed by each pool's creator vault via configure, and only in the traders' favour (lower taxes, earlier tax end, higher or no max buy, released limits, volatility fee off, looser circuit breaker). The hook is not upgradeable (no proxy visible in the source). The owner has no direct pause or fee-setting function over pools.
Enabled Uniswap v4 callbacks
beforeInitialize, beforeAddLiquidity, beforeSwap, afterSwap, beforeSwapReturnDelta, afterSwapReturnDelta
beforeInitialize: validates the pool is launched by the launchpad and uses the dynamic fee flag and tick spacing 200. beforeAddLiquidity: restricts liquidity additions before graduation to the locker and dispatcher. beforeSwap: charges the specified-side fee, sets the dynamic LP fee and enforces the circuit breaker start tick. afterSwap: charges the unspecified-side fee, books tax and fee shares, tracks graduation, enforces max buy, and runs the circuit breaker and liquidity check. beforeSwapReturnDelta and afterSwapReturnDelta: the hook takes fee amounts via return deltas, so it can take quote currency from swaps.
Security & trust assessment
Risk level: medium (verified source, high confidence).
Who controls it: The owner key only sets the one-time initialize bindings and can transfer or renounce ownership; it cannot change fees, pause swaps or move pool funds. The per-pool creator vault has meaningful control over the pool's tax and limit rules, but only in the direction of lowering taxes or loosening limits.
Risk to user funds: The hook holds no user balances directly; charged amounts are minted to the dispatcher as PoolManager claims and tracked in pending storage until paid out. The hook can take quote currency from swaps via return deltas, and the circuit breaker can block swaps, but it cannot withdraw pool liquidity or redirect other users' funds.
Security findings
- [info] Hook takes fees via return deltas on every swap: beforeSwapReturnDelta and afterSwapReturnDelta let the hook take a percentage of the swap's quote leg, up to roughly 1% hook fee plus up to 10% tax, anti-snipe and buy/sell taxes, which users pay on top of pool pricing.
- [info] Circuit breaker can block swaps: When maxTxMoveTicks is set, swaps that move the price beyond the band or leave the price without liquidity revert with PriceMoveTooLarge or NoLiquidityAtPrice, so trades may fail in volatile conditions.
- [low] Creator vault can change pool rules: Each pool's creator vault can invoke configure to lower taxes, end taxes earlier, release limits or disable the volatility fee; these changes are restricted to favour traders but the creator controls the pool's rules after launch.
- [info] Immutable dependencies set at construction: The PoolManager, WETH and fee contract addresses are immutable; the owner can rebind launchpad, locker, dispatcher, devBuy and airdrop only once through initialize.
Contract details
- Verified source
- Yes (OstraHook)
- Compiler
- solc 0.8.30+commit.73712a01
- Bytecode size
- 18,032 bytes
- Upgradeable proxy
- No
- Detected patterns
- erc6909-claims, launchpad, liquidity-management, ownable, return-delta, rewards, tax
Pools using OstraHook
- USDG / TEST (Dynamic fee) — 24h volume $0, TVL $0, 0 swaps today