OneWayBidHook on Ethereum

Uniswap v4 Hook Contract 0xa13efb1a3bc0d33ef1d8b5ef3404996c5ebe8080 on Ethereum · Dynamic fee · Verified contract

Volume (24h)
$465
Value locked (TVL)
$3.84K
All-time volume
$465
Pools using this hook
1
Swaps (24h)
2 (2 traders)
Total swaps
2

What it does

A one-way dynamic-fee pool hook for accumulatedToken: sells of the token pay a low fee while buys pay a high fee (30% initially), so liquidity ratchets toward accumulating the token and rebounds are unprofitable to buyers.

How it works step by step

  • Determines swap direction by comparing whether currency0 is accumulatedToken against zeroForOne.
  • Applies allowedDirectionFee to sales of accumulatedToken into the pool.
  • Applies blockedDirectionFee (intended 30%) to purchases of accumulatedToken out of the pool, economically discouraging buys.
  • Returns the fee with the OVERRIDE_FEE_FLAG so the pool uses the hook fee per swap.
  • Lets the owner adjust both fees within 0.3% to 99% without redeploying or migrating liquidity.
Swap behaviour
On every swap, beforeSwap checks whether the swap delivers accumulatedToken into the pool (a sale) and applies allowedDirectionFee, otherwise (a purchase) applies blockedDirectionFee. Swaps are never reverted by the hook itself.
Liquidity behaviour
No liquidity callbacks.
Fee behaviour
Dynamic LP fee overridden on every swap in beforeSwap: sell direction of accumulatedToken uses allowedDirectionFee (default would be whatever set at deploy), buy direction uses blockedDirectionFee (intended 30%, initial value set via constructor). Fees are returned with OVERRIDE_FEE_FLAG; the pool must be initialized with the dynamic fee flag or the override reverts. Fees are paid to LPs by the pool, not taken by the hook.
Owner & admin controls
Owner (set at construction, transferable via transferOwnership) can call setAllowedFee and setBlockedFee to change the swap fee in each direction within [0.3%, 99%] with immediate effect on the next swap; can transfer ownership to any non-zero address. No pause, no upgrade proxy, no withdrawal function found.

Enabled Uniswap v4 callbacks

beforeSwap

beforeSwap only: determines swap direction relative to accumulatedToken and returns the direction-specific fee override. No return delta, so the hook does not take or hold tokens.

Security & trust assessment

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

Who controls it: The owner can set the blocked-direction fee to 0.3% (making buys cheap) or the allowed-direction fee to 99% (making sells nearly worthless), changing economics for all LPs and traders instantly. Ownership can be moved to an arbitrary address with no timelock.

Risk to user funds: The hook does not hold, move or withhold tokens; funds remain in the PoolManager and LP positions. Exposure is economic: the owner can reprice swaps, which affects traders and LPs but cannot seize principal.

Security findings

  • [medium] Instant owner-controlled fee changes: The owner can change both fees within a wide range at any time with no timelock or delay, altering trade outcomes for every swapper and the value of LP positions.
  • [medium] Owner can disable the one-way mechanism: Setting the blocked-direction fee to its minimum of 0.3% removes the intended one-way restriction, allowing buys of accumulatedToken at near-normal cost.
  • [low] Single-key ownership without timelock: The owner is a single EOA or address with no multisig requirement enforced by the contract; ownership transfer is immediate to any non-zero address.
  • [info] Dynamic fee initialization requirement: Pool must be initialized with the dynamic fee flag; initializing with a static fee causes the override to revert, so the pool cannot function as intended if misconfigured.
  • [info] No custody of pool funds: The contract does not hold tokens and has no return delta, so it cannot custody or block user funds directly.

Contract details

Verified source
Yes (OneWayBidHook)
Compiler
solc 0.8.26+commit.8a97fa7a
Bytecode size
2,917 bytes
Upgradeable proxy
No
Detected patterns
ownable

Pools using OneWayBidHook