OLYHook on Ethereum
Uniswap v4 Hook Contract 0x8301a6b5ef08596e7455a6595502512298b31fcc on Ethereum · Launchpad · Verified contract
- Volume (24h)
- $1.84K
- Value locked (TVL)
- $69.88K
- All-time volume
- $81.27K
- Pools using this hook
- 1
- Swaps (24h)
- 3 (2 traders)
- Total swaps
- 210
What it does
OLYHook is a Uniswap v4 hook for the OLY/ETH pool that adds limit-order style single-sided liquidity and a dynamic sell tax on OLY sells that is set by market-cap tier.
How it works step by step
- Lets users place single-sided limit orders into a tick range via place(), tracked as epochs with per-user liquidity.
- Fills limit-order epochs automatically in afterSwap when the price crosses their tick range and mints principal to the hook.
- Charges a dynamic sell tax on OLY market sells based on market cap tier, capped at 10%, routed to a TaxRouter.
- Charges a fixed 2% tax on limit-order sell withdrawals.
- Captures LP fees on epoch liquidity: ETH to a ValidatorVault and OLY is burned.
- Uses a TruncGeo oracle and an EthPrice contract (Chainlink with Uniswap TWAP fallback) to compute market cap.
- Swap behaviour
- Buys (ETH into OLY) are untaxed. Market sells of OLY are taxed in beforeSwap or afterSwap at a BPS rate from the market-cap tier, sent to the TaxRouter, with the tax reported by OLYSwap. Crossed limit-order epochs are filled in afterSwap.
- Liquidity behaviour
- Users place single-sided limit-order liquidity into a tick range through place(), which requires the pool to be the configured main pool. Users can cancel via kill() before fill, and claim proceeds via withdraw() after fill. Liquidity added or removed directly via the pool manager is tracked by afterAddLiquidity and afterRemoveLiquidity events only.
- Fee behaviour
- Market sells (OLY into the pool, selling for ETH) are charged a dynamic tax in BPS set by market-cap tier, capped at 10% by MAX_MARKET_SELL_TAX_BPS, taken via poolManager.take to the TaxRouter. Limit-order sell withdrawals are charged a fixed 2% tax. Buys are untaxed. LP fees on epoch liquidity are minted to the ValidatorVault for ETH and burned for OLY.
- Owner & admin controls
- Owner (OwnableUpgradeable) can set the TaxRouter, ETH price feed, TWAP period (1 to 60 minutes), validator vault, tax mode (fixed tiers or dynamic), market sell tax tiers (each capped at 10%, monotonic), tax setter whitelist, and upgrade the implementation via UUPS. Whitelisted tax setters can toggle taxEnabled. Owner can renounce ownership.
Enabled Uniswap v4 callbacks
afterInitialize, beforeAddLiquidity, afterAddLiquidity, beforeRemoveLiquidity, afterRemoveLiquidity, beforeSwap, afterSwap, beforeSwapReturnDelta, afterSwapReturnDelta
afterInitialize: restricted to the LaunchManager, records the main pool key and initial tick and sets up oracle state. beforeAddLiquidity and beforeRemoveLiquidity: update TruncGeo oracle observations before position changes. afterAddLiquidity and afterRemoveLiquidity: emit LiquidityAction events. beforeSwap: applies the market sell tax as a delta on sells and takes it to the TaxRouter. afterSwap: fills crossed limit-order epochs, applies post-swap sell tax, emits OLYSwap, and updates the tick cursor. beforeSwapReturnDelta and afterSwapReturnDelta: allow the hook to take a portion of swap output as tax.
Security & trust assessment
Risk level: high (verified source, high confidence).
Who controls it: The owner can set the market sell tax tiers up to 10% on every tier (so sells can be taxed at the cap at any market cap), point the TaxRouter at any address to receive taxes, change the ETH price feed that drives tier selection, and upgrade the entire hook implementation to arbitrary code, which could seize funds held in the hook or redirect user flows. Whitelisted addresses can disable or enable tax at will. Ownership is a single EOA or key unless it is a multisig.
Risk to user funds: The hook takes tax out of swap output and holds minted ERC6909 claims for limit-order liquidity until fill or withdrawal. Because it is a UUPS proxy controlled by one owner who can upgrade it, that owner could in principle move or block any funds it holds, and can change the tax that is taken from sellers at any time.
Security findings
- [high] Upgradeable by a single owner: owner() can call upgradeToAndCall via UUPS with no timelock visible in the source, allowing arbitrary replacement of logic that custodies user limit-order balances and ERC6909 claims.
- [medium] Owner can raise sell tax to the 10% cap: setMarketSellTaxTiers and setTaxRouter are owner-only with no timelock; tier1 can be set to 10% (MAX_MARKET_SELL_TAX_BPS), so sellers can be taxed up to 10% on every market-sell and 2% on limit-order sells cannot be changed by users.
- [medium] Tax depends on external price feed and oracle: Tax is reduced for sells when the TWAP or ETH price feed fails: safeGetTaxBps falls back to tier1, and getCurrentMarketSellTaxBps returns tier1 when observations are insufficient, so oracle failure pushes sells to the highest tax tier.
- [low] Market-cap tiering relies on manipulable pricing: ETH price comes from an owner-set Chainlink feed with an Uniswap TWAP fallback; a manipulated or unset feed changes the market cap tier and thus the tax rate applied to sellers.
- [info] Hook holds and moves funds: The hook can take sell output via return deltas (beforeSwapReturnDelta, afterSwapReturnDelta) and holds ERC6909 balances for limit-order principal, so it does have custody and transfer power over pool and user funds.
Contract details
- Verified source
- Yes (OLYHook)
- Compiler
- solc 0.8.30+commit.73712a01
- Bytecode size
- 176 bytes
- Upgradeable proxy
- Yes
- Detected patterns
- access-control, launchpad, liquidity-management, oracle, ownable, return-delta, self-unlock, tax, upgradeable
Pools using OLYHook
- ETH / OLY (1.00% fee) — 24h volume $1.84K, TVL $69.88K, 3 swaps today