Skip to content

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

Open
Debugger022 wants to merge 2 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 2 commits into
mainfrom
feat/VPD-1566

Conversation

@Debugger022

@Debugger022 Debugger022 commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

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' _checkAccessAllowed literals: Hub 19 sigs; Core/Flux sources (YieldGroup) share base + cap setters + setBlocksPerYear; FRV (YieldGroupFRV) is base + forceRemoveResource only.

Fork simulations for all three proposals (simulations/vip-680/): pre/post hasRole asserts 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-only reallocate), and an end-to-end maxDeposit > 0 check 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 live runtime().

Flux stays deferred — no Flux adapter on testnet yet.

Addresses

Role Address
New vault (VAULT) 0xc892F31c4dbDee443b3501BC27D92Aca3e787a64
Supply asset (USDT, 6 decimals) 0xA11c8D9DC9b66E209Ef60F0C8D969D3CD988782c
Collateral (SOL) 0xC337Dd0390FdFD0Ee5D2b682E425986EDD7b59da
Institution or operator (position NFT tokenId 75) 0x2Ce1d0ffD7E869D9DF33e28552b12DdDed326706
Controller 0xf77dED2A00F94e33C392126238360D4642c16Ba2

Config (verified on chain)

Key Value
State Fundraising · totalRaised 0 · maxDeposit room 100 USDT
Caps minBorrowCap 1 USDT · maxBorrowCap 100 USDT
Rates fixedAPY 8% · reserveFactor 10% · minSupplierDeposit 0
Collateral idealCollateral 1 SOL (fully posted) · marginRate 10%
Windows openDuration 6h · lockDuration 60h · settlementWindow 30d
Risk LT 0.75 · LI 1.1 · latePenalty 1.15

Timing (UTC, from live runtime())

Event Timestamp UTC
openStart 1783686388 Fri 2026-07-10 12:26
openEndTime 1783707988 Fri 2026-07-10 18:26. The Fundraising window closes, and deposits are only accepted before this.
lockEndTime 1783923988 Mon 2026-07-13 06:26. The lock ends, and the vault can settle to Matured after this.
settlementDeadline 1786515988 ~Wed 2026-08-12

FRV yield source wiring txn (BNB Chain Testnet)

# Call Contract Transaction
1 addResource(VAULT, AdapterFRV) FRVSource_USDT 0x5fe062a9…8f9dbb50
2 setInnerDepositQueue([VAULT]) FRVSource_USDT 0x970fb488…dfea6018
3 setInnerWithdrawQueue([VAULT]) FRVSource_USDT 0xc1ee418e…ce24a5aa
4 addYieldGroup(FRVSource_USDT, type(uint128).max, 10000) Hub_USDT 0x9e96db98…55b0590b
5 setOuterDepositQueue([FRVSource_USDT, CoreSource_USDT]) Hub_USDT 0xd7f3b05d…de7c80e2
6 setOuterWithdrawQueue([FRVSource_USDT, CoreSource_USDT]) Hub_USDT 0xcb792106…d4badcb6

- 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
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