GreedGame
EthereumHookGreedGame is a Uniswap v4 hook on Ethereum. Brand new: its first pool went live today. Still in use: 34 trades in the last week, and 1 new pool this week.
- Contract name
- GreedGame
How this hook works
Liquidity managerA liquidity manager hook. It manages its own liquidity, limits trading to stop bots and keeps rewards to claim.
Manages its own liquidity
It adds and removes liquidity itself, so it can own part or all of the pool.
The code that does this (unlockCallback):function unlockCallback(bytes calldata data) external onlyPoolManager returns (bytes memory) { bool isLaunch = abi.decode(data, (bool)); (int24 lo, int24 hi) = (TickMath.minUsableTick(tickSpacing), TickMath.maxUsableTick(tickSpacing)); PoolKey memory key = poolKey; if (isLaunch) { if (phase != Phase.NotLaunched) revert WrongPhase(); (BalanceDelta d,) = poolManager.modifyLiquidity( key, ModifyLiquidityParams(lo, hi, int256(uint256(liquidity)), bytes32(0)), "" ); uint256 eth = uint256(uint128(-d.amount0())); uint256 greed = uint256(uint128(-d.amount1())); seedEth = eth; poolManager.settle{value: eth}(); poolManager.sync(key.currency1); _transfer(address(this), address(poolManager), greed); poolManager.settle(); return ""; } if (phase != Phase.Ended) revert WrongPhase(); // only settle() removes the position (BalanceDelta out,) = poolManager.modifyLiquidity( key, ModifyLiquidityParams(lo, hi, -int256(uint256(liquidity)), bytes32(0)), "" ); uint256 ethOut = uint256(uint128(out.amount0())); uint256 greedOut = uint256(uint128(out.amount1())); poolManager.take(key.currency0, address(this), ethOut); poolManager.take(key.currency1, address(this), greedOut); return abi.encode(ethOut, greedOut); }Limits on trading
It limits trading, for example a max buy or wallet size or a wait between trades, to stop bots grabbing the supply before real traders.
The code that does this (update):function _update(address from, address to, uint256 value) internal override { if (from == address(this) || to == address(this) || from == address(0) || to == address(0)) { super._update(from, to, value); return; } if (!tradingOpen()) { _requireOpenOrDeployer(); // only the deployer, and only before startTrading() super._update(from, to, value); return; } address pm = address(poolManager); bool isBuy = from == pm; bool isSell = to == pm; uint256 tax = isBuy ? value * TAX_BPS / BPS : 0; uint256 landed = value - tax; // what `to` receives uint256 elapsed = block.timestamp - tradingOpensAt; if (elapsed < ANTI_SNIPE_TIME) { uint256 limit = LIMIT_STEP * (elapsed + 1); if (value > limit) revert MaxTx(); if (!isSell && from != to && balanceOf(to) + landed > limit) revert MaxWallet(); } if (phase == Phase.Active && value != 0) { uint64 n = outNonce[from]; if (n != 0) _onPlayerOut(from, n); if (isBuy) _maybeCredit(to, landed); } // …Rewards to claim
It keeps track of what people have earned, and they claim it themselves.
The code that does this (claimEth):function claimEth() external { uint256 a = owedEth[msg.sender]; if (a == 0) revert NothingOwed(); owedEth[msg.sender] = 0; if (!_sendEth(msg.sender, a, gasleft())) revert PayFailed(); }Rules for adding liquidity
It decides who can add liquidity, or when.
The code that does this (beforeAddLiquidity):function beforeAddLiquidity(address sender, PoolKey calldata, ModifyLiquidityParams calldata, bytes calldata) external view onlyPoolManager returns (bytes4) { if (sender != address(this)) revert NotAllowed(); return IHooks.beforeAddLiquidity.selector; }Only approved callers create pools
New pools with this hook can only be created by approved callers, for example its own factory or launcher.
The code that does this (beforeInitialize):function beforeInitialize(address sender, PoolKey calldata, uint160) external view onlyPoolManager returns (bytes4) { if (sender != address(this)) revert NotAllowed(); return IHooks.beforeInitialize.selector; }No trading before the start
Trades are refused until trading has been opened.
The code that does this (requireOpenOrDeployer):function _requireOpenOrDeployer() private view { uint256 o = tradingOpensAt; if (o == 0) { if (tx.origin != deployer) revert TradingNotOpen(); } else if (block.timestamp < o) { revert TradingNotOpen(); } }
Who controls it: The hook developer can change when trading opens and the wallets that receive its fees. The code cannot be changed.
Based on the hook’s published code.What do these labels mean?
Safety report
Before you build on it. Automated checks, not an auditWhat it can do
Its code executes inside each trade in pools that use it.
It checks every deposit before it goes in.
It runs when a pool is created, often to lock in that pool’s settings.
Hook history
- Burned tax 34 times
Latest transactions
- 0x64abc245…762ada block 26,536,459
- 0x20c87e63…5c3063 block 26,536,453
- 0x8001db2f…904aab block 26,536,453
- 0xbb9fcd43…c06a70 block 26,536,452
- 0xa7d3e49d…76d8eb block 26,536,452
- 0xf54d5381…a439ec block 26,536,451
- 0xe1867e7b…6af38a block 26,536,451
- 0xd3fdfc34…65886c block 26,536,451
- 0x42bb1ebc…8ff222 block 26,536,451
- 0xb5a9cbdf…831cfc block 26,536,449
- A holder staked tokens 24 times
Latest transactions
- 0x20c87e63…5c3063 block 26,536,453
- 0x8001db2f…904aab block 26,536,453
- 0xf54d5381…a439ec block 26,536,451
- 0xe1867e7b…6af38a block 26,536,451
- 0xd3fdfc34…65886c block 26,536,451
- 0xb5a9cbdf…831cfc block 26,536,449
- 0x5c99dd55…128089 block 26,536,449
- 0xe8f0a855…504297 block 26,536,449
- 0xe9f8b8fb…c53e3b block 26,536,449
- 0x00bb46d4…43e86b block 26,536,446
- New leader 9 times
Latest transactions
- 0xbb9fcd43…c06a70 block 26,536,452
- 0xa7d3e49d…76d8eb block 26,536,452
- 0x42bb1ebc…8ff222 block 26,536,451
- 0xecb46fd5…20c769 block 26,536,449
- 0x7c824f23…de9058 block 26,536,446
- 0x77f51d48…25b3d2 block 26,536,445
- 0x7365979b…a79ab4 block 26,536,443
- 0x8ef096ce…e47930 block 26,536,443
- 0x2cbd6da6…c4ac41 block 26,536,442
- Opened trading 1 time
- Launched a new token 1 time
- Took tokens from trades 1 time
Settings changes: settled (1 time).
Counted from what the hook recorded on-chain across all its pools, for every action in its published code, plus token transfers in and out of it.