Skip to content

feat: VIP-647 eBTC delisting (Ethereum), lisUSD resumption (BNB Chain) & bStock liquidator flash-loan whitelist#743

Open
trumpgpt-bot wants to merge 11 commits into
mainfrom
bot/VDB-31-work-on-jira-ticket-vpd-1641
Open

feat: VIP-647 eBTC delisting (Ethereum), lisUSD resumption (BNB Chain) & bStock liquidator flash-loan whitelist#743
trumpgpt-bot wants to merge 11 commits into
mainfrom
bot/VDB-31-work-on-jira-ticket-vpd-1641

Conversation

@trumpgpt-bot

@trumpgpt-bot trumpgpt-bot commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

VIP-647 [BNB Chain & Ethereum] eBTC Delisting, lisUSD Resumption & bStock Liquidator Flash Loans

One combined proposal (13 commands), prepared for on-chain proposal as VIP-647 (on-chain proposalCount = 646 at preparation time). This PR supersedes #723, whose contents (VIP-650 → folded in as command 7) were merged here unchanged.

Source Jira tickets: VPD-1641 (eBTC / lisUSD) and VPD-1433 (bStock liquidator).

BNB Chain — lisUSD resumption (Core pool)

  1. acceptOwnership() on the new PCSStableOracle (0x8440889CaEC04FeFEB52c3c5cd729548864E7886, two-step transfer from the deployer, pending owner = Normal Timelock — verified on-chain).
  2. Grant setPoolConfig(address,address,uint8,uint8,address,uint8) on the oracle to Guardian + Normal Timelock (byte-matched against the deployed source's _checkAccessAllowed literal).
  3. setCollateralFactor(vlisUSD, 0.5e18, 0.55e18) — CF restored 0 → 50%, LT unchanged at 55%.
  4. setMarketSupplyCaps — supply cap 5,000,000 → 2,100,000 lisUSD (2× 3-month average supply; current supply ≈1.02M so no existing positions are squeezed).
  5. resetCFSnapshot(vlisUSD) on the Emergency Brake.
  6. setPoolConfig(lisUSD, ListaPool, 0, 1, USDT, 18) + setTokenOracleConfig(lisUSD, PCSStableOracle) — re-routes the Deviation Sentinel from the old PancakeSwap V3 pool to the ListaDAO lisUSD/USDT StableSwap pool (0x8df7891f…c956, coins verified on-chain). The Lista pool exposes the PCS StableSwap interface (uint256 indices), which the existing CurveOracle (int128) cannot read — hence the new adapter (source: VDB-31: feat: add PCSStableOracle for PancakeSwap StableSwap / ListaDAO pools venus-periphery#72).

BNB Chain — bStock backstop liquidator (from #723 / VIP-650)

  1. setWhiteListFlashLoanAccount(BStockLiquidator, true) on the Core Pool Comptroller (0x5974Badab6911a78Ba15229045514C2C1bD42343, verified BStockLiquidator proxy). Flash loans are already live (VIP-567); this follows the VIP-576 whitelisting pattern.

Ethereum — eBTC delisting (cross-chain, Core pool)

  1. setMarketSupplyCaps([veBTC], [0]).
  2. resetCFSnapshot(veBTC) on the Emergency Brake (current snapshot [0.68, 0.72]).
  3. setTokenMonitoringEnabled(eBTC, false) on the Deviation Sentinel.
    11-13. Treasury redemption (VIP-526 flow): withdrawTreasuryToken(veBTC, 0.14471345, NormalTimelock)veBTC.redeemeBTC.transfer back to the Treasury. Market has 0 borrows (and borrowing paused), reserves 0, exchange rate fixed at 1e18 → exact 1:1, no dust. CF is already 0 and borrow already paused via the Emergency Brake, so those are not repeated here.

No new ACM grants needed on Ethereum — the Normal Timelock already holds resetCFSnapshot + setTokenMonitoringEnabled (VIP-616, re-verified on-chain).

Verification

  • Simulations: simulations/vip-647/bscmainnet.ts33 passing (full governance lifecycle, permission grants, end-to-end SentinelOracle → PCSStableOracle → Lista pool price equality, supply-and-borrow behavioral proof, flash-loan whitelist pre/post). simulations/vip-647/ethereum.ts16 passing (LayerZero payload replay incl. treasury redemption round-trip).
  • On-chain cross-checks: every command simulated via eth_call as the executing timelock on both chains; PCSStableOracle implementation bytecode matched byte-for-byte against venus-periphery PR @vantu32 #72 artifacts; proxy admin = Venus DefaultProxyAdmin (Normal Timelock-owned).
  • Propose tx: estimateGas 3.86M (EIP-7825 16.78M cap — safe).

🤖 Generated with Claude Code

…Chain)

Regular cross-chain VIP:

BNB Chain (lisUSD, Core pool):
- Accept ownership of the newly deployed PCSStableOracle and grant setPoolConfig
  permission to Guardian + Normal/FastTrack/Critical timelocks (VIP-590 pattern).
- Restore collateral factor 0 -> 50% (LT 0.55), reduce supply cap 5M -> 2.1M,
  reset the Emergency Brake CF snapshot.
- Re-route the Deviation Sentinel from the old PancakeSwap V3 pool to the ListaDAO
  lisUSD/USDT StableSwap pool via the new PCSStableOracle adapter.

Ethereum (eBTC, Core pool, cross-chain):
- Set supply cap to 0, reset the Emergency Brake CF snapshot, disable Deviation
  Sentinel monitoring for eBTC.

Simulations (bscmainnet + ethereum mainnet):
- bscmainnet: deploys PCSStableOracle in-fork (proxy -> initialize(ACM) ->
  transferOwnership to Normal Timelock) and passes the address to the parameterized
  vip664(); pre/post state asserts, permission-grant checks, oracle price sanity,
  and a supply+borrow behavioral proof. Names high-power governance voters
  explicitly (proposal threshold 1M / quorum 1.5M XVS) and pins lisUSD + USDT
  prices via the Redstone escape hatch to survive the lifecycle time warp.
- ethereum: testForkedNetworkVipCommands replaying the LayerZero payload.

The PCS_STABLE_ORACLE mainnet address is a placeholder to be pinned in a later
deploy phase; treasury veBTC redemption / reduceReserves are deferred (reserves 0).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@trumpgpt-bot
trumpgpt-bot marked this pull request as ready for review July 23, 2026 13:40
Comment thread vips/vip-647/bscmainnet.ts
Comment thread vips/vip-647/bscmainnet.ts
trumpgpt-bot and others added 2 commits July 23, 2026 15:17
…g signature

Address review feedback on VIP-664:
- Add eBTC delisting-state assertions to the Ethereum simulation (pre- and
  post-VIP): borrowing is paused (Action.BORROW) and the collateral factor is
  0, both already enforced via the Emergency Brake and preserved by this VIP.
- Document the setPoolConfig(address,address,uint8,uint8,address,uint8)
  signature at the SET_POOL_CONFIG_SIGNATURE constant and its call site.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Comment thread vips/vip-664/bscmainnet.ts Outdated
export const BSC_GOVERNANCE_TIMELOCKS = [
bscmainnet.NORMAL_TIMELOCK,
bscmainnet.FAST_TRACK_TIMELOCK,
bscmainnet.CRITICAL_TIMELOCK,

@fred-venus fred-venus Jul 24, 2026

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.

lets remove FAST_TRACK_TIMELOCK and CRITICAL_TIMELOCK, in the future, If not specified, let's just keep Guardian and normal Timelock.

Comment thread vips/vip-647/bscmainnet.ts
trumpgpt-bot and others added 3 commits July 24, 2026 02:34
…o eBTC

Address review feedback on VIP-664:
- Grant setPoolConfig only to the Guardian + Normal Timelock; drop the
  FastTrack and Critical timelock grants (per reviewer: keep Guardian + Normal
  by default unless a VIP specifically needs the others).
- Add the Ethereum treasury redemption: withdraw the Treasury's full veBTC
  balance to a TokenRedeemer and redeemAndTransfer it to eBTC back into the
  Treasury (VIP-644 redemption-helper flow). The TokenRedeemer is not yet
  deployed on Ethereum, so vip664() is parameterized with its address and the
  ethereum simulation deploys one in-fork (owned by the Normal Timelock),
  mirroring the PCSStableOracle handling; the real address is pinned in the
  later deployment phase.
- Extend the ethereum simulation to assert the veBTC position is fully redeemed
  and the eBTC returned to the Treasury.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The PCSStableOracle adapter is now deployed on BNB Chain at
0x8440889CaEC04FeFEB52c3c5cd729548864E7886. Pin it as PCS_STABLE_ORACLE and point
the bscmainnet simulation at the deployed contract at a recent fork block
(111798000, after the deploy at 111796601) instead of deploying a proxy in-fork.
The simulation replicates only the pre-proposal ownership handoff (impersonate the
current owner and transferOwnership to the Normal Timelock) so acceptOwnership()
still succeeds.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…n Redeemer

Replace the Token Redeemer flow with the standard VIP-526 direct-redemption
pattern, since the Token Redeemer is not deployed on Ethereum and the eBTC
market has 0 borrows (fixed 1e18 exchange rate, no accruing interest):

- withdrawTreasuryToken(veBTC, 0.14471345, NormalTimelock)
- veBTC.redeem(0.14471345)
- eBTC.transfer(VTreasuryV8, 0.14471345)

Redeems 1:1 with no dust. Drops the ETH_TOKEN_REDEEMER placeholder + the
ethTokenRedeemer param, the in-fork TokenRedeemer deployment in the ethereum
simulation, and the vendored TokenRedeemer.json ABI.

ethereum sim 16 passing, bscmainnet sim 28 passing.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Comment thread simulations/vip-664/bscmainnet.ts Outdated
trumpgpt-bot and others added 4 commits July 24, 2026 06:48
Per review, the pre-proposal ownership handoff must run unconditionally so
the test fails loudly if the on-chain prerequisites change, rather than
silently skipping the setup.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
… handed off on-chain

The deployer called transferOwnership(NormalTimelock) between blocks
111804416 and 111812608.  At the updated fork block (111812608) the
NormalTimelock is already the pending owner on-chain, so no setup
is needed in the test — the VIP's acceptOwnership() (command 1)
finalises the transfer exactly as it will on mainnet.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…the PCSStableOracle feed

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…t (VPD-1433)

Brings the full contents of PR #723 (head ffdf202) into this PR unchanged:
vips/vip-650 + simulations/vip-650 (8 passing) and the vip-framework
quorum fix (recycle default proposer as supporter). vip-664 sims unaffected
(29 passing re-run on this branch).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…e VIP

Renumber vip-664 → vip-647 (on-chain proposalCount 646), fold the vip-650
bStock flash-loan whitelist command and its simulation assertions into the
combined proposal, and rewrite the description to cover all three actions.
BSC sim 33 passing, ETH sim 16 passing; propose estimateGas 3.86M.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@fred-venus fred-venus changed the title VDB-31: feat: add VIP-664 eBTC delisting (Ethereum) & lisUSD resumption (BNB Chain) feat: VIP-647 eBTC delisting (Ethereum), lisUSD resumption (BNB Chain) & bStock liquidator flash-loan whitelist Jul 24, 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.

3 participants