VToken
Venus's vToken Contract
Abstract base for vTokens
Solidity API
transfer
Transfer amount
tokens from msg.sender
to dst
Parameters
Return Values
transferFrom
Transfer amount
tokens from src
to dst
Parameters
Return Values
approve
Approve spender
to transfer up to amount
from src
Parameters
Return Values
balanceOfUnderlying
Get the underlying balance of the owner
Parameters
Return Values
totalBorrowsCurrent
Returns the current total borrows plus accrued interest
Return Values
borrowBalanceCurrent
Accrue interest to updated borrowIndex and then calculate account's borrow balance using the updated borrowIndex
Parameters
Return Values
seize
Transfers collateral tokens (this market) to the liquidator.
Parameters
Return Values
_setPendingAdmin
Begins transfer of admin rights. The newPendingAdmin must call _acceptAdmin
to finalize the transfer.
Parameters
Return Values
_acceptAdmin
Accepts transfer of admin rights. msg.sender must be pendingAdmin
Return Values
_setReserveFactor
accrues interest and sets a new reserve factor for the protocol using _setReserveFactorFresh
Return Values
setAccessControlManager
Sets the address of the access control manager of this contract
Parameters
Return Values
_reduceReserves
Accrues interest and reduces reserves by transferring to protocol share reserve
Parameters
Return Values
allowance
Get the current allowance from owner
for spender
Parameters
Return Values
balanceOf
Get the token balance of the owner
Parameters
Return Values
getAccountSnapshot
Get a snapshot of the account's balances, and the cached exchange rate
Parameters
Return Values
supplyRatePerBlock
Returns the current per-block supply interest rate for this vToken
Return Values
borrowRatePerBlock
Returns the current per-block borrow interest rate for this vToken
Return Values
getCash
Get cash balance of this vToken in the underlying asset
Return Values
setReduceReservesBlockDelta
Governance function to set new threshold of block difference after which funds will be sent to the protocol share reserve
Parameters
setProtocolShareReserve
Sets protocol share reserve contract address
Parameters
initialize
Initialize the money market
Parameters
exchangeRateCurrent
Accrue interest then return the up-to-date exchange rate
Return Values
accrueInterest
Applies accrued interest to total borrows and reserves
_setComptroller
Sets a new comptroller for the market
Return Values
_setInterestRateModel
Accrues interest and updates the interest rate model using _setInterestRateModelFresh
Parameters
Return Values
exchangeRateStored
Calculates the exchange rate from the underlying to the VToken
Return Values
borrowBalanceStored
Return the borrow balance of account based on stored data
Parameters
Return Values
Last updated