Uniswap / Uniswap/interface

[Bug] Incorrectly High Price Impact Displayed for Pools with Hook-Based Fees

Open
#7,971 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
TypeScript
Stars
5.5k
Forks
5.4k
PR merge metrics
No merged PRs in 30d

Description

📱 Interface Affected

Which application are you experiencing issues with?


🧩 App Version

  • Version (if known):
  • Production build
  • Development build

💻 System / Environment Info

Please provide details about your environment:

  • Browser (name + version): chrome
  • OS / Platform (e.g. iOS 17, Windows 11, Android 14): macos
  • Device (e.g. iPhone 14 Pro, Pixel 7, MacBook Pro 2023): macbook m4
  • Wallet used (e.g. Uniswap Wallet, MetaMask, Rainbow): metamask
  • Network (e.g. Ethereum Mainnet, Arbitrum, Base, etc.): mainnet

🔁 Steps to Reproduce

  1. Navigate to the swap interface for a pool that utilizes a hook for its fees.
  2. Example Pool: https://app.uniswap.org/explore/tokens/ethereum/0xd0cC2b0eFb168bFe1f94a948D8df70FA10257196?inputCurrency=NATIVE
  3. Enter any amount for the input token (e.g., 0.01 ETH).

✅ Expected Behavior

The price impact should dynamically reflect the actual slippage based on the input amount relative to the pool's liquidity. For a small trade, this value should be low.


❌ Actual Behavior

The UI displays a static, high price impact (10% in the provided example) regardless of the input trade size. This suggests the fee from the hook might be being misinterpreted as price impact.


📸 Screenshots or Screen Recording

Image showing 10% price impact

🧾 Additional Context

Any extra details? (e.g. logs, error messages, recent updates, beta flags enabled, etc.)


⚠️ Please redact or avoid sharing sensitive data such as private keys, seed phrases, or personally identifying info.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the issue in the swap interface using the linked example pool and a small ETH amount. Trace how the web app calculates and displays price impact for pools with hook-based fees; done means the displayed impact changes with trade size and no longer shows a static 10% for the example.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
blockchain, frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.