Part of Quantstamp’s series
Quantstamp reviewed Venus Protocol (Venus Protocol V2) on 27 Jul 2023: 6 findings, 0 critical; 1 marked fixed, 5 open.
Report hosted on certificate.quantstamp.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 | 0 | 0 | 0 |
| Medium | 0 | 0 | 0 |
| Low | 5 | 0 | 1 |
If non-reentrant modifiers are used without adhering to the CEI pattern, it cannot guarantee that the global system state is reentrancy-free. There are schemes that can be exploited on a larger scale. All external calls must be executed after the state has been updated because multiple other contracts may depend on the current PegStability contract state. This violation is currently present in `swapStableForVAI()`.
As security standards develop, so does the Solidity language. In order to stay up to date with current practices, it's important to use a recent version of Solidity and recent conventions.
Smart contracts often have operations that can only be executed by a limited amount of addresses with special privileges. The access control mechanism of the current contract is enforced using the contract `AccessControlledV8` and the function `_checkAccessAllowed()`. The contract `PegStability.sol` gives the following privileges: 1. Any authorized address can pause (function `pause()`) and unpause (function `resume()`) the contract. Swaps are only possible when the contract is not paused. 2. Any authorized address can update the storage variables: * `feeIn` and `feeOut` within the range `0` to `9999`, which means a fee of `0%` to `99.99%`; * `vaiMintCap` which represents the maximum amount of VAI that can be minted by this contract; * `venusTreasury` which represents the beneficiary address of swap fees; * `oracle` which represents the address giving the current price of the stable token in USD. Note that the access control mechanism is currently managed via governance decisions.
The only bounds included for the `feeIn` or `feeOut` are that they do not meet or exceed 100%. This means the fees can be assigned high values such as 99%, which would result in a poor user experience.
While upgradability is not a vulnerability in itself, users should be aware that the `PegStability` implementation contract can be upgraded. This audit does not guarantee the behavior of future implementation contracts that `PegStability` may be upgraded to. Here are two examples of what could contain a malicious upgraded contract: - A function draining all stable tokens owned by the contract to an arbitrary address. - A function minting any amount of VAI (because the proxy address is authorized to mint VAI).
The report names a repository or files. Open the report to see its scope.
Repository and files the report names (2)
236 projects reviewed · 332 reports · latest Oct 2026
See Quantstamp’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