feat: add VIP-680 Liquidity Hub (USDT) BSC testnet wiring VPD-1566 & 1588#733
Open
Debugger022 wants to merge 2 commits into
Open
feat: add VIP-680 Liquidity Hub (USDT) BSC testnet wiring VPD-1566 & 1588#733Debugger022 wants to merge 2 commits into
Debugger022 wants to merge 2 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
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.
VPD-1566
Post-deploy governance wiring for the Liquidity Hub (USDT) on BNB Chain Testnet, as three proposals under
vips/vip-680/:bsctestnet.ts(main) — grants the Hub's asymmetric ACM roles (full Governance set on Hub_USDT and the Core source to the Normal timelock, the tighten-only Operator set to the Guardian) and wires the Core yield source end-to-end: register vUSDT behind AdapterCoreV1, set the inner queues, register the Core source on the Hub, set the outer queues.bsctestnet-addendum.ts— grants the same Governance role set to the Fast-Track and Critical timelocks. Separate proposal because all three timelocks' grants plus the wiring exceed BSC's per-tx propose gas cap (main already uses 65%, addendum 85%).bsctestnet-guardian.ts— testnet-only: tops the Guardian up to the full Governance set across the whole stack (Hub + Core + FRV + Flux sources, 39 grants), so the backend can list and reconfigure resources via multisig without a VIP per change. Deliberate deviation from the mainnet asymmetric model; marked not to be mirrored to mainnet.Role strings are copied verbatim from the deployed contracts'
_checkAccessAllowedliterals: Hub 19 sigs; Core/Flux sources (YieldGroup) share base + cap setters +setBlocksPerYear; FRV (YieldGroupFRV) is base +forceRemoveResourceonly.Fork simulations for all three proposals (
simulations/vip-680/): pre/posthasRoleasserts on the exact role ids (immune to the ACM wildcard fallback), RoleGranted event counts (40 / 58 / 39), negative asserts proving the asymmetric split (Guardian holds no governance-only role after main; timelocks never get operator-onlyreallocate), and an end-to-endmaxDeposit > 0check through Hub → Core source → vUSDT. All passing on a bsctestnet fork.FRV wiring — done on-chain via the Guardian multisig (click to expand)
Using the permissions from the guardian proposal (no code change in this PR), the Guardian registered a concrete Fixed Rate Vault on
FRVSource_USDT, set its inner queues, registered the FRV source on the Hub and put it first in the outer deposit queue (verified on-chain:resources(),innerDeposit/WithdrawQueue(),registeredYieldGroups(),outerDepositQueue()). The vault is live in Fundraising and currently empty. Config and timing below are read from its liveruntime().Flux stays deferred — no Flux adapter on testnet yet.
Addresses
0xc892F31c4dbDee443b3501BC27D92Aca3e787a640xA11c8D9DC9b66E209Ef60F0C8D969D3CD988782c0xC337Dd0390FdFD0Ee5D2b682E425986EDD7b59datokenId 75)0x2Ce1d0ffD7E869D9DF33e28552b12DdDed3267060xf77dED2A00F94e33C392126238360D4642c16Ba2Config (verified on chain)
Timing (UTC, from live
runtime())FRV yield source wiring txn (BNB Chain Testnet)
addResource(VAULT, AdapterFRV)0x5fe062a9…8f9dbb50setInnerDepositQueue([VAULT])0x970fb488…dfea6018setInnerWithdrawQueue([VAULT])0xc1ee418e…ce24a5aaaddYieldGroup(FRVSource_USDT, type(uint128).max, 10000)0x9e96db98…55b0590bsetOuterDepositQueue([FRVSource_USDT, CoreSource_USDT])0xd7f3b05d…de7c80e2setOuterWithdrawQueue([FRVSource_USDT, CoreSource_USDT])0xcb792106…d4badcb6