Skip to content

fix(perps): bound solana funding velocity precision#145

Draft
rndrntwrk wants to merge 1 commit into
mainfrom
security/perps-funding-velocity-precision-guard
Draft

fix(perps): bound solana funding velocity precision#145
rndrntwrk wants to merge 1 commit into
mainfrom
security/perps-funding-velocity-precision-guard

Conversation

@rndrntwrk

Copy link
Copy Markdown
Collaborator

Summary

  • rejects Solana perps config updates that use EVM-scale funding velocity literals
  • preserves the current keeper-scale default path while bounding raw Solana funding velocity to the program precision domain
  • adds Rust unit coverage and an Anchor integration assertion for the rejected config update

Validation

  • cargo test -p gold_perps_market config_rejects_evm_scale_funding_velocity -- --nocapture
  • cargo test -p gold_perps_market
  • anchor build -p gold_perps_market
  • git diff --check

Note

anchor test -p gold_perps_market --run tests/gold_perps_market.ts still fails before reaching this branch's new integration assertion because the existing local harness initializes program_data with an upgrade authority that does not match ensurePerpsConfig's initializer. That is a test-harness bootstrap issue, not a regression from this patch.

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