PrismHook on Ethereum

Uniswap v4 Hook Contract 0xbd3ab5859f244cc9f51ee0ca755c5cf663d80040 on Ethereum · Fee sharing · Verified contract

Volume (24h)
$4.00
Value locked (TVL)
$4.74K
All-time volume
$16.29M
Pools using this hook
2
Swaps (24h)
1 (1 traders)
Total swaps
36,216

What it does

PrismHook is a single-pool fee-sharing hook where the hook itself provides liquidity and distributes the pool's LP fees to holders of 5000 PRISM-backed NFT facets.

How it works step by step

  • Seeds one Uniswap v4 pool with 1% fee through the POSM position manager, minting 5000 PRISM against the hook's own liquidity
  • Holds the LP position and collects accrued fees on demand via pokeFees() which decreases liquidity by zero to harvest fees
  • Distributes collected ETH and PRISM fees per share using monotonic accumulators scaled by 1e12
  • Mints, burns and moves NFT facets so that each full 1 PRISM balance corresponds to one NFT entitled to fee shares
  • Lets holders claim fees per tokenId or withdraw pending balances, with ETH falling back to pending credit on failed transfers
Swap behaviour
afterSwap only returns its selector with zero delta; trades are not altered or taxed, and the hook does not take tokens during swaps.
Liquidity behaviour
No liquidity callbacks are enabled. The hook itself is the sole LP: seed() mints one full-range-style position for the owner-chosen tick range through POSM, and pokeFees() removes only fee income (liquidity amount zero) from it. Each 1 PRISM ERC-20 held corresponds to one NFT facet; transfers realign NFT ownership to balances.
Fee behaviour
Pool fee is the static POOL_FEE of 1% (10000 bps). The hook does not change fees. It periodically calls pokeFees(), which decreases liquidity on its own POSM position to collect accrued LP fees in ETH and PRISM, then distributes them per NFT share through accFeesPerShareETH and accFeesPerSharePRISM accumulators, claimable via claim/claimMany or withdrawn as pending balances.
Owner & admin controls
Owner (Solady Ownable) can call seed() once to create the single POSM position and set the global tick range; owner can transfer or renounce ownership with a two-step handover. Owner has no function to change fees, pause, upgrade or withdraw pool funds, and the contract is not a proxy.

Enabled Uniswap v4 callbacks

afterSwap

afterSwap is the only enabled callback and returns the selector with a zero delta; it does not modify swap amounts, take tokens or block trades.

Security & trust assessment

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

Who controls it: The owner can only seed the pool once and transfer ownership; seed() performs a one-time mint and does not grant withdrawal rights. The owner cannot move pool liquidity or user fee balances, so centralization risk is limited to the initial seed parameters (tick range and price) and ownership of the deployment.

Risk to user funds: The hook custodies all liquidity of its single pool plus accrued fees and holds PRISM supply; users' claims are paid from fees collected via pokeFees() and pending balances. There is no admin function to withdraw pool or fee funds, but correctness depends on POSM and PoolManager behaving as expected.

Security findings

  • [info] Hook is the sole LP and fee custodian: The contract holds the full LP position on POSM and fee accounting; pokeFees() is public and called inside claim paths, so a malicious or buggy POSM/PoolManager interaction could affect fee collection, but the addresses are fixed immutables set in the constructor.
  • [low] Unbounded loops during ERC20 transfer realignment: pokeFees() and _realignPair/_realignSolo loop over NFTs per user; transfers of many facets iterate over balances, so gas costs can grow with holdings, potentially causing transfers to run out of gas for very large holders.
  • [low] One-time seed parameters set by owner: The owner-chosen seed() sets the initial sqrtPriceX96 and tick range once; a poor price or range choice at seeding is irreversible, though the owner cannot later alter the pool.
  • [info] Reentrancy guarded external payouts: Withdrawals of ETH use low-level call with require, and claim paths fall back to pendingETH on failure, reducing reentrancy and griefing risk; nonReentrant guards are applied to claim and withdraw functions.

Contract details

Verified source
Yes (PrismHook)
Compiler
solc 0.8.26+commit.8a97fa7a
Bytecode size
19,741 bytes
Upgradeable proxy
No
Detected patterns
access-control, erc20, ownable

Pools using PrismHook