Dynamic fee hook on Arc
Uniswap v4 Hook Contract 0x586970cc49e6c0fa4c986972d7544cdda58ac0c0 on Arc · Dynamic fee
- Volume (24h)
- $0
- Value locked (TVL)
- $0
- All-time volume
- $0
- Pools using this hook
- 1
- Swaps (24h)
- 1 (1 traders)
- Total swaps
- 1
What it does
This hook sets swap fees dynamically from owner-configured parameters, with quoter addresses on an allowlist affecting swap handling, though the exact fee direction per trade cannot be confirmed from bytecode alone.
How it works step by step
- Stores four uint24 fee parameters in a single storage slot (slot 0, packed at offsets 20, 23, 26, 29), set by the owner through setFees.
- Exposes quoteFee() and settleFee() views that return fee values read from the packed fee slot.
- Maintains a quoter allowlist (mapping at slot 1) managed by setQuoter and checked by isQuoter and beforeSwap.
- Runs logic in beforeSwap that reads the packed fee parameters and a quoter check, and runs afterSwap with no evident state changes beyond what is decoded.
- Holds an owner address in slot 0 and a manager() getter, with ownership-gated setters.
- Swap behaviour
- beforeSwap reads the packed fee parameters and checks the quoter mapping, so it likely gates or prices swaps based on whether the sender is an allowlisted quoter; afterSwap is also called on each swap. Which trades pay more or less cannot be determined from decoded bytecode alone.
- Liquidity behaviour
- No liquidity callbacks.
- Fee behaviour
- Fees are dynamic: four uint24 values are stored and updated by the owner via setFees, and beforeSwap reads them to determine the swap fee; the exact per-direction mapping of the four values is not determinable without source.
- Owner & admin controls
- An owner (slot 0 address, owner() getter) can call setFees to change all four fee parameters and setQuoter to add or remove quoters; a manager() getter also exists. Whether the owner can pause or upgrade cannot be determined from the decoded selectors.
Enabled Uniswap v4 callbacks
beforeSwap, afterSwap
beforeSwap is used to read the fee parameters and check quoter status to set the dynamic fee for a swap; afterSwap is enabled and called after each swap, with its use not fully determinable from bytecode.
Security & trust assessment
Risk level: medium, estimated (decoded bytecode, medium confidence).
Who controls it: A single owner key can set all fee parameters to any uint24 value and add or remove quoters, which directly affects swap pricing for every trader using the pool.
Risk to user funds: The hook does not clearly hold user tokens from the decoded functions, but fee changes can cost swappers value; whether it can take or block funds via return deltas is not determinable from bytecode alone.
Security findings
- [medium] Owner can set fee parameters: setFees is ownership-gated and accepts arbitrary uint24 values, so the owner could set the swap fee high enough to make swaps extremely expensive for traders.
- [medium] Quoter allowlist controls swap path: beforeSwap consults the quoter mapping written by setQuoter; an owner can grant or revoke quoter status, potentially changing which callers receive favourable pricing or are blocked.
- [info] Return-delta and afterSwap behaviour unknown: afterSwap is enabled but the decoded bytecode does not reveal whether it returns a delta that moves currency; this could not be verified without source.
Contract details
- Verified source
- No
- Bytecode size
- 3,903 bytes
- Upgradeable proxy
- No
- Detected patterns
- dynamic-fee, ownable