Venus - Correlated token oracles

CertiKFiles named in the report

Audit

Part of CertiK’s series

CertiK reviewed Venus Protocol (Venus - Correlated token oracles) on 12 Apr 2024: 12 findings, 0 critical; 9 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.

Findings12

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

SeverityOpenAcknowledgedFixed
Critical000
High100
Medium001
Low208
MediumMissing Validation Of `PendleOracle` ParametersFixed

In the contract `PendleOracle`, the cardinality of the observations is not checked to be able to handle the `TWAP_DURATION`. In addition, the oldest observation is not checked to have been at least the `TWAP_DURATION` in the past.

LowBNB Address Input Can Be ConstantFixed

Many of the oracle contracts take the BNB address as an input. However, other contracts in the codebase use the constant address of 0xbBbBBBBbbBBBbbbBbbBbbbbBBbBbbbbBbBbbBBbB.

LowCustom Errors Can Be UsedFixed

Function `getPrice()` within contract `CorrelatedTokenOracle` uses a string error message for the check that the input `asset` is `CORRELATED_TOKEN`.

LowDiscussion On Exchange Rate ChoiceFixed

In some of the oracle contracts, there are multiple methods to fetch the exchange rate. - In `WeETHOracle`, it gets the underlying amount via the call `IWeETH(CORRELATED_TOKEN).getEETHByWeETH(1 ether)`. However, this makes the external call `liquidityPool.amountForShare(_weETHAmount);` so that instead `amountForShare()` could be called directly on the `liquidityPool`. - In `WstETHOracle`, it gets the underlying amount via the call `IStETH(UNDERLYING_TOKEN).getPooledEthByShares(1 ether)`. However, this could also be obtained by calling `getStETHByWstETH()` in the `wstETH` contract, which then makes an external call `stETH.getPooledEthByShares()`.

LowDiscussion On Use Cases Of `OneJumpOracle`Fixed

The `OneJumpOracle` is designed to fetch the amount of underlying token for 1 correlated token via an intermediate oracle. For example, this could be used on Arbitrum to get the wstETH-ETH exchange rate via ChainLink assuming stETH is 1 to 1 with ETH. We would like to know the intended use cases so that they can be properly considered.

LowInconsistent Input Naming ConventionFixed

The usage of a leading underscore or not for input names is inconsistent.

LowParameter Order Can Be SwappedFixed

The `constructor` of the `SFraxOracle` contract places input `_frax` as the first parameter and `_sFrax` as the second parameter, then swaps their order when used in the `constructor` of `CorrelatedTokenOracle`.

LowPotential Divide by ZeroFixed

Function `getUnderlyingAmount` in contract `StkBNBOracle` is missing a check ensuring that `poolTokenSupply` is nonzero before using it in division. The expression `(exchangeRateData.totalWei * EXP_SCALE) / exchangeRateData.poolTokenSupply` may divide by zero.

LowTypos and InconsistenciesFixed

### CorrelatedTokenOracle.sol - The comment above function `getPrice()` misspells “scaled” as “scalked.” - The comment within function `getPrice()` states that the return value is `underlyingAmount (for 1 liquid staked token) * underlyingUSDPrice / 1e18` however, the product is divided by `10**decimals` which may not be `1e18` in general. - Comments throughout both functions `getPrice()` and `getUnderlyingAmount()` refer to a “liquid staked token” when it is more accurate to refer to a “correlated token” since the correlated token may not be a liquid staked token in every case of use. ### PendleOracle.sol - The comment above the contract `PendleOracle` uses article “an” instead of article “a” in the notice: `This oracle fetches the price of an pendle token`

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 (12)

  • contracts/oracles/SlisBNBOracle.sol
  • contracts/oracles/PendleOracle.sol
  • contracts/oracles/AnkrBNBOracle.sol
  • contracts/oracles/SFraxOracle.sol
  • contracts/oracles/OneJumpOracle.sol
  • contracts/oracles/WBETHOracle.sol
  • contracts/oracles/WeETHOracle.sol
  • contracts/oracles/StkBNBOracle.sol
  • contracts/oracles/SFrxETHOracle.sol
  • contracts/oracles/BNBxOracle.sol
  • contracts/oracles/common/CorrelatedTokenOracle.sol
  • contracts/oracles/WstETHOracle.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