Skip to content

feat: add VIP-680 Liquidity Hub (USDT) BSC testnet wiring VPD-1566 & 1588#733

Open
Debugger022 wants to merge 5 commits into
mainfrom
feat/VPD-1566
Open

feat: add VIP-680 Liquidity Hub (USDT) BSC testnet wiring VPD-1566 & 1588#733
Debugger022 wants to merge 5 commits into
mainfrom
feat/VPD-1566

Conversation

@Debugger022

@Debugger022 Debugger022 commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

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.

Note: supersedes the earlier revision of this PR, which targeted a since-redeployed stack, predated the HubRegistry, and did FRV/Flux wiring via Guardian multisig. All contracts now exist, so it goes through governance instead. bsctestnet-addendum.ts is deleted, replaced by the fast-track/critical split.

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.

File Contents Ops Executed
bsctestnet.ts Normal Timelock governance set + acceptOwnership() on Hub and HubRegistry 53 702
bsctestnet-wiring.ts addHub → per-source addResource + inner queues → addYieldGroup ×3 → outer queues 15 703
bsctestnet-guardian.ts Guardian full set across the stack (testnet only) 52 705
bsctestnet-fast-track.ts Fast-Track Timelock governance set 51 706
bsctestnet-critical.ts Critical Timelock governance set 51 707

702 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 from NETWORK_ADDRESSES, Hub stack inlined from deployments/bsctestnet/*.json) and permissions.ts (role strings verbatim from each contract's _checkAccessAllowed).

Configuration

Yield groups — registered in queue order, all uncapped per testnet policy:

# Source Resource Adapter Absolute cap % cap
1 FRVSource_USDT
0xA0Fb0fFeBdcB7F45A3Ec841cCE7F78B7CeBD0f82
FRV vault
0x9F6Edab0123188C852854D2D9601115168f52F7a
AdapterFRV
0xeF0E85ab9A23F50EB4595CF7e2F5461feF7E7fc5
type(uint128).max 10000 (off)
2 FluxSource_USDT
0x044E572144bc08ed2D90E081EeEd7b5b6Cb01016
Fluid fUSDT
0x52217232e12A1c906aB8DEf58532a3618970D025
AdapterFlux
0x15Dca35ae0b16BeceabAEC9Dea49630e8C601730
type(uint128).max 10000 (off)
3 CoreSource_USDT
0x11e39DC7b8b16BBDA8D9C2903dF741Ae9341Ec88
vUSDT
0xb7526572FFE56AB9D7489838Bf2E18e3323b441A
AdapterCoreV1
0xDf669957448eCB23309eEFda4de230c62d22AE33
type(uint128).max 10000 (off)

type(uint128).max is the canonical "no ceiling" — the Hub rejects type(uint256).max as InvalidCap. 10000 bps disables the percentage-of-TVL dimension.

Queues

  • Outer deposit = outer withdraw = [FRVSource, FluxSource, CoreSource]. FRV first so deposits reach the vault under test; Core last because it's uncapped and would otherwise absorb everything.
  • Inner deposit = inner withdraw = the single resource on each source.

Core

HubRegistry 0x5346f648029d1D1d1034e09e8AD7a115f5D7A159
Hub_USDT 0x7cE6ADF754D0eC81A6CF8ACd9C7454F45077dc61
USDT 0xA11c8D9DC9b66E209Ef60F0C8D969D3CD988782c
Hub owner / registry owner Normal Timelock 0xce10739590001705F7FF231611ba4A48B2820327
ACM 0x45f8a08F534f34A97187626E05d4b6648Eeaa9AA

Set at deploy, not by these VIPs

Key Value
Hub decimals 12 (USDT 6 + decimalsOffset 6)
maxWithdrawalSize 1e24
redeemFeeBps 0
feeRecipient 0x8b293600C50D6fbdc6Ed4251cc75ECe29880276f
blocksPerYear Core 70080000; FRV/Flux 0 — their adapters ignore the annualiser

Notes

  • Wiring order is load-bearing. addHub first, so HubAdded precedes every YieldGroupAdded in the same tx; each addResource precedes its inner-queue setters; each addYieldGroup precedes the outer-queue setters.
  • Guardian holds the full permission set across the Hub and the three sources, so any testnet reconfiguration (reordering queues, changing caps, adding or swapping a resource) can be done by the Guardian directly with no VIP.

- 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
Debugger022 marked this pull request as ready for review July 9, 2026 11:59
@Debugger022 Debugger022 changed the title [VPD-1566]feat: add VIP Liquidity Hub (USDT) testnet wiring feat: add VIP-680 Liquidity Hub (USDT) testnet wiring VPD-1566 Jul 9, 2026
@Debugger022 Debugger022 changed the title feat: add VIP-680 Liquidity Hub (USDT) testnet wiring VPD-1566 feat: add VIP-680 Liquidity Hub (USDT) testnet wiring VPD-1566 & 1588 Jul 10, 2026
@Debugger022 Debugger022 changed the title feat: add VIP-680 Liquidity Hub (USDT) testnet wiring VPD-1566 & 1588 feat: add VIP-680 Liquidity Hub (USDT) BSC testnet wiring VPD-1566 & 1588 Jul 13, 2026
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant