Skip to content

docs: clarify ReservesLens coreAmount0/1 cover the whole curve, not in-range depth - #1145

Open
david-uniswap wants to merge 1 commit into
mainfrom
fix/reserves-lens-core-amount-semantics
Open

docs: clarify ReservesLens coreAmount0/1 cover the whole curve, not in-range depth#1145
david-uniswap wants to merge 1 commit into
mainfrom
fix/reserves-lens-core-amount-semantics

Conversation

@david-uniswap

Copy link
Copy Markdown

The reading-pool-reserves guide implied coreAmount0/1 are in-range swappable depth ("token amounts represented by the liquidity curve at the current price", "the honest swappable-depth number"). That's not what the lens computes: it walks every initialized tick and converts all positions (in and out of range) back to raw token amounts. The current price only determines the token0/token1 split of the one range that straddles it.

Changes:

  • clarify the coreAmount0/1 row: whole curve, all positions, current price just sets the split of the straddling range
  • add a Reserve Semantics bullet spelling this out, and point people at activeLiquidity if they want swappable depth at the current price
  • drop the "swappable depth" phrasing from the custom-accounting row and the subgraph comparison

Matches the NatSpec in v4-periphery IReservesLens.sol ("liquidity principal at the current price... exclude uncollected LP fees, protocol fees, donations, and hook-managed assets").

🤖 Generated with Claude Code

…n-range depth

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown

Thanks for contributing to Uniswap Docs! 🦄

Quick heads up on how this repo works: the docs you see on developers.uniswap.org are built from a separate source repo. When we accept a change here, we port it over there, so your fix might show up on the live site before it lands in this repo.

Updates to this repo come in batches on a regular cadence. When yours is included, you'll be credited as a co-author on the commit, so the contribution counts on your GitHub profile and in Uniswap/docs.

We review every PR but can't merge everything. Either way, someone from the docs team will follow up here once we've taken a look.

One legal bit: by submitting a PR you agree your contribution is licensed under the repo's MIT license.

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.

1 participant