Skip to content

[VPD-1168] Phase-4 market deprecation VIP-634 and VIP-635#721

Merged
fred-venus merged 10 commits into
mainfrom
feat/VPD-1168
Jun 29, 2026
Merged

[VPD-1168] Phase-4 market deprecation VIP-634 and VIP-635#721
fred-venus merged 10 commits into
mainfrom
feat/VPD-1168

Conversation

@Debugger022

@Debugger022 Debugger022 commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

VIP-634 & VIP-635: [Multi-Chain] Deprecated and Off-boarded Markets — Parameter Update (Step 1 of 2)

On-chain numbering: this work is proposed as VIP-634 (Part 1 of 2) and VIP-635 (Part 2 of 2) (next two IDs after on-chain proposalCount = 633). The drafts were authored as 664/665 and renumbered for proposal.

Summary

This proposal sets reserve factors to 100%, repoints interest rate models to a deprecation curve, and zeroes remaining supply/borrow caps and collateral factors across the deprecated and off-boarded markets on BNB Chain, opBNB, Optimism, Unichain, Ethereum, Base, Arbitrum, and zkSync Era. It is Step 1 of a two-step wind-down, executed on-chain as two VIPs — VIP-634 (Part 1 of 2) and VIP-635 (Part 2 of 2) — split only to respect the governor's operation limit and the LayerZero message-size cap.

Description

The markets in scope have already had their collateral factors reduced to zero through prior off-boarding actions, but their reserve factors, interest rate models, and certain residual caps and collateral factors remain misaligned with a wound-down state. This proposal sets reserve factors to 100%, repoints each market to a deprecation interest rate model (a flat 300% borrow APR up to a 45% kink, rising to a 500% maximum at full utilization), and zeroes all remaining non-zero supply/borrow caps and collateral factors.

Note: Step 2, expected approximately two weeks later, will set the liquidation thresholds — and collateral factors — of these markets to zero, completing the wind-down.

Actions

Implemented across two on-chain VIPs, VIP-634 and VIP-635 (this PR). Together they perform the following actions across the in-scope chains:

  1. Set reserve factor to 100% — Calls the reserve-factor setter on each in-scope market currently below 100% (_setReserveFactor(1e18) on Core vTokens; setReserveFactor(1e18) on Isolated-Pool vTokens). Markets already at 100% are unchanged.

  2. Repoint to the deprecation IRM — Sets the interest rate model on each in-scope market to the deprecation JumpRateModel (baseRatePerYear = 300%, multiplierPerYear = 0%, kink = 0.45, jumpMultiplierPerYear = 363.64% — flat 300% below the kink, rising to a 500% maximum at full utilization), deployed per chain:

    • BNB Core (legacy): 0xc255352947ef3594C45b0Fe8bcB690e51C3D744A
    • BNB isolated pools: 0x29d0f5503525df271880CB8Da84651405E545d6b
    • Ethereum (Core, Curve, Liquid Staked ETH): 0xbEd8AAf2Ce423428ECeabfbdCdA92D961B7BE901
    • opBNB: 0xDA141Df6D89B83Db101F13C24174C2a3B6308962
    • Optimism: 0x00a7e1641077Bd0e70A87cA9b631523E1D4B7A91
    • Unichain: 0xf67b35d5201E48960D1262b043A815B3cb8AfAb7
    • Arbitrum: 0x2f58C87418d0F0E87922B4e915E1e968cE79B6F5
    • Base: 0xDd22bBbCC37d59483b7D42b040d435E1A0ee0E22
    • zkSync Era: 0x1f6e343B528B1374d1370E0F9dE99290AD3a22A9

    PLANET and stkBNB are skipped (≈$0 borrows).

  3. Zero remaining caps — Sets supply and borrow caps to 0 on the 20 markets with non-zero caps (setMarketSupplyCaps / setMarketBorrowCaps on the respective Comptrollers).

  4. Zero remaining collateral factors — Sets the collateral factor to 0 on the two markets still at 5% (BNB Liquid Staked ETH weETH and wstETH), preserving their current liquidation threshold (0.93); no healthy position is liquidated by this proposal.

Voting options

  • For — Execute the proposal
  • Against — Do not execute the proposal
  • Abstain — Indifferent to execution

