PokeRaidHookV2 on Ethereum
Uniswap v4 Hook Contract 0xb1160236017bbc3fe961957a785e24efd808c0cc on Ethereum · Rewards · Verified contract
- Volume (24h)
- $0
- Value locked (TVL)
- $8.00K
- All-time volume
- $845.26K
- Pools using this hook
- 1
- Swaps (24h)
- 0 (0 traders)
- Total swaps
- 4,255
What it does
A Uniswap v4 hook on a MONSTER/ETH pool that levies a 1% tax on external buys and sells and routes it into a raid boss game, where buys deal damage, sells heal the boss, and top contributors claim rewards.
How it works step by step
- Charges a 1% tax on the WETH side of MONSTER/ETH swaps in the configured pool via beforeSwap and afterSwap return deltas.
- Blocks external buys during a 10-block launch window after the launch block is set.
- Routes 70% of buy and sell tax to the PokeRaidCore loot pool and 30% of buys or sells to the marketing wallet.
- Credits buy volume as damage against the current raid boss, so loot is distributed pro rata to verified damage on kill.
- Lets authorized routers attribute attacks to users via EIP-712 signatures or a pending attack context, with nonce replay protection.
- Forwards any reserve share to RaidReserve, which accumulates ETH and pays a keeper reward on triggerReserveAction.
- Swap behaviour
- In beforeSwap, external buys of the expected pool are checked against a 10-block launch window and charged a 1% WETH-side return delta. In afterSwap, external sells are charged 1% with a return delta, the WETH side is split into loot and heal, and funds are forwarded to the core game contract and marketing wallet. Router-attributed swaps follow a separate prototype path with signature checks and nonces.
- Liquidity behaviour
- No liquidity callbacks.
- Fee behaviour
- Pool-wide the hook charges a 1% (100 bps) tax on the WETH side of external buys and sells in the expected pool via beforeSwap return delta (buys) and afterSwap return delta (sells). Buy tax splits 70% loot to core, 30% to marketing wallet, 0% reserve (reserve fraction is zero, so reservePart is 0 by constants). Sell tax splits 70% loot, 30% heal to marketing wallet. Router-assisted paths can override or waive fees depending on attribution, and prototype flags can route fees from a prototypeFeeBalance instead.
- Owner & admin controls
- Owner (EOA-style Ownable) can configureExpectedPool, setExpectedPoolId until locked, toggle coreCallPrototypeEnabled and routerAssistedPrototypeEnabled until lockPrototypeModesDisabled, set testnetRouterFeeAdapter, authorizedRouter and trustedAttackRouter until each is locked, fund prototype fees, and transfer or renounce ownership. Core contract has owner-set hook (lockable), trophyNFT, trustedRouter, manualProgressionLocked and an onlyGenesisWallet SettleStuckRaid function that can force a raid to killed state. RaidReserve owner can change keeperRewardBps up to 1% and withdrawEmergency is disabled (always reverts). Owner can also renounce ownership.
Enabled Uniswap v4 callbacks
beforeSwap, afterSwap, beforeSwapReturnDelta, afterSwapReturnDelta
beforeSwap: detects buys of the expected MONSTER/ETH pool and takes 1% of the WETH side as a return delta, blocking external buys during a launch window of 10 blocks after setLaunchBlock. afterSwap: observes swaps, captures sell tax as a return delta, transfers WETH to marketing wallet, unwraps ETH and forwards loot and reserve funds into PokeRaidCore and RaidReserve. beforeSwapReturnDelta and afterSwapReturnDelta: used so the hook can take a fee amount from the swap output. No other callbacks are enabled.
Security & trust assessment
Risk level: high (verified source, medium confidence).
Who controls it: The owner controls which router is trusted to attribute attacks, which pool is treated as expected, and can enable or disable prototype fee modes until locked. The core genesis wallet can call SettleStuckRaid to force raid completion, and the core owner controls the hook pointer until locked. Admin keys can therefore influence reward distribution and raid outcomes, and until locks are applied the owner can repoint trusted routers or the expected pool.
Risk to user funds: The hook takes a 1% tax on the WETH side of external swaps and holds transient WETH and ETH before forwarding it to marketing, core and reserve. A revert in those downstream calls blocks swaps. Users who trade through the authorized router can have fees waived or altered by attribution, and the owner's router choices affect which trades count as raids.
Security findings
- [high] Owner-controlled attribution routers: Owner can change authorizedRouter, trustedAttackRouter, testnetRouterFeeAdapter and expectedPoolId until each is locked. A malicious router set by the owner can attribute attacks to arbitrary users and credit damage.
- [medium] Privileged raid settlement: The core genesis wallet can call SettleStuckRaid to mark a raid killed and set currentHp to zero under conditions that are checked but still discretionary, and this decides who can claim rewards.
- [medium] Swap reverts depend on core and reserve calls: Pulls ETH from hook and forwards tax into an external core and reserve contract. Trading of the expected pool depends on these external contracts succeeding; a failing core call reverts the swap with CoreCallFailed.
- [low] Launch-window buy block: Buys in the first 10 blocks after setLaunchBlock revert for external traders, which can block trading for a window controlled by the core owner.
- [info] Lock-based governance: Ownership and locks are set in separate transactions; several toggles can still be flipped before lock calls, and the contract relies on operational discipline rather than code-enforced finality.
Contract details
- Verified source
- Yes (PokeRaidHookV2)
- Compiler
- solc 0.8.26+commit.8a97fa7a
- Bytecode size
- 20,309 bytes
- Upgradeable proxy
- No
- Detected patterns
- launchpad, moves-currency, oracle, ownable, return-delta, rewards, tax
Pools using PokeRaidHookV2
- POKE / WETH (0.30% fee) — 24h volume $0, TVL $8.00K, 0 swaps today