Venus - Oracle

CertiKFiles named in the report

Audit

Part of CertiK’s series

CertiK reviewed Venus Protocol (Venus - Oracle) on 22 May 2023: 17 findings, 0 critical; 14 marked fixed, 3 open.

No open critical findings
Open the reportOpen Venus Protocol’s security record

Report hosted on skynet.certik.com.

Trustblock does not review code.

Findings17

Statuses are the security firm’s own, from its report.

SeverityOpenAcknowledgedFixed
Critical000
High200
Medium002
Low1012
HighCentralization Related RisksOpen

In the contract `BinanceOracle`, the `DEFAULT_ADMIN_ROLE` can grant access to the following functions: - `setMaxStalePeriod()` Any compromise to the `DEFAULT_ADMIN_ROLE` or access to the functions may allow a hacker to do the following: - set the `maxStalePeriod` to any nonzero value. If they set the value to be very large, then this allows old prices to be valid. If the value is set to be very small, then reasonably recent prices will be considered invalid. --- In the contract `BoundValidator`, the `DEFAULT_ADMIN_ROLE` can grant access to the following functions: - `setValidateConfigs()` - `setValidateConfig()` Any compromise to the `DEFAULT_ADMIN_ROLE` or access to the functions may allow a hacker to do the following: - set the upper and lower bound validation ratios for an asset. In particular this allows them to set the ratio to be a very small range, in which case most time the price will not be validated. Or they can set the ratio to a large range, allowing prices to be validated when they are not reasonably close to one another. --- In the contract `ChainlinkOracle`, the `DEFAULT_ADMIN_ROLE` can grant access to the following functions: - `setUnderlyingPrice()` - `setDirectPrice()` - `setTokenConfigs()` - `setTokenConfig()` Any compromise to the `DEFAULT_ADMIN_ROLE` or access to the functions may allow a hacker to do the following: - change the forced prices for assets or the underlying assets of `vToken`. If only this oracle is used as the main oracle, this would allow the hacker to set the exact price they want for an asset. If it is used as the pivot, then the value can be set to always validate the fallback or main oracle, even if the oracle is compromised and returns unreasonable prices. If it is used as the fallback, it can be used to get the best price that the pivot would validate or to validate the main oracles price, even if it is unreasonable. If this is the only oracle used, then this allows a hacker to set the price they want for an asset. - set the feed address and `maxStalePeriod` for an asset. In particular a hacker could set the feed address of the asset to a feed that is not for the asset and USD and use the incorrect price to exploit funds from the protocol. The hacker can also set the `maxStalePeriod` to a small value, so that reasonably recent prices are invalid, or to a large value so that old prices may be used. --- In the contract `PythOracle`, the `DEFAULT_ADMIN_ROLE` can grant access to the following functions: - `setUnderlyingPythOracle()` - `setTokenConfigs()` - `setTokenConfig()` Any compromise to the `DEFAULT_ADMIN_ROLE` or access to the functions may allow a hacker to do the following: - set the `underlyingPythOracle` to an address of a malicious contract that will return incorrect prices that can be used to exploit the protocol. - set the `pythId` and `maxStalePeriod` for an asset. In particular a hacker could set the `pythId` of the asset to a feed that is not for the asset and USD and use the incorrect price to exploit funds from the protocol. The hacker can also set the `maxStalePeriod` to a small value, so that reasonably recent prices are invalid, or to a large value so that old prices may be used. --- In the contract `TwapOracle`, the `DEFAULT_ADMIN_ROLE` can grant access to the following functions: - `setTokenConfigs()` - `setTokenConfig()` Any compromise to the `DEFAULT_ADMIN_ROLE` or access to the functions may allow a hacker to do the following: - set the `baseUnit`, `pancakePool`, `isBnbBased`, `isReversedPool`, and `anchorPeriod` for any asset. A hacker can change these values to manipulate the price that is given for the asset to exploit funds from the protocol. --- In the contract `ResilientOracle`, the `DEFAULT_ADMIN_ROLE` can grant access to the following functions: - `pause()` - `unpause()` - `setOracle()` - `enableOracle()` - `setTokenConfigs()` - `setTokenConfig()` Any compromise to the `DEFAULT_ADMIN_ROLE` or access to the functions may allow a hacker to do the following: - pause the oracle, so that any call to `getUnderlyingPrice()` will revert. This can allow a hacker to perform a denial of service attack. - unpause the oracle, allowing `getUnderlyingPrice()` to be called. This can allow the hacker to exploit the protocol if it was paused due to a bug. - set the main, pivot, or fallback oracles for an asset. A hacker could change these addresses to malicious contracts that will return incorrect prices allowing the hacker to exploit funds from the protocol. - set if the main, pivot, or fallback oracles are enabled for an asset. If a hacker has compromised the main oracle, they can disable the pivot so that the main price will be used and the hacker can use the incorrect price to exploit funds from the protocol. They can also perform a denial of service by disabling the oracles.

HighCentralized Control of Contract UpgradeOpen

`BinanceOracle`, `BoundValidator`, `ChainlinkOracle`, `PythOracle`, `TwapOracle`, and `ResilientOracle` are upgradeable contracts. The owner can upgrade the contract without the community's commitment. If an attacker compromises the account, he can change the implementation of the contract and drain tokens from the contract as well as change the logic of the contract to return incorrect prices.

LowCan Use Custom ErrorsOpen

From Solidity `v0.8.4`, there are more gas-efficient ways to explain to users why an operation failed than through strings. Using custom errors can significantly reduce the size of the deployed bytecode and reduce the gas cost when calls revert. We give the relevant lines in `ChainlinkOracle`, however, this applies to all files.

Contracts in scope

No deployed address is recorded for this audit.

The report names a repository or files. Open the report to see its scope.

Repository and files the report names (13)

  • contracts/oracles/BinanceOracle.sol
  • contracts/oracles/ChainlinkOracle.sol
  • contracts/ResilientOracle.sol
  • contracts/interfaces/VBep20Interface.sol
  • contracts/oracles/PythOracle.sol
  • contracts/interfaces/FeedRegistryInterface.sol
  • contracts/interfaces/PublicResolverInterface.sol
  • contracts/interfaces/OracleInterface.sol
  • contracts/interfaces/PythInterface.sol
  • contracts/libraries/PancakeLibrary.sol
  • contracts/oracles/BoundValidator.sol
  • contracts/interfaces/SIDRegistryInterface.sol
  • contracts/oracles/TwapOracle.sol

Part of Venus Protocol’s security record

Venus Protocol
Audits67 audits by 7 firmsLast audit Sep 2025, by Quantstamp.
Critical findingsNo open critical findingsAcross the 67 reports, 4 critical findings were reported. Each is marked fixed by the firm that reported it.
IncidentIncident 12 May 2022Source: De.Fi incident database.
Open Venus Protocol’s security record

Security firm

CertiK

1,045 projects reviewed · 1,376 reports · latest May 2025

See CertiK’s audits

Something wrong on this page? A missing report, a wrong date, a finding that was fixed since. Tell us and we check it against its source.

Tell us