Pessimistic Velo LP Oracle Review#158
Conversation
Harden PessimisticVeloSingleOracle and Velo vault relayers against stale pessimistic pricing, sequencer/TWAP invalidity, vault PPS donation effects, fee-exclusive ERC4626 conversion, reserve overflow, and single-feed pricing precision issues. Fixes: H-01, H-02, H-06, M-02, M-06, M-11, M-12, L-01, L-03, L-05, L-06, L-07, L-08, L-09, L-10, L-11, L-14 Accepted: H-03, M-04 residual formula bias, M-09, L-02
…audit-fixes Fix Velo Oracle Review v3
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b069712ebf
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if (_maxTwapObservationInterval < VELO_OBSERVATION_PERIOD) { | ||
| revert TwapObservationIntervalTooShort(); | ||
| } | ||
| maxTwapObservationInterval = _maxTwapObservationInterval; |
There was a problem hiding this comment.
Reject unusable minimum TWAP intervals
When _maxTwapObservationInterval is set to the minimum value allowed here (30 minutes), real Velodrome pools will not produce observation gaps that pass _getAverageReserves: observations are appended only after the 30-minute period has elapsed, so consecutive timestamps are typically greater than 1800 seconds and the later timeElapsed > maxTwapObservationInterval check reverts for every TWAP/single-feed update. This makes an apparently valid deployment unable to update; require a value strictly above the observation period or add explicit slack.
Useful? React with 👍 / 👎.
No description provided.