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.
Report hosted on skynet.certik.com.
Trustblock does not review code.
Statuses are the security firm’s own, from its report.
| Severity | Open | Acknowledged | Fixed |
|---|---|---|---|
| Critical | 0 | 0 | 0 |
| High | 2 | 0 | 0 |
| Medium | 0 | 0 | 2 |
| Low | 2 | 0 | 13 |
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.
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.
The `setActionsPaused()` function is an aliased version of the `_setActionsPaused()` function. However, it is not included in the updated `ISetterFacet` interface.
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.
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.
The function `isMarketListed()` is not grouped with the other external view functions.
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.
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.
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(); } ```
`_validateUpdateStatus()` and `_processUpdate()` both do the same calculation with `_getMarketUpdateTypeKey()`.
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.
The cited imports are not used within their respective contracts and can be removed.
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.
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.
The linked functions are equivalent to the compiler-generated getter functions for the respective variables.
The report names a repository or files. Open the report to see its scope.
Repository and files the report names (10)
1,044 projects reviewed · 1,375 reports · latest May 2025
See CertiK’s auditsSomething 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