Summary
We propose to perform the following changes, taking into account the increase in the block rate on opBNB, from one block per second to one block every 0.5 second:
- Upgrade implementation of every VToken contract, with the new blocks per year (63,072,000)
- Upgrade the implementation of the XVSVaultProxy, and set the blocks per year to the new value
- update the interest rate models of every VToken, using the CheckpointView contract, that will be able to calculate the interest rates considering when the block rate will change on opBNB
Description
These changes are mandatory to accommodate the Venus Protocol to the Lorentz hardfork on opBNB: BEP-543: opBNB Short Block Interval, which will happen on April 21st, at 3:00AM UTC.
The interest rate contracts of every market will be replaced with the CheckpointView contract. CheckpointView is a contract that will call a different contract (in this case, a different interest rate contract) depending on the current timestamp. This way, the VToken contracts will consider the right interest rates on every block, being transparently switched under the hood after the hardfork on the opBNB network.
We use an auxiliary contract SetCheckpointOpbnbmainnet to change every interest rate contract in one transaction.
VToken and XVSVault implementation had a constant value with the number of blocks per year. The VToken implementation has been simply redeployed using the new value. The XVSVault implementation has been redeployed adding a new function to support future changes in the blocks per year.
Security and additional considerations
We applied the following security procedures for this upgrade:
- Audits: Certik and Fairyproof have audited the deployed code
- VIP execution simulation: in a simulation environment, validating the new implementations and interest rate models are properly set on opBNB, with the right parameters
- Deployment on testnet: the same upgrade has been performed on opBNB testnet, and used in the Venus Protocol testnet deployment
Audit reports
- Fairyproof audit report (2025/04/14)
- Certik audit audit report: it will be published in the following days
Deployed contracts
opBNB mainnet
- New VToken implementation: 0x8Fa6460437F6Ba76808C93108F2134c5D6394D94
- New XVSVault implementation: 0x785BEF8B6dB40E86fA3749b44cD67C14945E2a71
opBNB testnet
- New VToken implementation: 0x25E034878C9873D780f2D82D22A25481aA8c74F6
- New XVSVault implementation: 0x6E09f32F94B2d5056431710BA3eEF75aed40C3b1
References