OracleHookWithV3Adapters: M-07 document the V3 adapter compatibility limits - #175
Merged
Merged
Conversation
❌ Deploy Preview for uniswap-hooks failed. Why did it fail? →
|
❌ Deploy Preview for uniswap-hooks-docs failed. Why did it fail? →
|
gonzaotc
force-pushed
the
oracle-v3-compat-docs
branch
from
September 8, 2026 20:17
0c4861a to
e576391
Compare
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
force-pushed
the
oracle-v3-compat-docs
branch
from
September 9, 2026 18:29
e576391 to
7ad6e25
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The adapters do not record
secondsPerLiquidityCumulativeX128and return a zero-filled array.OracleLibrary.consultdivides 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,unlockedand its inverted V4 polarity, and the truncated adapter's rawtickandsqrtPriceX96. Also correctsincreaseObservationCardinalityNext, which said the oracle stores liquidity observations.No logic changes. Two tests pin the zeros.
Closes M-07.