GremHook on Ethereum
Uniswap v4 Hook Contract 0x6874ac48f36825b7c89673931a7224f06b40a0cc on Ethereum · Fee sharing · Verified contract
- Volume (24h)
- $10.97K
- Value locked (TVL)
- $5.24
- All-time volume
- $10.97K
- Pools using this hook
- 1
- Swaps (24h)
- 33 (17 traders)
- Total swaps
- 33
What it does
Every swap on a Grem coin pool pays a flat 1% fee in ETH regardless of direction, and that fee is later split between the Grem Treasury, the launcher, the coin's council, the coin's treasury and a burner.
How it works step by step
- Takes a flat 1% fee in ETH on every swap of a Grem coin pool and holds it on the PoolManager as ERC-6909 claims
- Records the pool price at the first swap of each block so treasuries and the burner can refuse buys into a same-block price spike
- Anyone can call settle to split a pool's banked ETH fees: 30% pushed to the Grem Treasury wallet, 30% pushed to the launcher, 20% credited to the coin's council, 15% credited to the coin's treasury, 5% credited to the burner
- Credited shares are only paid to their owning contract or wallet via withdraw or withdrawTo
- Failed pushes of revenue or creator shares are queued and can be retried through pushRevenue or withdraw
- Registration of pools is restricted to the factory, and the fee and tick spacing are fixed at constants
- Swap behaviour
- On exact-in buys and exact-out sells, 1% of the ETH side is taken as a specified-side delta in beforeSwap; on exact-out buys and exact-in sells, 1% of the ETH amount is taken from the unspecified side in afterSwap. Every swap pays the same 1% fee; no trade direction pays more or less, and the hook can revert a swap only on an inconsistent amount (PartialFill).
- Liquidity behaviour
- No liquidity callbacks.
- Fee behaviour
- A fixed 1% fee on the ETH side of every swap, held as claims on the PoolManager and banked per pool; the pool's LP fee is 0. The fee cannot be changed. Banked fees are split at settlement: 30% Treasury wallet, 30% launcher, 20% council, 15% coin treasury, 5% burner.
- Owner & admin controls
- No owner or admin role is present. Parameters are immutable constants; poolManager, factory and burner are set once in the constructor. The factory alone can register pools, and the revenue recipient is read from the factory's revenue() getter, which is an external dependency whose behaviour cannot be verified here.
Enabled Uniswap v4 callbacks
beforeInitialize, beforeSwap, afterSwap, beforeSwapReturnDelta, afterSwapReturnDelta
beforeInitialize: restricts pool initialization to the factory and to pools this hook registered. beforeSwap: records the open price of the block and takes the 1% fee when ETH is the specified side. afterSwap: takes the 1% fee from the unspecified ETH side, mints the fee as claims, and emits fee data. beforeSwapReturnDelta and afterSwapReturnDelta: allow the fee to be expressed as hook deltas.
Security & trust assessment
Risk level: medium (verified source, high confidence).
Who controls it: No privileged key can alter fees, pause swaps or move pool funds. The only external authority is the factory, which can register pools and whose revenue() getter controls where the revenue share is sent.
Risk to user funds: The hook holds banked ETH fees as ERC-6909 claims on the PoolManager and can revert swaps only for inconsistent fee amounts. It does not hold user principal beyond the 1% fee, and users' swaps cannot be blocked by an admin.
Security findings
- [info] Hook takes 1% on every swap via return deltas: beforeSwap and afterSwap return specified and unspecified deltas, so the hook takes tokens from every swap; the fee is hard-coded to 100 bps and cannot be changed.
- [medium] Revenue recipient resolved from factory at payout time: _payRevenue calls factory.revenue() on every settle and pushRevenue; if the factory's revenue address is changed by its controller, future revenue shares go to the new address, and the factory is a trusted external dependency not verifiable from this source alone.
- [low] Push-based ETH transfers to arbitrary recipients: settle pushes ETH to the revenue wallet and to the launcher with gas limits of 100000 and 60000; failures are queued in revenueDue or owed, so a reverting recipient cannot block settlement but can delay its own payout.
- [low] Price-check function trusted by treasuries: openPrice exposes the first-swap price of a block for treasuries and the burner to gate buys; any integrator relying on it inherits the assumption that the first trade of a block reflects a fair price.
Contract details
- Verified source
- Yes (GremHook)
- Compiler
- solc 0.8.26+commit.8a97fa7a
- Bytecode size
- 7,261 bytes
- Upgradeable proxy
- No
- Detected patterns
- fee-sharing, launchpad, moves-currency, return-delta, self-unlock
Pools using GremHook
- ETH / GREM (0.00% fee) — 24h volume $10.97K, TVL $5.24, 33 swaps today