Skip to content

[VPD-1100]: TokenBuyback migration proposal and simulation#700

Draft
Debugger022 wants to merge 2 commits intomainfrom
feat/VPD-1100
Draft

[VPD-1100]: TokenBuyback migration proposal and simulation#700
Debugger022 wants to merge 2 commits intomainfrom
feat/VPD-1100

Conversation

@Debugger022
Copy link
Copy Markdown
Contributor

Summary

  • Replaces the legacy Token Converter system (RiskFundConverter, 4 PrimeConverters,
    XVSVaultConverter, WBNBBurnConverter, ConverterNetwork) with 10 ACM-authorized
    TokenBuyback proxies operated by a finance-team cron.
  • Upgrades the RiskFundV2 implementation to remove dead per-pool accounting
    (updatePoolState, sweepTokenFromPool, poolAssetsFunds mapping).
  • Wires ProtocolShareReserve distributions directly to the new buyback proxies,
    eliminating the oracle-coupled 50% premium and ConverterNetwork routing layer.

Changes

vips/vip-800/

  • bscmainnet.ts — proposal definition: RiskFundV2 upgrade, acceptOwnership on 10
    buybacks, PancakeSwap router allowlisting, ACM grants for cron operator,
    legacy converter drain + ACM revoke, PSR distribution repoint
  • bsctestnet.ts — identical flow targeting testnet addresses

simulations/vip-800/

  • bscmainnet.ts / bsctestnet.ts — fork simulation scaffolding: pre/post-VIP
    state assertions for ownership, router allowlist, ACM permissions, PSR config,
    and legacy converter balances
  • abi/ — ABIs for AccessControlManager, DefaultProxyAdmin, ERC20,
    ProtocolShareReserve, SingleTokenConverter, TokenBuyback

Test plan

# Mainnet fork simulation
npx hardhat test bscmainnet.ts --fork bscmainnet

# Testnet fork simulation
npx hardhat test bsctestnet.ts --fork bsctestnet

Replaces the legacy Token Converter system (7 contracts) with
10 ACM-authorized TokenBuyback proxies on BNB Chain mainnet and
testnet. Includes RiskFundV2 upgrade, ACM grants, PSR rewiring,
and fork simulation scaffolding.
@Debugger022 Debugger022 self-assigned this Apr 23, 2026
@Debugger022 Debugger022 changed the title [VPD-1100]: add VIP-800 TokenBuyback migration proposal and simulation [VPD-1100]: TokenBuyback migration proposal and simulation Apr 23, 2026
@fred-venus
Copy link
Copy Markdown
Contributor

fred-venus commented May 5, 2026

from hashdit audit L02: call pauseAuctions() defensively as part of the VIP to keep the surface closed post-upgrade just in case

Add Shortfall.pauseAuctions() to the VIP-800 proposal on both bscmainnet
and bsctestnet, with matching pre/post-state assertions in the
simulations. Isolated pools are wound down so no live or upcoming
auctions exist, but pausing closes the surface post-RiskFundV2-upgrade
as defense in depth and removes any need for an auctionsPaused or
transferReserveForAuction balance check in the upgrade path.
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