Repository navigation
Vault suite: simulation/fees, SEP-41 shares, fee crystallization, asset-agnostic collateral - #342
Merged
techisigu merged 9 commits intoOct 24, 2026
Conversation
… Estimation, and Closes Zenith-options#214
…Token for Wallet Closes Zenith-options#215
…r-Mark Performanc Closes Zenith-options#216
…Asset Decimal Han Closes Zenith-options#217
|
@chindosunday 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! 🚀 |
- src/lib/api/vaults.ts: merged [markers] — model resolved the conflict markers Co-authored-by: Simple Agent <agent@simple.dev>
- src/lib/api/vaults.ts: merged [markers] — model resolved the conflict markers Co-authored-by: Simple Agent <agent@simple.dev>
- src/lib/api/vaults.ts: merged [markers] — model resolved the conflict markers Co-authored-by: Simple Agent <agent@simple.dev>
- src/lib/api/vaults.ts: merged [markers] — model resolved the conflict markers Co-authored-by: Simple Agent <agent@simple.dev>
- src/lib/api/vaults.ts: merged [markers] — model resolved the conflict markers Co-authored-by: Simple Agent <agent@simple.dev>
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
Vault suite: simulation/fees, SEP-41 shares, fee crystallization, asset-agnostic collateral
What was solved
#214 — Implement Stellar Transaction Simulation, Fee Estimation, and Failure Surfacing for Vault Deposits and Withdrawals
Implement a shared prepare→simulate→sign→submit pipeline for Soroban vault deposits and withdrawals: call simulateTransaction to surface resource/inclusion/total fees before signing, show quoted shares/assets with a bounded minimum-received slippage guard and a quote-staleness window, map contract error codes to human-readable messages in messages/, render actionable simulation failures with retry (without leaving the form submitting), reuse the existing Freighter signing path, and log simulation results/failures with vault/operation/error-code/footprint context.
Addressed:
#215 — Expose Vault LP Shares as a SEP-41 Compliant Token for Wallet Visibility and Composability
Implement SEP-41 token interface on Phase 2 vault share ledgers as an internal
sharesmodule (balance, spendable_balance, authorized, transfer, transfer_from, approve, allowance, decimals, name, symbol, total_supply), with mint/burn restricted to vault deposit/redemption paths, standardtoken-topic events, and a per-vaulttransferablepolicy flag defaulting off and switchable without redeploy. Surface symbol/decimals/transferable in the typed vault payload in src/lib/api/vaults.ts.Addressed:
tokentopic for indexers#216 — Implement the Vault Fee Policy With High-Water-Mark Performance Fees and Treasury Distribution
Add a per-vault fee policy layer (management + high-water-mark performance fees) that crystallizes at epoch close and distributes to a treasury/fee-recipient via real token transfer, with governance-gated config and API/analytics exposure of configured rates and last crystallization.
Addressed:
#217 — Implement Multi-Asset Collateral Support and Asset Decimal Handling Across the Vault Suite
Make the Phase 2 vault suite asset-agnostic by declaring a per-vault collateral asset (classic Stellar asset or Soroban token) with correct decimals, validating it against a per-network allowlist at creation, normalizing all share pricing/NAV/capacity/fee math to base units, exposing collateralAsset metadata (code, issuer/contract id, decimals) in REST payloads, and formatting NAV/share price/balances in the frontend using the vault's asset metadata.
Addressed:
Changes
src/lib/api/vaults.ts(modify)Approach
Issues
Closes #214
Closes #215
Closes #216
Closes #217