VBNBAdmin
VBNBAdmin
Section titled “VBNBAdmin”This contract is the “admin” of the vBNB market, reducing the reserves of the market, sending them to the ProtocolShareReserve contract,
and allowing the executions of the rest of the privileged functions in the vBNB contract (after checking if the sender has the required permissions).
Solidity API
Section titled “Solidity API”address of vBNB
contract VTokenInterface vBNBaddress of WBNB contract
contract IWBNB WBNBinitialize
Section titled “initialize”Used to initialize non-immutable variables
function initialize(contract IProtocolShareReserve _protocolShareReserve, address accessControlManager) externalsetProtocolShareReserve
Section titled “setProtocolShareReserve”PSR setter.
function setProtocolShareReserve(contract IProtocolShareReserve protocolShareReserve_) externalParameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
| protocolShareReserve_ | contract IProtocolShareReserve | Address of the PSR contract |
📅 Events
Section titled “📅 Events”- Emits ProtocolShareReserveUpdated event.
⛔️ Access Requirements
Section titled “⛔️ Access Requirements”- Only owner (Governance)
reduceReserves
Section titled “reduceReserves”Reduce reserves of vBNB, wrap them and send them to the PSR contract
function reduceReserves(uint256 reduceAmount) externalParameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
| reduceAmount | uint256 | amount of reserves to reduce |
📅 Events
Section titled “📅 Events”- Emits ReservesReduced event.
setInterestRateModel
Section titled “setInterestRateModel”Sets the interest rate model of the vBNB contract
function setInterestRateModel(address newInterestRateModel) public returns (uint256)Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
| newInterestRateModel | address | Address of the new interest rate model |
⛔️ Access Requirements
Section titled “⛔️ Access Requirements”- Controlled by ACM
receive
Section titled “receive”Invoked when BNB is sent to this contract
receive() external payable⛔️ Access Requirements
Section titled “⛔️ Access Requirements”- Only vBNB is considered a valid sender
fallback
Section titled “fallback”Invoked when called function does not exist in the contract. The function will be executed in the vBNB contract.
fallback(bytes data) external payable returns (bytes)⛔️ Access Requirements
Section titled “⛔️ Access Requirements”- Only owner (Governance)