docs(liquidity-hub): add Liquidity Hub documentation - #353
Draft
Debugger022 wants to merge 3 commits into
Draft
Conversation
Document the Liquidity Hub — the per-asset ERC-4626 allocator vault that routes a single deposited asset across the Core, Flux, and FRV yield families and returns a yield-bearing share token (yield via a rising exchange rate). What's New: - whats-new/liquidity-hub.md: user-facing overview — Sources, deposit/ withdraw routing, Operator rebalancing, safety envelope, fees, APY Technical reference (new reference-liquidity-hub/ section): - README.md: architecture, three yield families, contract index, audits - hub.md: Hub ERC-4626 API, operation flows, dual caps, fees, APY, multi-level pause, reentrancy, invariants - yield-groups.md: YieldGroupCore/Flux/FRV, ISource surface, FRV 11-state lifecycle, per-resource caps - adapters.md: stateless delegatecall adapters (Core/Flux/FRV) - interfaces.md: ISource and IResourceAdapter boundaries Wire all pages into SUMMARY.md. Scope: v1 (Core/Flux/FRV on BNB Chain, USDT first). Contracts not yet deployed — addresses to be published once live.
|
GitBook Preview: https://docs-v4.venus.io/~/revisions/a2G8a7QkLY0yuK3tFY6Z/ |
nayzawlin4920021-sys
approved these changes
Jun 6, 2026
- ISource does not exist in the code. The Hub boundary interface is IYieldGroupBase, and the stale name appeared on all five pages, including a terminology note asserting the code reserves it. - totalAssets() was documented as fault-isolated, stated twice and once as an invariant. It is fail-closed, so a Source with a reverting view halts share pricing instead of contributing 0. - The deposit cascade accepts partial fills and refunds the remainder. It never raises YieldGroupUnderfilled, which is reachable only from reallocate legs and the withdraw path. - accrue() was absent from both boundary interfaces even though the Hub calls it unguarded on every registered Source. - Permissions rebuilt from the onboarding VIP's ACM grants rather than the natspec annotations, which disagree in two places: the Operator holds raiseYieldGroupCap, and governance is not granted reallocate. - Event and error rows described triggers that cannot fire. YieldGroupSkipped and ResourceSkipped emit only when a call reverts, and TreasuryPercentTooHigh is not a real error. - Documented the Migrator and the BSC testnet deployment, both live and previously absent.
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.
Document the Liquidity Hub — the per-asset ERC-4626 allocator vault that routes a single deposited asset across the Core, Flux, and FRV yield families and returns a yield-bearing share token (yield via a rising exchange rate).
What's New:
Technical reference (new reference-liquidity-hub/ section):
Wire all pages into SUMMARY.md.
Scope: v1 (Core/Flux/FRV on BNB Chain, USDT first). Contracts not yet deployed — addresses to be published once live.