RF to 100%, push-out IRM repoint, and cap/CF gap closures for BNB Core,
BNB BTC/DeFi/GameFi/Meme isolated pools, opBNB, Optimism, Unichain and
Ethereum Core. Includes the shared market dataset + command generator
and reusable pre/post simulation checks. 53 governor ops.
RF to 100%, push-out IRM repoint, cap closures, and the 2 collateral-factor
gap closures for BNB LSBNB/LSEth/Stablecoins/Tron, Ethereum Curve+LSEth,
Arbitrum, Base and zkSync. 48 governor ops.
@Debugger022 Debugger022 self-assigned this Jun 16, 2026
Comment thread vips/vip-664/phase4Markets.ts Outdated
Comment thread vips/vip-634/phase4Markets.ts
Comment thread vips/vip-664/phase4Markets.ts Outdated
Comment thread vips/vip-664/phase4Markets.ts Outdated
Comment thread vips/vip-634/phase4Markets.ts Outdated
{ symbol: "sFRAX", vToken: "0x17142a05fe678e9584FA1d88EfAC1bF181bF7ABe" },
{ symbol: "EIGEN", vToken: "0x256AdDBe0a387c98f487e44b85c29eb983413c5e" },
{ symbol: "BAL", vToken: "0x0Ec5488e4F8f319213a14cab188E01fB8517Faa8" },
{ symbol: "yvUSDC-1", vToken: "0xf87c0a64dc3a8622D6c63265FA29137788163879" },

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think its ok to remove the last 4 as the supply, borrow are in fact already 0

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Confirmed all 4 are empty (totalSupply = 0, totalBorrows = 0) — so RF/IRM on them are no-ops. But they're still isListed = true (block 25336057), so dropping them is the same carve-out we just removed for PLANET/stkBNB

The skipIrm carve-out on PLANET/stkBNB was based on the doc's USD value, but
PLANET has 6.45M tokens borrowed at ~4%; remove it so every deprecated market
lands on the push-out curve uniformly (stkBNB included for consistency).
Add the DOT BNB Core e-mode collateral factor (pool 14) to the gap closure —
55% to 0, liquidation threshold preserved — verified the only such e-mode gap.
Simulation checks extended to assert the e-mode CF pre/post state.
fred-venus
fred-venus previously approved these changes Jun 17, 2026
@fred-venus fred-venus changed the title [VPD-1168] Phase-4 market deprecation VIP-664 and VIP-665 [VPD-1168] Phase-4 market deprecation VIP-634 and VIP-635 Jun 17, 2026
fred-venus and others added 5 commits June 17, 2026 20:10
…5 16.78M gas cap

Full 55-cmd propose needs ~17.6M gas, over BSC's per-tx cap (16,777,216);
removing yvUSDC/USDT/USDS/WETH-1 brings it to ~16.28M.
…ll governance steps

A VIP is stored in a single propose() tx, so it must fit BSC's 2^24 per-tx
gas cap — over it the on-chain propose reverts with an empty error and the
VIP can't be created, something the sim previously never caught. Add a
reportTxGas() helper that logs gasUsed (% of cap) for propose/queue/execute
in one format and asserts the cap on propose (the binding, heaviest tx).
VIP-634's propose tx sat at ~95.5% of BSC's per-tx gas cap — too thin a
margin against a hard consensus limit. Moving the BNB Meme pool to VIP-635
rebalances both proposals to ~90% (634 90.0%, 635 89.4%), giving each ~10%
headroom while keeping every cross-chain message under the 10 KB cap.
…er-Safe execTransaction

The propose() per-tx-cap check enforced the gas a DIRECT EOA propose CONSUMES, but VIPs
are proposed by the proposer Gnosis Safe via execTransaction. Two gaps made the check a
false negative that would green-light an unproposable VIP:

  - It asserted gasUsed (consumed), not the required gas LIMIT. EIP-150's 63/64 gas
    forwarding reserve compounds across the Safe-proxy/singleton and Governor-proxy call
    layers, so the required limit exceeds consumption — a tx can consume under the cap yet
    be unprovisionable (propose OOGs at the cap because the limit can't be set high enough).
  - It modeled a direct EOA call, missing the Safe wrapper (~1.1M gas: the
    SafeMultiSigTransaction log of the full calldata, signature verification, extra 63/64 hops).

reportTxGas now enforces the cap on estimateProposeViaMultisig(): estimateGas of the proposer
Safe's execTransaction(GOVERNOR_PROXY, propose calldata), which folds in the 63/64 reserves,
the event, intrinsic + calldata. checkSignatures is satisfied without private keys by lowering
the Safe threshold to 1 on the fork and using a single v=1 owner-as-sender signature (the
sig-verification delta vs the real threshold is a few thousand gas — immaterial, and well
inside the new within-3%-of-cap warning). queue/execute still report consumed gas. Non-Safe
proposers fall back to direct-propose enforcement.

Verified on a bscmainnet archival fork:
  VIP-634 Part 1: requiredGasLimit=16,419,376 (97.86% of cap, warns) vs old direct 91.49%
  VIP-635 Part 2: requiredGasLimit=15,797,444 (94.16% of cap)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…gas-cap-multisig

fix(vip-framework): enforce propose() gas cap against the real proposer-Safe execTransaction
@fred-venus

Copy link
Copy Markdown
Contributor

fred-venus
fred-venus previously approved these changes Jun 18, 2026
# Conflicts:
#	src/vip-framework/index.ts
@fred-venus
fred-venus merged commit d9b686c into main Jun 29, 2026
2 checks passed
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.

2 participants