CasinoHook on Ethereum

Uniswap v4 Hook Contract 0x3d10a53b14dd315cb30272a8b5e8f8e6946d20cc on Ethereum · Access control · Verified contract

Volume (24h)
$0
Value locked (TVL)
$8.46K
All-time volume
$1.21M
Pools using this hook
1
Swaps (24h)
0 (0 traders)
Total swaps
6,403

What it does

Casino hook that skims a share of swaps into a house reserve and gives eligible buys and sells a Chainlink VRF-driven payout roll, plus fixed fees and DEGEN burns.

How it works step by step

  • Takes a fixed side-game fee on exact-input ETH buys and sends it to an immutable vault
  • Burns 1% of the DEGEN side on every swap mode via poolManager.take and burn
  • Skims 20% of eligible swap output into Reserve and requests a Chainlink VRF word per roll
  • Records every exact-input buy in TicketStore and enters jackpot and last-buyer games
  • Resolves tickets from VRF words with buy multipliers up to 9.2x and sell refunds with 1% minimum fee
  • Lets owners claim, double-or-nothing elect, or be swept after a 7-day window
Swap behaviour
Buy-side exact-input swaps route a fixed side-game fee and a VRF request fee, burn 1% of DEGEN, record a buy receipt and may mint a roll ticket. Sell-side swaps are rolled when eligible: 20% of ETH output is skimmed into Reserve and a roll ticket is minted. Exact-output swaps only burn the DEGEN fraction.
Liquidity behaviour
No liquidity callbacks. Liquidity add and remove are not hooked. Reserve capital is held by the Reserve contract, not in the pool; the hook takes skim amounts from swap outputs into Reserve.
Fee behaviour
Buys route a fixed sideGameFeeBps (capped at 5%) to an immutable side-game vault and a user-funded VRF request fee on exact-input buys. Every swap mode burns 1% of the DEGEN side (taken via poolManager.take and burned). The casino pool itself uses the pool's fee, which is set at initialize.
Owner & admin controls
Only the deployer (set at initialize) can call initOracle once and remediateBuyOne once; the deployer also gates beforeInitialize so only the configured deployer can set the launch price. Reserve and TicketStore hook wiring is one-time via initHook gated to their deployers. There are no pause, fee-setting or parameter-setter functions. The proxy is upgradeable: the implementation address can be replaced before freeze, which could change all hook logic. Reserve and TicketStore have no owner setters.

Enabled Uniswap v4 callbacks

beforeInitialize, beforeSwap, afterSwap, beforeSwapReturnDelta, afterSwapReturnDelta

beforeInitialize restricts pool initialization to the deployer. beforeSwap routes the buy-side side-game fee and VRF fee and burns the DEGEN fraction. afterSwap records buy receipts, escrows a 20% skim into Reserve, requests Chainlink VRF randomness for each rollable swap, and pokes the TWAP oracle. beforeSwapReturnDelta and afterSwapReturnDelta let the hook take value from swaps.

Security & trust assessment

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

Who controls it: The deployer controls only one-time wiring and the launch price, but the upgradeable proxy lets whoever controls the implementation upgrade path change all logic that holds user and reserve funds. Pool blocking is not present, so no key can freeze swaps directly, but a malicious implementation could redirect skims or pay out arbitrarily.

Risk to user funds: The hook and Reserve custody house and user-claim value. Buy and sell swaps send skims, VRF fees and burns through the hook, and resolved claims are paid out of Reserve. An upgraded implementation or a Reserve shortfall could affect these funds.

Security findings

  • [high] Upgradeable implementation: The hook is a proxy whose implementation address can be changed before freeze. A malicious or buggy upgrade could alter payout, fee or custody logic for all funds held by the hook and Reserve.
  • [medium] Hook holds and moves swap value: The hook takes DEGEN and ETH via return deltas on buys and sells, and holds VRF fees and tickets. Reserve holds the house bank and pays claims, so swaps that cannot be rolled still pass through the hook's accounting.
  • [medium] Dependence on external VRF and legacy adapter: Payouts depend on Chainlink VRF words delivered through an adapter, with a legacy adapter also accepted for old requests. Compromise or outage of the VRF path could block resolution, and tickets expire unpaid after the claim window.
  • [low] Reserve solvency depends on game economics: Reserve payouts are capped at 10% of the paying balance and haircut by reserve health, which limits drain per claim but means the house bank can be depleted by a sequence of winning buys.

Contract details

Verified source
Yes (CasinoHook)
Compiler
solc 0.8.26+commit.8a97fa7a
Bytecode size
1,160 bytes
Upgradeable proxy
Yes
Detected patterns
liquidity-management, moves-currency, oracle, return-delta, upgradeable

Pools using CasinoHook