Skip to content

OracleHookWithV3Adapters: M-07 document the V3 adapter compatibility limits - #175

Merged
gonzaotc merged 2 commits into
masterfrom
oracle-v3-compat-docs
Sep 25, 2026
Merged

gonzaotc merged 2 commits into
masterfrom
oracle-v3-compat-docs

Conversation

@gonzaotc

@gonzaotc gonzaotc commented Sep 7, 2026 •

Copy link
Copy Markdown
Collaborator

The adapters do not record secondsPerLiquidityCumulativeX128 and return a zero-filled array. OracleLibrary.consult divides by that zero delta and reverts, so the "seamless migration path from V3 oracles to V4" claim is wrong. This PR drops it and scopes the compatibility claim to the four functions the adapters implement.

Documents the remaining placeholders: feeProtocol, unlocked and its inverted V4 polarity, and the truncated adapter's raw tick and sqrtPriceX96. Also corrects increaseObservationCardinalityNext, which said the oracle stores liquidity observations.

No logic changes. Two tests pin the zeros.

Closes M-07.

@netlify

netlify Bot commented Sep 7, 2026 •

Copy link
Copy Markdown

❌ Deploy Preview for uniswap-hooks failed. Why did it fail? →

Name Link
🔨 Latest commit 43d9e77
🔍 Latest deploy log https://app.netlify.com/projects/uniswap-hooks/deploys/6ab6d9a77285860008d1fd5c

@netlify

netlify Bot commented Sep 7, 2026 •

Copy link
Copy Markdown

❌ Deploy Preview for uniswap-hooks-docs failed. Why did it fail? →

Name Link
🔨 Latest commit 7ad6e25
🔍 Latest deploy log https://app.netlify.com/projects/uniswap-hooks-docs/deploys/6aa1a5a685ce350008a87888

@gonzaotc
gonzaotc force-pushed the oracle-v3-compat-docs branch from 0c4861a to e576391 Compare September 8, 2026 20:17
@gonzaotc
gonzaotc marked this pull request as ready for review September 8, 2026 20:27
The adapters do not record `secondsPerLiquidityCumulativeX128` and return
a zero-filled array. `OracleLibrary.consult` divides by that zero delta
and reverts.

State the limits where the zero array is built, and correct "always empty
in V4", which is the detail that lets a length check pass. Document the
remaining `slot0` placeholders: `feeProtocol`, `unlocked` and its inverted
V4 polarity, and the truncated adapter's raw tick. Point tick-only
consumers at `BaseOracleHook.observe`, which carries no placeholder
fields, and add both adapters to the API reference. Two tests pin the
zeros.
@gonzaotc
gonzaotc force-pushed the oracle-v3-compat-docs branch from e576391 to 7ad6e25 Compare September 9, 2026 18:29

@luiz-lvj luiz-lvj left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

@gonzaotc
gonzaotc merged commit a6ba239 into master Sep 25, 2026
4 of 11 checks passed
@gonzaotc
gonzaotc deleted the oracle-v3-compat-docs branch September 25, 2026 20:32
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