Skip to content

fix: correct getLiquidity docstring to reflect active liquidity#1015

Open
ionodeionode wants to merge 1 commit intoUniswap:mainfrom
ionodeionode:fix/get-liquidity-docstring
Open

fix: correct getLiquidity docstring to reflect active liquidity#1015
ionodeionode wants to merge 1 commit intoUniswap:mainfrom
ionodeionode:fix/get-liquidity-docstring

Conversation

@ionodeionode
Copy link
Copy Markdown

Summary

Closes #984

The getLiquidity function's natspec docstring stated it "retrieves total the liquidity" but the function actually returns the active liquidity at the pool's current tick (pools[poolId].liquidity), not the total liquidity across all positions.

Single-sided liquidity positions outside the current tick range are not included in this value. Updated the docstring to accurately describe this behavior and avoid confusion.

The docstring previously stated it retrieves 'total the liquidity'
but the function returns the active liquidity at the current tick,
not the total liquidity across all positions/ticks.

Closes Uniswap#984
@ionodeionode ionodeionode requested a review from a team as a code owner February 24, 2026 07:25
@ionodeionode
Copy link
Copy Markdown
Author

Closing to manage open PR count. Will revisit when capacity allows.

@ionodeionode ionodeionode reopened this Mar 4, 2026
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.

[Bug]: StateLibrary.getLiquidity docstring is incorrect

1 participant