adds improved vault share pricing logic#485
Open
Tapanito wants to merge 5 commits intotapanito/vault-enhancedfrom
Open
adds improved vault share pricing logic#485Tapanito wants to merge 5 commits intotapanito/vault-enhancedfrom
Tapanito wants to merge 5 commits intotapanito/vault-enhancedfrom
Conversation
13 tasks
ximinez
requested changes
Feb 27, 2026
| 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$). |
Collaborator
There was a problem hiding this comment.
assets\_requested renders as assetsrequested with r as a subscript.
I think the correct incantation is
ximinez
requested changes
Feb 27, 2026
|
|
||
| The vault's totals are reduced by the final calculated amounts. | ||
|
|
||
| - **New Total Assets**: $\Gamma_{assets} \leftarrow \Gamma_{assets} - \Delta_{assets\_out}$ |
Collaborator
There was a problem hiding this comment.
This also needs to have the \_ converted to \\_.
| 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. |
Collaborator
There was a problem hiding this comment.
I think this read better as "rounded" instead of "floored". The number is still rounded - it's just rounded down.
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.
High Level Overview of Change
Summary
InterestUnrealized(Ω) field to the Vault ledger entry, enabling cash-basis accounting for share valuationContext of Change
Type of Change