Skip to content

Pessimistic Velo LP Oracle Review#158

Merged
piesrtasty merged 2 commits into
mainfrom
dev
Jun 24, 2026
Merged

Pessimistic Velo LP Oracle Review#158
piesrtasty merged 2 commits into
mainfrom
dev

Conversation

@piesrtasty

Copy link
Copy Markdown
Contributor

No description provided.

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

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 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".

Comment on lines +161 to +164
if (_maxTwapObservationInterval < VELO_OBSERVATION_PERIOD) {
revert TwapObservationIntervalTooShort();
}
maxTwapObservationInterval = _maxTwapObservationInterval;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge 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 👍 / 👎.

@piesrtasty piesrtasty merged commit de5a2d0 into main Jun 24, 2026
1 of 3 checks passed
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