Repository navigation
Conversation
The oracle, the vault and the SEP-40 feed share one price scale, PRICE_SCALE = 10^14, defined in strata-bindings. MIN_ANSWER and MAX_ANSWER keep the same real bounds. The feed answers the stored price unchanged when the asset and the share have the same decimals.
The app and the harness each keep one PRICE_SCALE at 10^14, matching the contracts, and every price fixture is the same real price at the new scale.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This was referenced Nov 18, 2026
Draft
This branch was successfully deployed
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.
Stacked on #470; merge that one first. Top of the stack.
Summary
Closes #431
The oracle and the vault kept the share price in WAD (18 decimals), while Stellar price feeds and the kit's SEP-40 feed use 14, so the feed had to convert. This must land before the first mainnet deployment: after that, stored reports and epoch prices would need a migration.
Changes
MIN_ANSWERandMAX_ANSWERkeep the same real bounds.PRICE_SCALE: neither can import the Rust constant.Deviations
attestdoc loses two words to fit the 1,024-byte spec limit.Acceptance criteria
WADor_000_000_000_000_000_000price literal remains in contracts, tests, app or harness, except where a value is not a priceTest plan
Automated tests
cargo test --locked: all pass, including the new test that one share at a price of 1.0 is one asset unit, and the conversion, dust and rounding tests with their bounds unchanged.cargo fmt --all -- --checkandcargo clippy --locked --workspace --all-targets -- -D warnings: clean.cargo test --locked -p async-vault -p nav-oracle -p sep40-feed --features upgrade_wasm with_wasm: all pass.stellar contract build,npm run build:clients, thennpm run lint,npm run format:check,npm run typecheckandnpm run test: all pass.Manual verification
None until the testnet redeploy.
Breaking changes
Oracle and epoch prices move from 10^18 to 10^14. A deployment holding WAD prices, such as today's testnet, needs a redeploy.
Checklist
Screenshots
None.
🤖 Generated with Claude Code