Repository navigation
feat: multi-asset treasury, price oracle adapter and resource hint injector (Closes #541, #542, #543) - #657
Merged
Mikey-222 merged 8 commits intoSep 25, 2026
Conversation
|
@precious-akpan Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
precious-akpan
force-pushed
the
feat/541-542-543-treasury-hints-oracle
branch
from
September 24, 2026 22:32
acc3bcc to
16a17b3
Compare
Root Cargo.toml was a stray comment, so no contract crate could build. Declare aegis_vault and helphone_dao as members and move the release profile to the workspace root. Signed-off-by: Precious Akpan <49040483+precious-akpan@users.noreply.github.com>
Closes Hel-Phone#541) Rebuild aegis_vault and add treasury.rs: per-asset reserves, daily caps enforced in claim_aid and treasury_withdraw, target weights and a read-only rebalance plan. Signed-off-by: Precious Akpan <49040483+precious-akpan@users.noreply.github.com>
…el-Phone#543) Add oracle.rs, quote_conversion and disburse_aid. Prices older than 1 hour abort with StalePrice. Also fixes compile errors in the DAO crate and adds governance tests. Signed-off-by: Precious Akpan <49040483+precious-akpan@users.noreply.github.com>
…one#541, Hel-Phone#543) Add treasury and oracle client reads, error mapping, TreasuryPanel and a live quote form on VaultDashboard. Signed-off-by: Precious Akpan <49040483+precious-akpan@users.noreply.github.com>
…Closes Hel-Phone#542) Inject dns-prefetch/preconnect/modulepreload at runtime, prefetch route chunks on hover/focus/touch, and drop heavy chunks from the entry HTML preload list. Signed-off-by: Precious Akpan <49040483+precious-akpan@users.noreply.github.com>
Covers Hel-Phone#541, Hel-Phone#542 and Hel-Phone#543. Signed-off-by: Precious Akpan <49040483+precious-akpan@users.noreply.github.com>
Signed-off-by: Precious Akpan <49040483+precious-akpan@users.noreply.github.com>
precious-akpan
force-pushed
the
feat/541-542-543-treasury-hints-oracle
branch
from
September 25, 2026 08:42
16a17b3 to
1e8b614
Compare
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.
Closes #541
Closes #542
Closes #543
#541 Aegis Vault multi-asset treasury
contracts/aegis_vaultwas a one-line stub, so it is rebuilt to match the existing tests and frontend ABI (fund_zonestill takes the 160-byte public-inputs prefix).treasury.rs: per-asset reserves, daily disbursement caps (UTC day) enforced inclaim_aidandtreasury_withdraw, target weights, and a read-onlyrebalance_plan(prices). The vault never swaps; execution is off-chain or via a DEX adapter.DailyLimitExceededbefore the nullifier is burned or funds move.TreasuryPanelinVaultDashboard.jsxshows live reserves and cap usage (15 s refresh);getTreasurySnapshot,getTreasuryRebalancePlan,setTreasuryDailyLimitincontract.ts; types insrc/types/index.ts.#543 Price feed oracle adapter
contracts/helphone_dao/src/oracle.rsfor SEP-40 feeds (Reflector):quote_conversion(e.g. XLM/USDC) anddisburse_aid.StalePrice; one stale leg rejects the conversion. Missing, non-positive and future-dated prices are rejected too.getOracleQuotemaps contract error codes to friendly messages; dashboard quote form. NeedsVITE_HELPHONE_DAO_ID.total_supplyclient, non-Copyerror enum). Fixed here so the oracle is testable, with new governance tests.#542 Resource hint injector & module preloading
src/lib/resourceHints.ts: deduplicateddns-prefetch/preconnect/modulepreloadinjection (same-origin only for modulepreload) and hover/focus/touch intent prefetch of route chunks, skipped on save-data / 2g.index.htmlstatic hints;vite.config.tsdrops heavymapbox/zkchunks from the entry HTML preload list for FCP;main.tsxwires it up.App.tsxneeded no change because the listener is delegated.docs/performance-optimization.md.Other
Cargo.tomlwas a stray comment; now a valid workspace ofaegis_vaultandhelphone_dao. NewcontractsCI job runscargo test --workspace --locked.soroban-contract.mddocuments the treasury and oracle.Test evidence
cargo test --workspace --locked: aegis_vault 27 passed, helphone_dao 19 passednpx vitest run test/resource-hints.test.js test/treasury-vault.test.js test/price-oracle.test.js: 55 passedNotes: I could not run the full JS suite or the wasm build locally (the
@creit-tech/stellar-wallets-kitdependency does not resolve from npm here). The wasm release build andstellar contract buildare unverified. #540 is in a separate PR (#648) and both append jobs toci.yml, so whichever merges second needs a trivial rebase.