Repository navigation
Vault Strategy: describe the restart check on the price feed - #166
Merged
Merged
Conversation
The companion's vault strategy rejects any Pyth price posted at or before the LastRestartSlot sysvar's slot, with PricePredatesRestart, because after a halt the timestamp trails real time and a pre-halt price can still pass the 60-second window. The Time chapter already lists the vault among the programs that make this check; the Vault Strategy chapter did not mention it. The price-load paragraph, the failure modes and the testing section now do. Claude-Session: https://claude.ai/code/session_01CXqcBq93zfcZ2F8jeoSaez
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 companion's vault strategy refuses any Pyth price posted at or before the
LastRestartSlotsysvar's slot, withPricePredatesRestart. After a halt the timestamp trails real time, so a price from before the halt can still pass the 60-second window. The Time chapter already lists the vault among the programs that make this check (#163), but the Vault Strategy chapter never mentioned it.Changes
PricePredatesRestart, says why the 60-second window alone does not catch a pre-halt price, and points to the Time chapter.test_deposit_rejects_price_from_before_restart, which simulates a halt, checks that a deposit is refused, and checks that it goes through once Pyth posts again.Both identifiers exist on the companion repository's main.
Checks
npm run lint,node scripts/check-figure-geometry.mjsandnpm run build-pdfall pass.🤖 Generated with Claude Code
https://claude.ai/code/session_01CXqcBq93zfcZ2F8jeoSaez
Generated by Claude Code