Skip to content

Conversation

PaulElisha
Copy link
Contributor

This PR addresses the known rounding discrepancies between:

Pre-calculated amounts (LiquidityAmounts.getAmountsForLiquidity())
Actual deltas (poolManager.modifyLiquidity())

It includes:
Documentation updates clarifying best practices.

Copy link

vercel bot commented Apr 16, 2025

@PaulElisha is attempting to deploy a commit to the Uniswap Team on Vercel.

A member of the Team first needs to authorize it.

@PaulElisha
Copy link
Contributor Author

cc: @saucepoint

Copy link
Collaborator

@saucepoint saucepoint left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a few things -- we should

  1. Title the section as "Handling Deltas for Liquidity Modifications"
  2. Let's explain why LiquidityAmounts != liquidity delta -- its because the price changed
  3. Let's make it very clear that developers should enforce slippage -- the deltas returned by pool manager are within an acceptable tolerance

@PaulElisha
Copy link
Contributor Author

PaulElisha commented Jun 11, 2025

cc: @saucepoint check it out.

@saucepoint saucepoint merged commit 1eea971 into Uniswap:main Jun 12, 2025
2 of 3 checks passed
@PaulElisha PaulElisha changed the title Docs: handling liquidity amount discrepancies Docs: handling liquidity Delta discrepancies Jun 12, 2025
smblee added a commit to smblee/uniswap-docs that referenced this pull request Jul 22, 2025
…cusaurus_v3

* og/main: (90 commits)
  Add v4 security documentation with SEAL 911 emergency hotline (Uniswap#1019)
  Fix path error on remappings (Uniswap#1001)
  Update 03-swap.mdx (Uniswap#1002)
  You are wraping "key.currency1" into an ERC20 , but it is already a E… (Uniswap#1003)
  fix: typos in docs/contracts/v1/guides/04-custom-linking.md (Uniswap#1004)
  Fix broken background link in pool data guide (Uniswap#1007)
  fix: Update deployments.mdx for Arbitrum sepolia (Uniswap#1008)
  Update deployments.mdx (Uniswap#1009)
  Update AVAX-Deployments.md (Uniswap#1010)
  docs/v3/guides: Update examples repo link (Uniswap#1011)
  replace dead references (Uniswap#1013)
  v4 sdk overview doc (Uniswap#1005)
  fix: yarn build subgraph redirect (Uniswap#1012)
  docs: v4-sdk: minting/fetching/adding/removing position and collecting fee example (Uniswap#992)
  Added advanced guide: fetch pool data & pool creation (Uniswap#997)
  Add v4-subgraph-example guide. Rename and format subgraph-example. Update external links to thegraph explorer and v3-subgraph GitHub (Uniswap#965)
  docs: add v4 quoting & swapping guides (Uniswap#977)
  Docs: handling liquidity amount discrepancies (Uniswap#952)
  doc on the types of fees (Uniswap#1000)
  fix spelling issues  (Uniswap#998)
  ...
smblee added a commit to smblee/uniswap-docs that referenced this pull request Jul 22, 2025
…redesign

* bryan-12-04-upgrade_to_docusaurus_v3: (99 commits)
  Add v4 security documentation with SEAL 911 emergency hotline (Uniswap#1019)
  Fix path error on remappings (Uniswap#1001)
  Update 03-swap.mdx (Uniswap#1002)
  You are wraping "key.currency1" into an ERC20 , but it is already a E… (Uniswap#1003)
  fix: typos in docs/contracts/v1/guides/04-custom-linking.md (Uniswap#1004)
  Fix broken background link in pool data guide (Uniswap#1007)
  fix: Update deployments.mdx for Arbitrum sepolia (Uniswap#1008)
  Update deployments.mdx (Uniswap#1009)
  Update AVAX-Deployments.md (Uniswap#1010)
  docs/v3/guides: Update examples repo link (Uniswap#1011)
  replace dead references (Uniswap#1013)
  v4 sdk overview doc (Uniswap#1005)
  fix: yarn build subgraph redirect (Uniswap#1012)
  docs: v4-sdk: minting/fetching/adding/removing position and collecting fee example (Uniswap#992)
  Added advanced guide: fetch pool data & pool creation (Uniswap#997)
  Add v4-subgraph-example guide. Rename and format subgraph-example. Update external links to thegraph explorer and v3-subgraph GitHub (Uniswap#965)
  docs: add v4 quoting & swapping guides (Uniswap#977)
  Docs: handling liquidity amount discrepancies (Uniswap#952)
  doc on the types of fees (Uniswap#1000)
  fix spelling issues  (Uniswap#998)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants