Venus - RiskOracle Integration

CertiKFiles named in the report

Audit

Part of CertiK’s series

CertiK reviewed Venus Protocol (Venus - RiskOracle Integration) on 19 Feb 2025: 19 findings, 0 critical; 15 marked fixed, 4 open.

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

Report hosted on skynet.certik.com.

Trustblock does not review code.

Findings19

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

SeverityOpenAcknowledgedFixed
Critical000
High200
Medium002
Low2013
MediumFunctions Will Always Return Success Even When ThFixed

The updates to the functions do not return the value obtained from the internal function call. As a result, they will always return the default value of 0, which is interpreted as success. This can result in assuming that the function was successfully called, when it was not, which can cause issues if further changes to the protocol are made assuming the function call was successful.

MediumUpdates May Be Called Out Of Order Or To PreventFixed

There are scenarios where a previous update can be processed after a later update, causing the protocol to use earlier updates than desired. In addition, it allows for scenarios where a previous update can be processed to ensure that the latest update will expire before it can be processed.

LowAliased Function Not Included In Updated InterfacFixed

The `setActionsPaused()` function is an aliased version of the `_setActionsPaused()` function. However, it is not included in the updated `ISetterFacet` interface.

LowDisabled Function Does Not Emit An ErrorFixed

The function `renounceOwnership()` is disabled and does not emit an error. This can lead to confusion if it is called, as the call will succeed but do nothing.

LowEvent Not IndexedFixed

If an event is not indexed in a smart contract, it means that the event's parameters are not tagged with the `indexed` keyword. This has implications for how the event data can be searched and filtered when looking through blockchain logs. Without indexing, the event will still emit the data as part of the transaction log, but users won't be able to query for these events using the parameters. They'll have to retrieve the entire set of logs and manually sift through them to find events with the specific data. This can be less efficient and more time-consuming, especially on a blockchain with a high volume of transactions and events.

LowInconsistent Grouping Of FunctionsFixed

The function `isMarketListed()` is not grouped with the other external view functions.

LowIndexed Dynamic Data Type In EventFixed

When attempting to index dynamic data types like `string`, `bytes`, `array`, or `struct` in Solidity, they don't get stored in their original form. Instead, the Ethereum log system stores the `Keccak-256` hash of these data types. While this approach ensures efficiency and cost-effectiveness, developers must be aware of it to correctly use and interpret logs, and they cannot retrieve the original string from its hash alone.

LowMissing Input ValidationFixed

The following input validations should be added to prevent unexpected behavior: **RiskStewardReceiver** - When `debounce` is set, it should be checked to be greater than the `UPDATE_EXPIRATION_TIME` to ensure that updates are not processed too quickly. **MarketCapsRiskSteward** - When setting the `maxDeltaBps` it is not checked to be less than some maximum value.

LowMissing Zero Address ValidationFixed

The input `riskSteward` is not checked to be `address(0)`. If it set to be `address(0)`, then it allows a risk parameter configuration to be active while being unsupported, since to check if an update type is supported the following check is used in the codebase ```solidity if (riskParameterConfigs[updateType].riskSteward == address(0)) { revert UnsupportedUpdateType(); } ```

LowRepeat CalculationFixed

`_validateUpdateStatus()` and `_processUpdate()` both do the same calculation with `_getMarketUpdateTypeKey()`.

Show 5 more
LowTypos And InconsistenciesFixed

The following typos and inconsistencies were found in the codebase: **RiskStewardReceiver** - The comment above the error `ConfigNotActive` are not consistent with the error. **MarketCapsRiskSteward** - Often `increase` is used when referring to the max bps, however, it is a limit for increasing and decreasing. - The comment above the error `UpdateNotInRange` uses "our" when it should use "out". - The comment for the parameter `update` in the function `processUpdate()` does not describe the parameter. - The comments above the function `processUpdate()` state that its access is controlled by `AccessControlManager`, when it is only callable by the `RISK_STEWARD_RECEIVER`. The `RiskStewardReceiver` may make calls to this in the functions `processUpdateById()` and `processUpdateByParameterAndMarket()` which can be called by any user. - There is an extra line spacing in the function `_updateSupplyCaps()` that is not consistent with the spacing of the contract.

LowUnnecessary ImportsFixed

The cited imports are not used within their respective contracts and can be removed.

LowUnnecessary InheritanceFixed

The `MarketCapsRiskSteward` inherits `AccessControlledV8` which already inherits `Ownable2StepUpgradeable` and `Initializable`, making it unnecessary to inherit them again. In addition instead of calling `__Ownable2Step_init` and `__AccessControlled_init_unchained()` separately, `__AccessControlled_init()` can be called. Similarly this is the case for `RiskStewardReceiver` as well.

LowUsage of Magic NumbersFixed

The contract contains "magic numbers" (hardcoded numeric values) without any explanation or constants to define their purpose. This reduces code readability and maintainability, making auditing harder and potentially hiding unintended logic or vulnerabilities.

LowUser-Defined GettersFixed

The linked functions are equivalent to the compiler-generated getter functions for the respective variables.

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

  • contracts/RiskSteward/IRiskStewardReceiver.sol
  • contracts/Comptroller/Diamond/interfaces/IMarketFacet.sol
  • contracts/Comptroller/Diamond/facets/MarketFacet.sol
  • contracts/RiskSteward/MarketCapsRiskSteward.sol
  • contracts/Comptroller/Diamond/facets/PolicyFacet.sol
  • contracts/RiskSteward/IRiskSteward.sol
  • contracts/Comptroller/Diamond/facets/SetterFacet.sol
  • contracts/Comptroller/Diamond/interfaces/ISetterFacet.sol
  • contracts/RiskSteward/RiskStewardReceiver.sol
  • contracts/Comptroller/Diamond/interfaces/IPolicyFacet.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,044 projects reviewed · 1,375 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