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
HighCentralized Control of Contract UpgradeOpen

In each of the contracts cited, the role `admin` has the authority to update the implementation contract. Any compromise to the `admin` account may allow a hacker to take advantage of this authority and change the implementation contract which is pointed by proxy and therefore execute potential malicious functionality in the implementation contract.

LowOracles Assume Tokens Have 18 DecimalsOpen

While the tokens used all have 18 decimals, this is implicitly assumed in the `getUnderlyingAmount()` functions where `1 ether` of `EXP_SCALE` is used. To be more explicit, the token decimals can be used to ensure future oracles take into consideration that this value is dependent on the token decimals.

LowThird Party's Rate May Be ManipulatedOpen

Some of the referenced tokens utilize ERC4626 vaults, whose rate can be manipulated. Additionally, depending on the implementation of the other tokens and staking contracts, their rates may also be manipulatable. For example `sFrax` is an ERC4626 vault utilizing an internal balance for the `totalAssets()`. In this case shares are converted to assets by multiplying by `totalAssets()` and dividing by the total supply of shares. However, this can be manipulated via multiple calls to `deposit()` and `redeem()` by depositing an amount that would cause the maximum rounding error. The rounded amount is then distributed amongst the shares, increasing their value and thus allowing for subsequent deposit calls to take advantage of a greater rounding error. Note that the `sFrax.deposit()` function makes the following check ```solidity require((shares = previewDeposit(assets)) != 0, "ZERO_SHARES"); ``` Which, is why the exploiter always chooses the maximum amount of assets to deposit, that will give 1 share. For example assume that `totalSupply = 1` and `storedTotalAssets = 2` and `_rewardToDistribute = 0` so that `totalAssets() = 2`, so the initial rate is 1 share to 2 assets. - Exploiter calls `deposit(3)` to receive 3*1/2 = 1 share and then `totalSupply = 2` and `totalAssets() = 5`. - Exploiter then calls `redeem(1)` to receive 5 * 1 /2 = 2 assets and `totalSupply = 1` and `totalAssets() = 3`. Rate is now 3 assets to 1 share. - Exploiter calls `deposit(5)` to receive 5*1/3 = 1 share and then `totalSupply = 2` and `totalAssets() = 8`. - Exploiter then calls `redeem(1)` to receive 8 * 1 /2 = 4 assets and `totalSupply = 1` and `totalAssets() = 4`. Rate is now 4 assets to 1 share. - Exploiter calls `deposit(7)`to receive 7*1/4 = 1 share and then `totalSupply = 2` and `totalAssets() = 11`. - Exploiter then calls `redeem(1)` to receive 11 * 1 /2 = 5 assets and `totalSupply = 1` and `totalAssets() = 6`. Rate is now 6 assets to 1 share. - This continues until the attacker reaches the desired manipulated rate for each share. Note, that the cost of this manipulation is at least the desired rate manipulation times the `totalSupply` they do not own. So that if the `totalSupply` not held by a single entity is great enough, then the price manipulation is infeasible.

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