Skip to content

VDB-7: Deploy TokenRedeemer and author bsctestnet VIP#360

Draft
trumpgpt-bot wants to merge 1 commit into
mainfrom
bot/VDB-7-deploy-tokenredeemer-and-author-bsctestnet-vip
Draft

VDB-7: Deploy TokenRedeemer and author bsctestnet VIP#360
trumpgpt-bot wants to merge 1 commit into
mainfrom
bot/VDB-7-deploy-tokenredeemer-and-author-bsctestnet-vip

Conversation

@trumpgpt-bot

Copy link
Copy Markdown

What changed

Repo Files Change
vips vips/vip-664/bsctestnet.ts VIP-664 — single REGULAR command sweepTokens(XVS, VTreasury) on the TokenRedeemer, executed by the bsctestnet NormalTimelock.
vips simulations/vip-664/bsctestnet.ts + abi/{XVS,TokenRedeemer}.json 4-part fork simulation.
venus-protocol-documentation deployed-contracts/funds.md TokenRedeemer entry under BNB Chain Testnet.
venus-protocol deploy/015-deploy-token-redeemer.ts + deployments/bsctestnet/TokenRedeemer.json Deploy-script patch + artifacts (committed in the deploy phase).

Address verification (three ways agree)

TokenRedeemer = 0x6E78a0d96257F8F2615d72F3ee48cb6fb2c970bd

  • Deploy context / answer: 0x6E78…970bd
  • venus-protocol/deployments/bsctestnet/TokenRedeemer.json .address: 0x6E78…970bd
  • On-chain owner() (chain.call 0x8da5cb5b): 0xce10739590001705F7FF231611ba4A48B2820327 = bsctestnet NormalTimelock ✓

Other addresses (from artifacts + NETWORK_ADDRESSES.bsctestnet):

  • XVS 0xB9e0E753630434d7863528cc73CB7AC638a7c8ff
  • VTreasury 0x8b293600c50d6fbdc6ed4251cc75ece29880276f

Signature / gate verification

  • sweepTokens(address,address) exists in the deployed ABI; source: Currency.wrap(token).transferAll(destination) → transfers the full balance, emitting exactly one ERC-20 Transfer.
  • Gate is onlyOwner (owner = NormalTimelock) — no ACM grant and no acceptOwnership() needed (Ownable2Step transfers ownership directly in the constructor).

Simulation (4 parts)

forking(114868878, …) — the block in which TokenRedeemer was deployed (contract present on the fork). before() seeds 1 XVS into the TokenRedeemer from the XVS Vault Proxy whale.

  1. Pre-VIP — TokenRedeemer holds the seeded XVS; owner() == NormalTimelock.
  2. testVip + expectEvents — full propose→vote→queue→execute; asserts one Transfer.
  3. Post-VIP — TokenRedeemer XVS balance == 0 (fully swept).
  4. Behavioral proof — Treasury XVS balance == before + swept amount.
$ npx hardhat test simulations/vip-664/bsctestnet.ts --fork bsctestnet
  At block #114868878
  Pre-VIP state
    ✔ TokenRedeemer holds the seeded XVS balance
    ✔ TokenRedeemer is owned by the NormalTimelock
  ... commands
    ✔ executes sweepTokens(address,address) successfully
  ... execution
    ✔ can be proposed
    ✔ should be voteable
    ✔ should be queued successfully
    ✔ should be executed successfully   (gasUsed=133870)
  Post-VIP state
    ✔ TokenRedeemer XVS balance is fully swept to zero
    ✔ Treasury XVS balance increased by the swept amount
  9 passing (25s)

Lint

  • npx eslint vips/vip-664/bsctestnet.ts simulations/vip-664/bsctestnet.ts → exit 0.
  • npx prettier --check "vips/vip-664/**" "simulations/vip-664/**" → "All matched files use Prettier code style!"
  • Note: the full-repo yarn lint OOMs in this environment (V8 heap exhaustion linting the entire repo), unrelated to these files; scoped eslint/prettier are clean.

Risks

  • None to mainnet — testnet-only VIP; a plain ERC-20 sweep with no oracle/price dependency and no parameter changes.

Opened by the Venus dev bot. Review required; the bot cannot merge.

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

@GitGuru7 GitGuru7 left a comment

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.

Add the testnet BscScan link next to the address entry.

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