Part of CertiK’s series
CertiK reviewed Venus Protocol (Venus - Oracle Update) on 17 Jul 2023: 9 findings, 0 critical; 7 marked fixed, 2 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 | 0 | 0 | 7 |
In the contract `BinanceOracle`, the `DEFAULT_ADMIN_ROLE` can grant access to the following functions: - `setMaxStalePeriod()` - `setSymbolOverride()` Any compromise to the `DEFAULT_ADMIN_ROLE` or access to the functions may allow a hacker to do the following: - set the `maxStalePeriod` to any nonzero value. If they set the value to be very large, then this allows old prices to be valid. If the value is set to be very small, then reasonably recent prices will be considered invalid. - set the override symbol for a symbol to another value. This can reference the wrong feed or cause the calls to revert. --- In the contract `BoundValidator`, the `DEFAULT_ADMIN_ROLE` can grant access to the following functions: - `setValidateConfigs()` - `setValidateConfig()` Any compromise to the `DEFAULT_ADMIN_ROLE` or access to the functions may allow a hacker to do the following: - set the upper and lower bound validation ratios for an asset. In particular this allows them to set the ratio to be a very small range, in which case most time the price will not be validated. Or they can set the ratio to a large range, allowing prices to be validated when they are not reasonably close to one another. --- In the contract `ChainlinkOracle`, the `DEFAULT_ADMIN_ROLE` can grant access to the following functions: - `setDirectPrice()` - `setTokenConfigs()` - `setTokenConfig()` Any compromise to the `DEFAULT_ADMIN_ROLE` or access to the functions may allow a hacker to do the following: - change the forced prices for assets. If only this oracle is used as the main oracle, this would allow the hacker to set the exact price they want for an asset. If it is used as the pivot, then the value can be set to always validate the fallback or main oracle, even if the oracle is compromised and returns unreasonable prices. If it is used as the fallback, it can be used to get the best price that the pivot would validate or to validate the main oracles price, even if it is unreasonable. If this is the only oracle used, then this allows a hacker to set the price they want for an asset. - set the feed address and `maxStalePeriod` for an asset. In particular a hacker could set the feed address of the asset to a feed that is not for the asset and USD and use the incorrect price to exploit funds from the protocol. The hacker can also set the `maxStalePeriod` to a small value, so that reasonably recent prices are invalid, or to a large value so that old prices may be used. --- In the contract `PythOracle`, the `DEFAULT_ADMIN_ROLE` can grant access to the following functions: - `setUnderlyingPythOracle()` - `setTokenConfigs()` - `setTokenConfig()` Any compromise to the `DEFAULT_ADMIN_ROLE` or access to the functions may allow a hacker to do the following: - set the `underlyingPythOracle` to an address of a malicious contract that will return incorrect prices that can be used to exploit the protocol. - set the `pythId` and `maxStalePeriod` for an asset. In particular a hacker could set the `pythId` of the asset to a feed that is not for the asset and USD and use the incorrect price to exploit funds from the protocol. The hacker can also set the `maxStalePeriod` to a small value, so that reasonably recent prices are invalid, or to a large value so that old prices may be used. --- In the contract `TwapOracle`, the `DEFAULT_ADMIN_ROLE` can grant access to the following functions: - `setTokenConfigs()` - `setTokenConfig()` Any compromise to the `DEFAULT_ADMIN_ROLE` or access to the functions may allow a hacker to do the following: - set the `baseUnit`, `pancakePool`, `isBnbBased`, `isReversedPool`, and `anchorPeriod` for any asset. A hacker can change these values to manipulate the price that is given for the asset to exploit funds from the protocol. --- In the contract `ResilientOracle`, the `DEFAULT_ADMIN_ROLE` can grant access to the following functions: - `pause()` - `unpause()` - `setOracle()` - `enableOracle()` - `setTokenConfigs()` - `setTokenConfig()` Any compromise to the `DEFAULT_ADMIN_ROLE` or access to the functions may allow a hacker to do the following: - pause the oracle, so that any call to `getUnderlyingPrice()` or `getPrice()` will revert. This can allow a hacker to perform a denial of service attack. - unpause the oracle, allowing `getUnderlyingPrice()` or `getPrice()` to be called. This can allow the hacker to exploit the protocol if it was paused due to a bug. - set the main, pivot, or fallback oracles for an asset. A hacker could change these addresses to malicious contracts that will return incorrect prices allowing the hacker to exploit funds from the protocol. - set if the main, pivot, or fallback oracles are enabled for an asset. If a hacker has compromised the main oracle, they can disable the pivot so that the main price will be used and the hacker can use the incorrect price to exploit funds from the protocol. They can also perform a denial of service by disabling the oracles.
`BinanceOracle`, `BoundValidator`, `ChainlinkOracle`, `PythOracle`, `TwapOracle`, and `ResilientOracle` are upgradeable contracts. The owner 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 as well as change the logic of the contract to return incorrect prices.
The report names a repository or files. Open the report to see its scope.
Repository and files the report names (8)
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