LPHook on Robinhood Chain
Uniswap v4 Hook Contract 0xb6d2c8a9bbd0468e2904a7e9b3ab3de36e07c500 on Robinhood Chain · Rewards · Verified contract
- Volume (24h)
- $0
- Value locked (TVL)
- $227.94K
- All-time volume
- $0
- Pools using this hook
- 1
- Swaps (24h)
- 8 (6 traders)
- Total swaps
- 849
What it does
A bookkeeping hook for the GAGE/sGAGE pool that notifies the LPRewards contract whenever a PositionManager position is added to or removed from liquidity, so LP rewards stay current without affecting trades or fees.
How it works step by step
- Enabled only for afterAddLiquidity and afterRemoveLiquidity; all other hook flags are unset.
- Records only when msg.sender is the PoolManager and the sender is the PositionManager.
- Uses the position tokenId carried in the ModifyLiquidityParams salt, so positions cannot be spoofed.
- Forwards each change to LPRewards.onLiquidityChange with a fixed 400,000 gas limit inside try/catch.
- Emits LiquidityChangeRecorded on success or RecordFailed on failure and never reverts or returns a delta.
- Swap behaviour
- No swap callbacks.
- Liquidity behaviour
- After liquidity is added or removed through the PositionManager, the hook calls LPRewards.onLiquidityChange(tokenId) with a fixed 400,000 gas stipend inside a try/catch, emitting LiquidityChangeRecorded or RecordFailed. Calls from any other sender are ignored and the hook never reverts or moves funds.
- Fee behaviour
- Uses the pool's static fee. The hook never sets, takes or shares fees and returns zero deltas.
- Owner & admin controls
- Only the deployer address (set as DEPLOYER at construction) can call setLPRewards, and only once; after that the hook has no owner, pause, upgrade or parameter controls.
Enabled Uniswap v4 callbacks
afterAddLiquidity, afterRemoveLiquidity
afterAddLiquidity: records a liquidity-add checkpoint for the tokenId to LPRewards. afterRemoveLiquidity: records a liquidity-remove checkpoint for the tokenId to LPRewards. All other callbacks are disabled and revert with HookNotImplemented if ever reached.
Security & trust assessment
Risk level: low (verified source, high confidence).
Who controls it: The deployer can set the LPRewards address exactly once; a wrong address would make the hook's checkpoints point to an unintended contract, but the deployer cannot change it afterwards or pause, drain or alter pool behaviour.
Risk to user funds: The hook holds no tokens, returns zero deltas and cannot move pool or user funds. Its only effect is signalling LPRewards about tokenId changes, so user funds are exposed only indirectly through the separate LPRewards contract.
Security findings
- [info] One-time immutable wiring of LPRewards: setLPRewards can be called only once by DEPLOYER and reverts with AlreadySet afterward, so the rewards target is fixed after initialization.
- [info] Callbacks never revert user liquidity operations: The hook makes an external call into LPRewards on every liquidity change, bounded by a 400,000 gas stipend, and failures are caught and emitted rather than reverted, so liquidity operations cannot be blocked by the rewards contract.
- [low] Non-PositionManager liquidity is not rewarded: Only liquidity added or removed with the PositionManager as sender is recorded; liquidity added by other means earns no rewards, which is an intentional design choice rather than a fault.
- [low] Silent checkpoint failure can leave weights stale: If LPRewards fails inside the try block, the event RecordFailed is emitted and the checkpoint is skipped, so a position's weight may lag until the next checkpoint or collect.
Contract details
- Verified source
- Yes (LPHook)
- Compiler
- solc 0.8.28+commit.7893614a
- Bytecode size
- 3,461 bytes
- Upgradeable proxy
- No
- Detected patterns
- rewards
Pools using LPHook
- GAGE / sGAGE (3.00% fee) — 24h volume $0, TVL $227.94K, 8 swaps today