Skip to content

adds improved vault share pricing logic#485

Open
Tapanito wants to merge 25 commits into
masterfrom
tapanito/vault-share-valuation
Open

adds improved vault share pricing logic#485
Tapanito wants to merge 25 commits into
masterfrom
tapanito/vault-share-valuation

Conversation

@Tapanito

Copy link
Copy Markdown
Collaborator

High Level Overview of Change

Summary

  • Introduces InterestUnrealized (Ω) field to the Vault ledger entry, enabling cash-basis accounting for share valuation
  • Updates all exchange rate formulas to exclude unrealized interest from share pricing, preventing depositors from extracting unearned interest at the expense of other depositors
  • Adds error codes to all transaction failure conditions
  • Documents the asymmetric valuation rationale and yield dilution trade-offs in the appendix

Context of Change

Type of Change

  • New XLS Draft
  • XLS Update (changes to an existing XLS)
  • XLS Status Change (e.g., Draft → Final, Draft → Stagnant)
  • Process/Meta (changes to CONTRIBUTING.md, XLS-1, templates, etc.)
  • Infrastructure (CI, workflows, scripts, website)
  • Documentation (README updates, typo fixes)

Tapanito and others added 19 commits February 11, 2026 15:15
…tion

- Add Example JSON sections for Vault ledger entry and all transactions
  (VaultCreate, VaultSet, VaultDelete, VaultDeposit, VaultWithdraw,
  VaultClawback, Payment) with real transaction data
- Add invariants for the Vault ledger entry (universal checks) and all
  transaction types derived from the ValidVault invariant checker
- Restructure section 10 from "API" to "RPC: vault_info" matching the
  amendment template format with Request Fields, Response Fields,
  Failure Conditions, Example Request, and Example Response subsections
- Update response fields table with missing fields (Data, Asset.mpt_issuance_id,
  shares.DomainID, shares.MPTokenMetadata) and correct Always Present values
- Update response examples to use proper JSON format with response envelope
- Add section 9.1 Fields for Payment transaction
- Remove Index section and all Return to Index links

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Reorganize top-level sections: Abstract (1), Introduction (2),
  Specification (3), Rationale (4), Security Considerations (5),
  Appendix
- Move all ledger entry, transaction, and RPC sections under
  "3. Specification" as subsections (3.1-3.9)
- Remove "1.1 Overview" heading, merge content into Introduction body
- Renumber Introduction subsections: Terminology (2.1), Actors (2.2),
  Connecting to the Vault (2.3)
- Demote all specification headings by one level with new numbering
- Add Rationale section explaining decoupled vault design
- Rename FAQ section to "Appendix A: FAQ" with A.x numbering
- Fix heading levels for Key Variables and Vault State Update

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Comment thread XLS-0065-single-asset-vault/README.md Outdated
Comment thread XLS-0065-single-asset-vault/README.md Outdated
The withdraw function handles a request for a specific amount of assets, which involves a two-step process to determine the final payout.

First, the requested asset amount ($\Delta_{assets\_requested}$) is converted into the equivalent number of shares to burn, based on the vault's real value.
First, the requested asset amount ($\Delta_{assets\_requested}$) is converted into the equivalent number of shares to burn, based on the vault's withdrawal NAV ($\Gamma_{assets} - \Omega - \iota$).

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

assets\_requested renders as assetsrequested with r as a subscript.

$\Delta_{assets_requested}$

I think the correct incantation is

$\Delta_{assets\_requested}$

Comment thread XLS-0065-single-asset-vault/README.md Outdated

@ximinez ximinez left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very minor stuff

Comment thread XLS-0065-single-asset-vault/README.md Outdated
Comment thread XLS-0065-single-asset-vault/README.md Outdated
@Tapanito

Copy link
Copy Markdown
Collaborator Author

@ximinez , I extended this PR with state changes that have to be made in the Lending Protocol as well.

@Tapanito Tapanito requested a review from ximinez March 10, 2026 17:38
Base automatically changed from tapanito/vault-enhanced to master May 28, 2026 15:12
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.

2 participants