Skip to content

feat: RWA Yield Aggregator Vault#10

Merged
aguilar1x merged 14 commits into
devfrom
feat/rwa-vault
Feb 21, 2026
Merged

feat: RWA Yield Aggregator Vault#10
aguilar1x merged 14 commits into
devfrom
feat/rwa-vault

Conversation

@aguilar1x

@aguilar1x aguilar1x commented Feb 21, 2026

Copy link
Copy Markdown
Contributor

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

Component Description
SEP-41 vToken Vault shares as a full token interface (transfer, approve, burn, etc.).
NAV liquid_reserve + Σ adapter.a_balance(vault); share price = NAV × SCALAR_7 / total_shares.
IAdapter #[contractclient] trait (a_deposit, a_withdraw, a_balance, a_get_apy, a_harvest). The vault does not depend on any concrete protocol.
Strategies Optimizer (APY by risk tier), Rebalancer (when drift > threshold), Harvester (harvest + fees).
Fees Management fee in BPS (shares to admin); performance fee on gains above high water mark.

Testing

  • 12 tests in 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.
  • Inline MockAdapter to simulate protocols without depending on rwa-lending.

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).

@aguilar1x aguilar1x self-assigned this Feb 21, 2026
@aguilar1x aguilar1x changed the title feat: rwa vault feat: RWA Yield Aggregator Vault Feb 21, 2026
…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).
@aguilar1x aguilar1x merged commit 13b84ee into dev Feb 21, 2026
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.

feat: implement RWA Yield Aggregator Vault

1 participant