Part of CertiK’s series
CertiK reviewed Venus Protocol (Venus - Diamond Comptroller (Subscription Audit 5)) on 3 Aug 2023: 10 findings, 0 critical; 7 marked fixed, 3 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 | 0 |
| Low | 1 | 0 | 7 |
In the contract `MarketFacet` the role set for `"_supportMarkt(address)"` has authority over the functions listed below - `_supportMarket()` Any compromise to this account may allow a hacker to take advantage of this authority and add a malicious token address they control as a market allowing them to steal other assets. --- In the contract `RewardFacet` the role `admin` or `comptrollerImplementation` has authority over the functions listed below - `_grantXVS()` Any compromise to either account may allow a hacker to take advantage of this authority and send any address the full balance of `XVS` held by the Comptroller. --- In the contract `SetterFacet` the role `admin` has authority over the functions listed below - `_setPriceOracle()` - `_setCloseFactor()` - `_setAccessControl()` - `_setLiquidatorContract()` - `_setPauseGuardian()` - `_setVAIController()` - `_setVAIMintRate()` - `_setTreasuryData()` - `_setComptrollerLens()` - `_setVenusVAIVaultRate()` - `_setVAIVaultInfo()` Any compromise to the `admin` account may allow a hacker to take advantage of this authority and - change the `oracle` to a malicious one. - update the `closeFactorMantissa` to any value, even outside the maximum and minimum specified range. - change the `accessControl` contract so that other privileged functions can be exploited. - change the `liquidatorContract` to one they control. - change the pause guardian in order to block functionality the guardian controls. - update the `vaiController` which is an address that can update the `mintedVAIs` mapping for any address with any amount. - adjust the `vaiMintRate` used in determining the amount of mintable VAI in the `VAIController` contract. - change the `treasuryAddress` to one they control, and adjust the `treasuryPercent` to the maximum value. - change the `comptrollerLens` - update information about the VAI Vault such as its rate of issuance, the `vaiVaultAddress`, the start of its release, and the minimum amount needed for release to the vault. The following functions have their own assigned privileged account based on their function signature: - `_setCollateralFactor()` - `_setLiquidationIncentive()` - `_setMarketBorrowCaps()` - `_setMarketSupplyCaps()` - `_setActionsPaused()` Any compromise to the one of the accounts with the associated privilege may allow a hacker to take advantage of this authority and - change the collateral factor or liquidation incentive to values that allow for manipulation of the protocol. - pause actions to prevent users' ability to, for example, exit markets, or to prevent a position from being liquidated. - adjust the market borrowCaps and supplyCaps so that, for example, a larger borrow is possible. The role `treasuryGuardian` has authority over `_setTreasuryData()`. Any compromise to the `treasuryGuardian` may allow a hacker to take advantage of this authority and change the `treasuryAddress` to one they control, and adjust the `treasuryPercent` to the maximum value. --- In the contract `Diamond.sol` the role `admin` has authority over the functions listed below - `diamondCut()` Any compromise to the `admin` account may allow a hacker to take advantage of this authority and - remove function signature assignments from the storage of the contract, preventing use of the functions from the `Unitroller` - incorrectly set up the association between a function signature and a facet address - use a malicious facet address for implementation of a function in the `Unitroller`
`Diamond.sol` is an upgradeable contract, the `admin` 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.
Functions `_setVenusVAIVaultRate()` and `_setVAIVaultInfo()` were updated to include the following logic: ```solidity if (vaiVaultAddress != address(0)) { releaseToVault(); } ``` This check is also performed in functions `distributeSupplierVenus()` and `distributeBorrowerVenus()`. In function `_setVAIVaultInfo()`, the `vaiVaultAddress` can be updated to any address. Function `releaseToVault()` however uses address `vaiVaultAddress` in interface `IVAIVault` to call function `updatePendingRewards()`. If the address `vaiVaultAddress` is set to an externally owned account, or a contract which does not include this function, then the call will revert, which keeps any calls to the functions that make the call to `releaseToVault()` revert. Since `_setVAIVaultInfo()` is the function used to update the address, this would prevent the function from being called to correct the issue. The severity is set to minor since the contract logic can be updated to change the logic in the scenario where this occurs.
The report names a repository or files. Open the report to see its scope.
Repository and files the report names (18)
1,045 projects reviewed · 1,376 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