Skip to content

adds improved vault share pricing logic#485

Open
Tapanito wants to merge 5 commits intotapanito/vault-enhancedfrom
tapanito/vault-share-valuation
Open

adds improved vault share pricing logic#485
Tapanito wants to merge 5 commits intotapanito/vault-enhancedfrom
tapanito/vault-share-valuation

Conversation

@Tapanito
Copy link
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)

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
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}$

Copy link
Collaborator

@ximinez ximinez left a comment

Choose a reason for hiding this comment

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

Very minor stuff


The vault's totals are reduced by the final calculated amounts.

- **New Total Assets**: $\Gamma_{assets} \leftarrow \Gamma_{assets} - \Delta_{assets\_out}$
Copy link
Collaborator

Choose a reason for hiding this comment

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

This also needs to have the \_ converted to \\_.

$\Delta_{assets\_out}$

This calculated $\Delta_{shares}$ amount is **rounded down (floor)**.

Next, the rounded number of shares from Step 1 is used to calculate the final asset payout ($\Delta_{assets\_out}$), using the same logic as a redemption.
Next, the floored number of shares from Step 1 is used to calculate the final asset payout using the same logic as a redemption.
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think this read better as "rounded" instead of "floored". The number is still rounded - it's just rounded down.

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