AGLHook on Ethereum

Uniswap v4 Hook Contract 0xa61d74d6362699b76b21ef3016649a58d27be0cc on Ethereum · Launchpad · Verified contract

Volume (24h)
$81.73K
Value locked (TVL)
$703.88K
All-time volume
$3.45M
Pools using this hook
1
Swaps (24h)
103 (77 traders)
Total swaps
3,918

What it does

Charges a launch-decaying fee in ETH on every AGL swap, paid out to a fixed fund wallet, with buys starting at 99% and settling to 10% over 89 minutes.

How it works step by step

  • Charges a fee in ETH on every swap of the ETH/AGL pool, using ERC-6909 claims rather than real ETH transfers during the swap
  • Decays the buy fee from 99% to 10% at one percentage point per minute over 89 minutes after AGL.openTrading
  • Holds sell fees flat at 10% from the first second
  • Lets anyone call claim() to redeem accrued fees to the immutable xautFundWallet
  • Exempts a fixed set of addresses from the fee, set at construction and not changeable
Swap behaviour
On each swap the hook charges a fee in ETH: beforeSwap handles swaps where ETH is the specified currency, afterSwap handles the other shapes, and the fee is recorded as an ERC-6909 claim redeemable via claim().
Liquidity behaviour
No liquidity callbacks. The AGL token opens the pool with the entire supply as one-sided liquidity in a position minted to the AGL contract, which has no function to move or burn it.
Fee behaviour
Charges a fee in ETH on every swap touching the pool: buys decay from 99% to 10% over 89 minutes after launch (LaunchFee.buyFeeBps), sells flat at 10%. Fee is taken via beforeSwap or afterSwap depending on which side is specified, booked as an ERC-6909 claim (poolManager.mint) and redeemable by anyone through claim() to the immutable xautFundWallet. Fee-exempt addresses set at construction pay nothing.
Owner & admin controls
Owner (AGL token owner, not the hook) can only open trading once; the hook itself has no owner and no setters. xautFundWallet and feeExempt set at deployment; claim() is permissionless and always pays xautFundWallet. No upgrade, pause or parameter change functions in the hook.

Enabled Uniswap v4 callbacks

beforeInitialize, beforeSwap, afterSwap, beforeSwapReturnDelta, afterSwapReturnDelta

beforeInitialize: binds the hook to exactly one ETH/AGL pool created inside AGL.openTrading. beforeSwap: charges the fee when ETH is the specified currency and records the fee as an ERC-6909 claim. afterSwap: charges the fee when ETH is the unspecified currency and returns the matching delta. beforeSwapReturnDelta and afterSwapReturnDelta: allow the hook to take ETH from the swapper's delta to fund the fee.

Security & trust assessment

Risk level: medium (verified source, high confidence).

Who controls it: No privileged key controls the hook after deployment: fee schedule, recipient, and exemptions are immutable and no setters exist. The AGL owner can only call openTrading once and cannot alter the hook, fee, or liquidity. Centralization risk is limited to the immutable xautFundWallet receiving all fees.

Risk to user funds: The hook holds ETH only as an ERC-6909 claim inside the PoolManager and never custodies user funds directly; fees are taken from swap deltas and can only be withdrawn to xautFundWallet. The hook cannot block swaps, move pool liquidity, or touch AGL balances. Swappers can lose up to the full fee amount per trade.

Security findings

  • [info] Very high swap fee by design: The hook takes 10% (after decay, up to 99% on buys in the first minutes) of every swap in ETH and credits it to a single immutable wallet, so traders bear the full fee cost with no cap other than the schedule itself.
  • [low] Fee recipient depends on a single immutable address: Fee is pushed to a claim balance rather than transferred; if xautFundWallet cannot receive ETH, claim() reverts but swaps are unaffected. Owed amount is tracked in a single uint256 and drained entirely on claim.
  • [low] Hook binding depends on AGL ordering: Pool binding relies on checking agl.hook() and agl.launchTs() during a single transaction; a bug in the AGL openTrading ordering could allow binding to an unintended pool, but the source reverts on mismatched price and keys.
  • [medium] Contract self-described as unfinished and unaudited: Source states the contract is not finished and must not be deployed, and that the settlement paths were not exercised against a live PoolManager. The deployed bytecode matches this unaudited source.

Contract details

Verified source
Yes (AGLHook)
Compiler
solc 0.8.37+commit.f401782d
Bytecode size
5,787 bytes
Upgradeable proxy
No
Detected patterns
erc6909-claims, launchpad, moves-currency, return-delta, self-unlock

Pools using AGLHook