GuardHook on Robinhood Chain
Uniswap v4 Hook Contract 0xfceb538113caa2931da86b389da5bab70c2f4044 on Robinhood Chain · Fee sharing · Verified contract
- Volume (24h)
- $381
- Value locked (TVL)
- $1.69K
- All-time volume
- $553.17K
- Pools using this hook
- 1
- Swaps (24h)
- 7 (7 traders)
- Total swaps
- 16,400
What it does
Buyers of GUARD pay a 1% tax, which is burned, and sellers pay a 2% tax, which goes to the treasury in the pair token, with both rates fixed at deployment.
How it works step by step
- Implements a buy and sell tax on the $GUARD pool via afterSwap, taking the fee from the swap's unspecified currency
- Charges 1% on buys (swapper receives GUARD) and 2% on sells (swapper sends GUARD), with rates fixed at construction and capped at 5%
- Burns the fee when it is denominated in GUARD by calling burn on the GUARD token
- Sends the fee to the treasury when it is denominated in the pair token (e.g. USDG or ETH)
- Reverts with WrongPool if the pool does not contain GUARD as one of its two currencies
- Uses return deltas so the PoolManager accounting nets to zero, avoiding the fee-on-transfer token revert problem
- Swap behaviour
- On every swap in the GUARD pool, afterSwap computes a fee on the unspecified side of the swap. Buys (swapper receives GUARD) pay 1% of the moved amount; sells (swapper sends GUARD) pay 2%. Swaps where the fee rounds to zero pass through untouched. Swaps in pools that do not contain GUARD revert.
- Liquidity behaviour
- No liquidity callbacks.
- Fee behaviour
- Uses the pool's static fee for the LP fee, plus a hook-level tax: 1% charged on buys and 2% charged on sells, taken via afterSwapReturnDelta. GUARD-denominated fees are burned; pair-token fees go to the treasury. Rates are immutable.
- Owner & admin controls
- No owner, no setter and no upgrade path. Buy rate, sell rate, GUARD address and treasury address are all immutable constructor parameters. The only privileged address is the treasury, which receives pair-token fees.
Enabled Uniswap v4 callbacks
afterSwap, afterSwapReturnDelta
afterSwap is used to compute and take the buy/sell tax after each swap. afterSwapReturnDelta is used to return the fee amount so it is netted out of the swapper's proceeds.
Security & trust assessment
Risk level: medium (verified source, high confidence).
Who controls it: No privileged key can change rates, pause swaps or upgrade the hook. The treasury address receives pair-token fees immutably and cannot alter the tax logic.
Risk to user funds: The hook does not hold user funds long-term; it takes the fee during the swap via the PoolManager and either burns it or forwards it to the treasury in the same transaction. The tax reduces swap proceeds for buyers and sellers by 1% or 2% of the moved amount.
Security findings
- [info] Hook takes a share of swap output via return delta: afterSwapReturnDelta lets the hook reduce the swapper's received amount by 1% on buys and 2% on sells. This is the intended tax mechanism and is fixed at deploy time.
- [low] Hook calls burn on the GUARD token: The hook calls IGuardBurnable.burn on the GUARD token. If the GUARD token's burn function is restricted or changed, fee collection in GUARD could revert and block swaps; the hook holds no admin role over the token that could fix this.
- [info] Fee taken from unspecified currency assumes exactly one GUARD side: The hook reverts with WrongPool for pools without GUARD, so it cannot be misused on other pairs, but a pool containing GUARD on both sides is impossible by construction.
- [low] Pair-token fees depend on treasury address accepting transfers: poolManager.take sends pair-token fees directly to the treasury; if the treasury is a contract that reverts on receipt, sells would fail.
Contract details
- Verified source
- Yes (GuardHook)
- Compiler
- solc 0.8.26+commit.8a97fa7a
- Bytecode size
- 4,241 bytes
- Upgradeable proxy
- No
- Detected patterns
- return-delta
Pools using GuardHook
- WETH / GUARD (0.30% fee) — 24h volume $381, TVL $1.69K, 7 swaps today