SwingHook on Ethereum

Uniswap v4 Hook Contract 0xad3cc8eb9d34abeb3b0ca9b98cbfd3837b7d40c8 on Ethereum · Launchpad · Verified contract

Volume (24h)
$1.67K
Value locked (TVL)
$21.37K
All-time volume
$7.83M
Pools using this hook
1
Swaps (24h)
5 (5 traders)
Total swaps
31,163

What it does

SwingHook is a Uniswap v4 hook for an ETH/SWING pool that routes buys and sells either as plain AMM swaps or as randomized Swing tickets whose payout multiplier is revealed by Chainlink VRF.

How it works step by step

  • Routes ETH to SWING buys either as deterministic AMM swaps or as Swing buy tickets that escrow the output as a base and request VRF randomness.
  • Routes SWING to ETH sells either as deterministic AMM swaps or as Swing sell tickets whose ETH base is escrowed in the ETH settlement vault.
  • Takes a 2% ETH fee on UniswapBuy during launch via v4 beforeSwap custom accounting and forwards it to the ETH settlement vault.
  • Reveals each ticket's multiplier from a VRF word on a fixed 98-point curve and locks up to a 9x extra reserve at ticket creation.
  • Pays claims from the settlement vaults, applying a 5% Echo share on bonuses at or above 3x while development is unlocked and stake is active.
  • Enters a Sunset state after 30 days of buy volume below 5 ETH, closing new Swing modes and enabling permissionless LP finalization through FeeKeep.
Swap behaviour
beforeSwap validates the official pool key and exact-input direction, decodes HookData to choose between UniswapBuy, SwingBuy, UniswapSell or SwingSell, takes the UniswapBuy fee and stores a swap context. afterSwap enforces minimum output and authorizes launch transfers. Swing modes then create pending tickets after the swap is finalized through finalizeV4Swap, requesting VRF randomness for the payout multiplier.
Liquidity behaviour
No liquidity callbacks. The hook does not run beforeAddLiquidity or beforeRemoveLiquidity. Protocol-owned LP liquidity is handled by FeeKeep only after Sunset via finalizeSunsetLiquidity.
Fee behaviour
UniswapBuy takes a 2% (200 bps) ETH fee during the launch phase via v4 beforeSwap custom accounting, forwarded to ETHSettlementVault; the fee drops to 0 once development is unlocked and is 0 after Sunset. Swing modes pay a prepaid native VRF fee taken from msg.value. Sell modes do not charge a hook fee; the pool uses a static 1% LP fee.
Owner & admin controls
No owner or admin setters: all dependencies are immutable constructor arguments and there is no owner, pause or upgrade mechanism in the hook. Sunset is triggered permissionlessly once the 30-day buy-volume threshold is met or by the time-based automatic path, and finalizeSunsetLiquidity is permissionless. Tickets can be settled permissionlessly after the 48-hour VRF timeout.

Enabled Uniswap v4 callbacks

beforeSwap, afterSwap, beforeSwapReturnDelta

beforeSwap: validates pool key, routing and HookData, takes the UniswapBuy fee via custom accounting and records buy volume and swing contexts. afterSwap: records actual AMM output, enforces minimum output and issues launch transfer authorizations. beforeSwapReturnDelta: enables the hook to take a specified-currency delta as the UniswapBuy fee.

Security & trust assessment

Risk level: medium (verified source, high confidence).

Who controls it: No privileged key exists in the hook, so no single party can directly change fees, pause swaps or move funds. Risk is concentrated in the immutable dependencies (SwingRouter, settlement vaults, RandomnessManager, FeeKeep, HolderVault) whose own admin powers are outside this contract.

Risk to user funds: The hook can hold ETH and SWING only transiently inside swap finalization, and escrowed ticket base amounts and reserve locks live in the settlement vaults rather than the hook. Users are exposed to vault solvency, VRF fulfilment timing and the immutable dependency set rather than a hook-controlled withdrawal path.

Security findings

  • [info] VRF dependency with timeout fallback: Swing modes create ETH or SWING payout tickets that depend on Chainlink VRF through RandomnessManager; a permanent VRF failure would be covered by the 48-hour settleTimedOutTicket fallback at 1x, not by an owner action.
  • [medium] Hook custodies swap proceeds transiently: The hook takes ETH via beforeSwapReturnDelta for the UniswapBuy fee and pulls SwingSell gross output into the contract before forwarding it to vaults, so it temporarily holds user funds within a single transaction.
  • [low] Permissionless Sunset can close Swing modes: Sunset is triggered automatically or permissionlessly and blocks new Swing modes; revealed tickets can still be claimed but new volatility trades stop, a behavioural restriction users should be aware of.
  • [info] Access and reentrancy controls present: Reentrancy guard is applied to all state-changing entrypoints and PoolManager-only callbacks gate the swap path, reducing reentrancy and unauthorized-context risk.

Contract details

Verified source
Yes (SwingHook)
Compiler
solc 0.8.29+commit.ab55807c
Bytecode size
20,125 bytes
Upgradeable proxy
No
Detected patterns
launchpad, liquidity-management, moves-currency, return-delta

Pools using SwingHook