[VPD-1314] Configure PrimeV2 on BSC#712
Conversation
Bring PrimeV2 + PrimeLeaderboard live on bsctestnet: accept ownership, grant ACM perms (epoch ops to NormalTimelock + Guardian), wire the pair, repoint PrimeLiquidityProvider, add Core pool markets, open the mint window, and pause the legacy Prime. Includes fork simulation.
|
missing command for |
|
also update the Prime address in the Comptroller ? |
Add missing XVSVault.setPrimeToken (-> PrimeLeaderboard) and Comptroller.setPrimeToken (-> PrimeV2); extend sim assertions and fix grant helper comment.
Add pre-VIP assertions for wiring=0 and mint window=0; tighten PLP prime equality check; mention vault/comptroller switches in header.
|
Testnet execution: https://venus-testnet.vercel.app/#/governance/proposal/684?chainId=97 |
Extend Guardian ACM permissions to every remaining ACM-gated function on PrimeV2 / PrimeLeaderboard, and compress the leaderboard multiplier tiers from days (30/60/90d) to hours (1/2/3h) so testnet integration can exercise the tier progression without long waits.
|
Testnet Addendum: https://venus-testnet.vercel.app/#/governance/proposal/685?chainId=97 |
Upgrades the bsctestnet PrimeV2 proxy to the new implementation deployed via venus-protocol PR #677 and grants ACM permission for the new recordCycleSnapshot(uint256) function to NormalTimelock and Guardian, matching the keeper grant pattern from the original VIP-675.
Redeployed PrimeV2/PrimeLeaderboard (fresh proxies + impls), so the old addenda's wiring is stale. Accept ownership, re-grant the full ACM set against the new addresses (plus testnet-only resetCycle), wire the pair, and repoint the shared PLP/XVS Vault/Comptroller hooks old→new. No legacy togglePause — already paused by VIP-675.
|
Testnet Addendum: https://venus-testnet.vercel.app/#/governance/proposal/688?chainId=97 |
Wire deployed PrimeV2 / PrimeLeaderboard: accept ownership, grant cycle ACM perms to NT + Keeper + Guardian (admin NT-only), repoint PLP / XVS Vault / Comptroller from legacy Prime, add 6 markets, pause vault until seeding, decommission legacy.
Add the vWBNB market to PrimeV2 on bsctestnet so FE/BE integration can exercise the new market flow. Initializes WBNB on PrimeLiquidityProvider and sets the distribution speed to mirror mainnet (3.47e12 wei/block) for production-like accrual during testing. Supply/borrow multipliers match the legacy mainnet Prime (2e18 / 0).
|
Testnet addedum to add WBNB market: https://venus-testnet.vercel.app/#/governance/proposal/691?chainId=97 |
Add ACM grants so the team multisig (0xCCa5...2948) can fire pause() on both PrimeV2 and the XVS Vault as an emergency circuit breaker, matching the cross-chain MULTISIG_PAUSER pattern from vip-616.
Remove setMintThreshold from the Keeper's permission set on PrimeV2 — opening/closing the permissionless mint window is sensitive and reserved for governance and the Venus Guardian multisig. Update simulation assertions (RoleGranted 43 -> 42) and add tests verifying NormalTimelock and Guardian hold the role while the Keeper does not.
…issions Pauses the XVS Vault and zeroes the PLP distribution speed for every legacy Prime underlying, so an off-chain claimInterest sweep runs against frozen balances before PrimeV2 goes live. Executes via CriticalTimelock, which already holds both permissions (no ACM grants).
Launch PrimeV2 with only the vUSDT and vWBNB markets instead of all six legacy Prime markets, and re-set the PLP distribution speed for USDT and WBNB (zeroed by the preceding critical VIP) back to their prior live values. Sim now runs that critical VIP via CriticalTimelock in before() so the regular VIP executes against real frozen state.
fred-venus
left a comment
There was a problem hiding this comment.
Should we also consider reallocating the xvs buyback part to prime reward buyback contract ?
…st-freeze Add a post-VIP block to the critical sim proving an arbitrary EOA can sweep vUSDT interest on behalf of four real legacy Prime whale holders after the freeze, confirming the off-chain claimInterest sweep pays holders directly.
As discussed, we will handle this through a separate VIP, where the reserve protocol configurations will be updated and the income from the XVS buyback contract will be allocated to Prime reward distribution. |
…mounts Strengthen the permissionless-claim test: assert the sweeping EOA is not a legacy Prime holder while each whale is, and console the prime status plus the before/after USDT balances so the sweep payout is visible in the run output.
initializeStakers and finalizeInitialization are a one-time off-chain bootstrap, so the NormalTimelock does not need them. Grant only the Keeper and the Guardian multisig; drops the RoleGranted count from 42 to 40.
Exercise the full end-user lifecycle (mint/borrow/accrue/claim/repay/redeem/exit) across PrimeV2 and non-Prime markets, the PrimeV2 score hook for a real holder, liquidation seize math, and the VAI mint gate after the legacy Prime -> PrimeV2 repoint. Repoint stale feeds to Chainlink-only to survive the testVip time-jump. Document each scenario and ACM permission assertion inline.
…d liquidation scenarios
|
lgtm |
| ...grant(PRIME_V2, "setMaxLoopsLimit(uint256)"), | ||
| ...grant(PRIME_V2, "sweepUndistributed(address,address)"), | ||
| ...grant(PRIME_V2, "pause()", ALL_TIMELOCKS), | ||
| ...grant(PRIME_V2, "unpause()", ALL_TIMELOCKS), |
There was a problem hiding this comment.
for pause and unpause, pls grant permission to guadian as well
| ...grant(PRIME_V2, "setPrimeLeaderboard(address)"), | ||
| ...grant(PRIME_V2, "addMarket(address,uint256,uint256)"), | ||
| ...grant(PRIME_V2, "removeMarket(address)"), | ||
| ...grant(PRIME_V2, "setLimit(uint256)"), |
There was a problem hiding this comment.
for setLimit lets have GUARDIAN as well just in case
| // The XVS Vault is already paused by the preceding critical VIP | ||
| // (vip-675/bscmainnet-critical.ts) and stays paused until the new | ||
| // PrimeLeaderboard is seeded off-chain. | ||
| export const PRIME_V2 = "0x4f5fd115Df31CC48De880a988D74aaD931851628"; |
| // NormalTimelock already holds the setTokensDistributionSpeed ACM permission. | ||
| { | ||
| target: PLP, | ||
| signature: "setTokensDistributionSpeed(address[],uint256[])", |
There was a problem hiding this comment.
also seems this is gonna make no sense as when we resume the rewardDistributionSpeed the actual prime users list is empty, based on the logic the reward will be distributed nowhere but counted as undistributed which stuck until we claimUndistributed, i will suggest remove it
There was a problem hiding this comment.
So I suggest we should get speed adjustment VIP executed earlier so that users will not wait for a long time
There was a problem hiding this comment.
Previous this decision is based on the VIP for speed adjustment would take one week. Previously, from the users' interest perspective, we need to resume emissions asap
PrimeV2 has no scored members at execution (leaderboard seeded off-chain later, XVS Vault still paused), so restoring PLP distribution speeds books income into undistributedReward instead of reaching users. Defer the speed restore to the off-chain seeding/resume step.


VIP-637 [BNB Chain] PrimeV2 and PrimeLeaderboard
Summary
This proposal begins the execution of the Prime Rewards Redesign on BNB Chain — it brings the new PrimeV2 and PrimeLeaderboard contracts live and decommissions the legacy Prime program. It is the migration half of a two-proposal rollout; a companion critical proposal freezes the system beforehand so the transition from legacy Prime to PrimeV2 is seamless and nothing earned under the existing program is lost.
Description
This proposal executes the redesign set out in the Venus Tokenomics Phase II — Prime Rewards Redesign proposal; it does not change that design. PrimeV2 and the legacy Prime share one rewards vault (the PrimeLiquidityProvider), which can serve only one Prime contract at a time. Before this proposal is executed, a companion critical proposal pauses XVS Vault staking and zeroes legacy Prime emissions, and an off-chain reward settlement pays every legacy Prime holder their pending rewards in full — so repointing the vault here strands nothing.
This proposal then accepts ownership of the new contracts, grants the required ACM permissions, wires PrimeV2 and PrimeLeaderboard together, repoints the rewards vault / XVS Vault / Core pool Comptroller / VAIController from legacy Prime to the new contracts, configures the launch markets (vUSDT and vWBNB), and pauses legacy Prime. Supplying and borrowing on Venus markets are unaffected throughout; only XVS staking is temporarily paused, and is resumed by the Guardian once existing stakers are seeded into the new leaderboard off-chain.
The contracts are implemented and deployed in venus-protocol PR #676 and PR #677; the governance setup is in this PR (#712).
Actions
This proposal performs 54 transactions on BNB Chain, in the following groups.
Key addresses:
0x059EabA8676b03e4e8f009eFb7F587C28450F50f0x55e2ccF68B7A276dc28AfA107997b8B1Be932c0b0x23c4F844ffDdC6161174eB32c770D4D8C07833F20xBbCD063efE506c3D42a0Fa2dB5C08430288C71FC0xfD36E2c2a6789Db23113685031d7F163291583840x004065D34C6b18cE4370ced1CeBDE94865DbFAFEacceptOwnership()on PrimeV2 and PrimeLeaderboard.giveCallPermissionon the Access Control Manager: per-cycle ops (issue/issueBatch/burn/burnBatch/recordCycleSnapshot) to Normal Timelock + Keeper (0xe0237587acA20f9304d30FACC9Afcd5DD9a94899) + Guardian; one-time staker seeding (initializeStakers/finalizeInitialization) to Keeper + Guardian only;setMintThreshold/setLimitto Normal Timelock + Guardian only; policy levers (addMarket,removeMarket,updateAlpha,updateMultipliers,setMultiplierTiers, etc.) to Normal Timelock only;pause/unpauseto all three timelocks + Guardian; circuit-breakerpause()on both PrimeV2 and the XVS Vault to the Venus team multisig (0xCCa5a587eBDBe80f23c8610F2e53B03158e62948).setPrimeLeaderboard(address)on PrimeV2 andsetPrimeV2(address)on PrimeLeaderboard.setPrimeToken(address)on the PrimeLiquidityProvider, pointing it at PrimeV2.setPrimeToken(address,address,uint256)on the XVS Vault, pointing the prime hook at PrimeLeaderboard (reward token XVS, pool id 0 unchanged).setPrimeToken(address)on the Comptroller, pointing market hooks at PrimeV2.setPrimeToken(address)on the VAIController, so the Prime-holder VAI mint gate tracks PrimeV2 membership.addMarket(address,uint256,uint256)on PrimeV2 for vUSDT and vWBNB, each with a 2x supply multiplier and 0x borrow multiplier.togglePause()on the legacy Prime contract to pause it permanently.References