feat: add VIP-680 Liquidity Hub (USDT) BSC testnet wiring VPD-1566 & 1588#733
Open
Debugger022 wants to merge 5 commits into
Open
feat: add VIP-680 Liquidity Hub (USDT) BSC testnet wiring VPD-1566 & 1588#733Debugger022 wants to merge 5 commits into
Debugger022 wants to merge 5 commits into
Conversation
- Grant the Hub's asymmetric ACM roles: the full governance set to the Normal timelock (which then runs the wiring) plus the Guardian operator set; a companion addendum grants governance to the Fast-Track and Critical timelocks. - Wire the Core yield source end-to-end (register vUSDT behind AdapterCoreV1, set inner and outer queues) so the USDT Hub routes deposits and withdrawals through the Core pool. - Split the grants into a main proposal plus bsctestnet-addendum.ts: all three timelocks' grants plus the wiring exceed BSC's per-tx propose gas cap in a single proposal. - Defer the FRV and Flux sources — neither has a concrete resource on testnet yet (no FRV vault instance; Flux adapter not deployed). - Add fork simulations for both proposals: pre/post state, the 40 and 58 role grants, and an end-to-end maxDeposit check.
- New proposal grants the Guardian the full Governance role set across the Hub stack (Hub, Core, FRV, Flux) so resources can be listed and reconfigured via multisig without a proposal per change - Deliberate testnet-only deviation from the asymmetric model where the Operator is tighten-only; kept in a bsctestnet file, not for mainnet - Factor the shared YieldGroupBase signatures into one base array; FRV uses YieldGroupFRV (adds forceRemoveResource, no cap setters or setBlocksPerYear) so it keeps a separate set - Update the main and addendum descriptions to reference the three proposals as one package
Debugger022
marked this pull request as ready for review
July 9, 2026 11:59
The Liquidity Hub (USDT) stack was redeployed on BNB Chain testnet (new HubRegistry, Hub, Core/FRV/Flux sources and adapters), so the previous VIP-680 targets stale addresses and predates the registry. Rewrite it to onboard the current deployment on-chain in one package. - Split into five REGULAR proposals: the full surface (ownership accepts, ~205 role grants, source wiring) exceeds the BSC per-tx propose gas cap in a single proposal. - main: accept Hub and registry ownership, grant the Normal Timelock the governance set across the stack. - wiring: register the Hub, then wire Core, FRV and Flux end to end (addHub before addYieldGroup, outer queue [FRV, Flux, Core]). - fast-track and critical: grant each timelock the governance set. - guardian: grant the Guardian full permissions (testnet only). - move addresses and ACM role strings into addresses.ts and permissions.ts; add the HubRegistry ABI, regenerate the Hub and YieldGroup ABIs, and drop the superseded addendum files.
…l + sim A separate proposal (bsctestnetHubregistryUpgrade), independent of the Liquidity Hub onboarding proposals, that upgrades the HubRegistry proxy to the implementation exposing `assetForHub(hub)` — the reverse of `hubForAsset`. Goes through the Normal-Timelock-owned ProxyAdmin; append-only change so a plain `upgrade` preserves registry storage. Adds HUB_REGISTRY_IMPL to addresses, a ProxyAdmin ABI, refreshes the HubRegistry ABI to include assetForHub. Fork sim (bsctestnet, block 119680000) passes 8/8: pre-VIP the getter reverts on the old impl; post-execution the proxy runs the new impl, emits Upgraded, and assetForHub resolves an unregistered hub to address(0).
- Move the address book to addresses/bsctestnet.ts so the upcoming mainnet VIP gets its own file - Keep permissions.ts shared and unprefixed: the role strings are literal contract function signatures, identical on mainnet, and the Operator sets it defines are unused on testnet and exist only for mainnet. Prefixing it would invite a copy that drifts - Pass the ACM into giveCallPermission so permissions.ts keeps no network coupling - Kebab-case bsctestnetHubregistryUpgrade.ts to match its siblings No change to the encoded proposals: same targets, signatures and params.
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.
Onboards the Liquidity Hub (USDT) on BNB Chain Testnet: accepts ownership, grants every role, registers the Hub in the HubRegistry, and wires all three yield sources (Core, FRV, Flux). Five proposals under
vips/vip-680/, all executed.Proposals
Split into five because the full surface (222 ops) is far over BSC's per-tx propose gas cap of 16,777,216 — the main proposal alone is 12.73M (75.85%). All
REGULAR.bsctestnet.tsacceptOwnership()on Hub and HubRegistrybsctestnet-wiring.tsaddHub→ per-sourceaddResource+ inner queues →addYieldGroup×3 → outer queuesbsctestnet-guardian.tsbsctestnet-fast-track.tsbsctestnet-critical.ts702 executes before 703 (the wiring needs 702's roles). The rest are independent.
Two shared files keep addresses and role strings out of the call sites:
addresses.ts(governance/ACM fromNETWORK_ADDRESSES, Hub stack inlined fromdeployments/bsctestnet/*.json) andpermissions.ts(role strings verbatim from each contract's_checkAccessAllowed).Configuration
Yield groups — registered in queue order, all uncapped per testnet policy:
0xA0Fb0fFeBdcB7F45A3Ec841cCE7F78B7CeBD0f820x9F6Edab0123188C852854D2D9601115168f52F7a0xeF0E85ab9A23F50EB4595CF7e2F5461feF7E7fc5type(uint128).max10000(off)0x044E572144bc08ed2D90E081EeEd7b5b6Cb010160x52217232e12A1c906aB8DEf58532a3618970D0250x15Dca35ae0b16BeceabAEC9Dea49630e8C601730type(uint128).max10000(off)0x11e39DC7b8b16BBDA8D9C2903dF741Ae9341Ec880xb7526572FFE56AB9D7489838Bf2E18e3323b441A0xDf669957448eCB23309eEFda4de230c62d22AE33type(uint128).max10000(off)type(uint128).maxis the canonical "no ceiling" — the Hub rejectstype(uint256).maxasInvalidCap.10000bps disables the percentage-of-TVL dimension.Queues
[FRVSource, FluxSource, CoreSource]. FRV first so deposits reach the vault under test; Core last because it's uncapped and would otherwise absorb everything.Core
0x5346f648029d1D1d1034e09e8AD7a115f5D7A1590x7cE6ADF754D0eC81A6CF8ACd9C7454F45077dc610xA11c8D9DC9b66E209Ef60F0C8D969D3CD988782c0xce10739590001705F7FF231611ba4A48B28203270x45f8a08F534f34A97187626E05d4b6648Eeaa9AASet at deploy, not by these VIPs
12(USDT 6 +decimalsOffset6)1e2400x8b293600C50D6fbdc6Ed4251cc75ECe29880276f70080000; FRV/Flux0— their adapters ignore the annualiserNotes
addHubfirst, soHubAddedprecedes everyYieldGroupAddedin the same tx; eachaddResourceprecedes its inner-queue setters; eachaddYieldGroupprecedes the outer-queue setters.