feat: RWA Yield Aggregator Vault#10
Merged
Merged
Conversation
1a54dbc to
2cd4489
Compare
…etc.) - rwa-oracle: remove #![cfg(test)] from test/mod, collapse ifs, use ? for let-else, drop useless .into() - rwa-vault: remove #![cfg(test)], fix digit grouping, allow too_many_arguments on initialize, use abs_diff in rebalancer, drop needless borrow in deposit, collapse if in nav - rwa-token: remove #![cfg(test)], assert!(..) instead of assert_eq!(.., bool) - rwa-lending: assert!(!x) instead of assert_eq!(x, false)
Remove too_many_arguments (rwa-oracle, rwa-vault), module_name_repetitions (rwa-token), and upper_case_acronyms (rwa-lending).
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.
Summary
Adds the rwa-vault contract: a yield aggregator vault for Real-World Assets on Soroban. It accepts a single deposit token (e.g. CETES), distributes it across multiple lending protocols via adapters, and mints vTokens (SEP-41) representing proportional ownership of the vault’s NAV.
Role in Neko Protocol
The vault sits between RWA Token and RWA Lending (or other protocols via adapters) as the yield-optimization layer. Users deposit RWA and receive vTokens; a manager can rebalance and harvest; management and performance fees are accrued as shares.
Architecture
liquid_reserve + Σ adapter.a_balance(vault); share price = NAV × SCALAR_7 / total_shares.#[contractclient]trait (a_deposit, a_withdraw, a_balance, a_get_apy, a_harvest). The vault does not depend on any concrete protocol.Testing
src/test/mod.rs: initialize, double init, deposit (1:1 and proportional), withdraw (partial and full), add/remove protocol, pause, SEP-41 transfer/approve, decimals/name/symbol.Files Touched
stellar-contracts/Cargo.toml— rwa-vault added to workspace.stellar-contracts/rwa-vault/— full crate (common, adapters, admin, vault, strategies, contract, test, README).