Part of CertiK’s series
CertiK reviewed Venus Protocol (Venus - Unlist Market & Borrow Cap) on 9 Apr 2024: 6 findings, 0 critical; 4 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 | 1 | 0 | 0 |
| Medium | 0 | 0 | 0 |
| Low | 1 | 0 | 4 |
From Solidity `v0.8.4`, there are more gas-efficient ways to explain to users why an operation failed than through strings. Using custom errors can significantly reduce the size of the deployed bytecode and reduce the gas cost when calls revert.
There is a difference in how the borrow cap is used between the Isolated Pools Comptroller and the Core pool Comptroller. In the Isolated Pools Comptroller, the function `preBorrowHook()` requires that `nextTotalBorrows` is less or equal to the `borrowCap`. Within the Core pool Comptroller, function `borrowAllowed()` requires that `nextTotalBorrows` is strictly less than the `borrowCap`.
The possible actions to pause within a Comptroller are: ```solidity enum Action { MINT, REDEEM, BORROW, REPAY, SEIZE, LIQUIDATE, TRANSFER, ENTER_MARKET, EXIT_MARKET } ``` When a market is unlisted, it is only ensured that the actions of `BORROW`, `MINT`, `REDEEM`, `REPAY`, `ENTER_MARKET`, and `LIQUIDATE` have been paused. It is not checked that the actions of `SEIZE`, `TRANSFER`, or `EXIT_MARKET` have been paused, even though these actions should still be paused. As a consequence, these three actions will be available for continued use, right up until a market has been unlisted, even if all other actions have been paused. For example, a seizure may still be initiated by another listed market. Could you please provide more information on the decision to exclude these actions from being confirmed to be paused before unlisting the market? This allows such actions to never be set to paused, even after a market is unlisted, although the three actions would still be disabled from other checks made.
### PR-429 MarketFacet - In the comments above `unlistMarket()` it has "Unlist an market" instead of "Unlist a market". ### PR-349 Comptroller - In the comments above `unlistMarket()` it has "Unlist an market" instead of "Unlist a market". - In the comments above `unlistMarket()` it has "@dev Pauses all actions, sets borrow/supply caps to 0 and sets collateral factor to 0." However, the function checks these and does not set them. ### PR4-39 ComptrollerStorage - The comments above `borrowCaps` states "Defaults to zero which corresponds to unlimited borrowing.", however, the functionality has changed so that zero corresponds to borrowing being disallowed.
The report names a repository or files. Open the report to see its scope.
Repository and files the report names (4)
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