Chain Hook: Tame LP glitches in a Web3 pixel-art world using Uniswap v4 Hooks.
In the Chain Hook platformer pixel game, NFT metadata acts as the bridge between the game and the blockchain by identifying a player's specific Uniswap v4 Liquidity Provider (LP) position and its unique PoolKey. Once the position is identified, the game allows players to "tame" market inefficiencies, which triggers Uniswap v4 Hooks—external smart contracts designed to customize and extend the behavior of liquidity pools.
These hooks automatically "fix" and maximize the player's profit through three primary mechanisms:
Each glitch monster is a hook trigger, the second and third one need to be configured in the UI, the game checks for LP on uniswap V4 on wallet connection before starting to play. Monsters: The Volatility Specter represents the market inefficiency of an *Out of Range" liquidity position. When a player defeats this "glitch," it triggers a specific Uniswap hook that rebalances the position into a Full Range state. This ensures that the player's liquidity is constantly utilized to earn fees, regardless of how much the price swings.
The Dip-Vortex is activated when the market price drops below a pre-defined target threshold. By "taming" this glitch, the player triggers an automated buyback protocol. This hook uses the player's accumulated fees to purchase the token during a crash, which serves two purposes: it creates algorithmic support for the price and allows the player to accumulate assets at a discount. The Flash-Drainer arbitrage bot is updated to collect price discrepancies for given token addresses on 5 DEX platforms, uniswap V2, uniswap V3, uniswap V4, aerodrome, sushiswap, pancakeswap and execute the arbitrage with a 10.000$ flashloan on balancer.

