update documentation - #2
Open
holyfuchs wants to merge 6 commits into
Open
Conversation
holyfuchs
marked this pull request as draft
August 28, 2026 09:47
holyfuchs
force-pushed
the
holyfuchs/update-documentation
branch
from
August 28, 2026 21:58
f0c140a to
2070c10
Compare
holyfuchs
marked this pull request as ready for review
August 28, 2026 21:58
holyfuchs
force-pushed
the
holyfuchs/update-documentation
branch
2 times, most recently
from
September 3, 2026 05:32
3178900 to
46f4ef9
Compare
holyfuchs
force-pushed
the
holyfuchs/update-documentation
branch
from
September 3, 2026 05:42
46f4ef9 to
69e3574
Compare
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.
Splits the documentation by the question each file answers:
architecture.md(design and rationale),security.md(adversarial threat model, new),security-surface.md(dependency outages),risk-disclosures.md(costs when nothing goes wrong), andoperations.md(owner/keeper runbook, new).architecture_old.mdis deleted, and the duplicated sandwich and permissionless-rebalance sections are merged.Corrects claims that no longer matched the code.
redeemno longer flash-loans, so the documented ~50% cap on a single redemption does not exist. The vault does not inherit OpenZeppelin'sERC4626. "Health factor" is not a concept in this contract — theredeemgate is LTV againstLTV_MAX. The availability matrix also had a false caveat about oracle reads, three wrong signatures, and two wrong access entries.Documents what was missing entirely: emergency recovery is terminal — after the timelock the owner receives the whole position and
redeem,redeemInKindandrebalancerevert permanently — plus fee mechanics, and the zero-value defaults that leave a fresh vault inert (maxSlippageBps = 0makesrebalance()a silent no-op rather than a revert).Removes backtested swap-size figures, the "~2–3% of protocol TVL" pool sizing, and a borrow-rate history claim. These depend on the asset and the venue, and parameter selection belongs to whoever deploys and manages the vault.
Code
One behavioural fix:
decimals()returned 18 while shares are scaled bycollateralDecimals + 6, so a client formatting a WBTC vault balance was off by10^4. Accounting was never affected — nothing internal readsdecimals()— but integrators and front-ends were. Everything else is comments and natspec, including trimming tautological blocks fromFeesLib,SwapLibandYieldTokenOracle.Tests
Seven added. The notable one is
rebalancesurviving a collateral/loan-pool outage: that is the claim behind splittingharvestout ofrebalance, and nothing asserted it. Also the fiveaccrueFeesavailability cases, since it is the only_accrueFeesconsumer withoutlogsVaultState, and the decimals scale.