Venus - Vaults Audit

CertiKFiles named in the report

Audit

Part of CertiK’s series

CertiK reviewed Venus Protocol (Venus - Vaults Audit) on 4 Jul 2023: 10 findings, 0 critical; 3 marked fixed, 7 open.

No open critical findings
Open the reportOpen Venus Protocol’s security record

Report hosted on skynet.certik.com.

Trustblock does not review code.

Findings10

Statuses are the security firm’s own, from its report.

SeverityOpenAcknowledgedFixed
Critical000
High100
Medium000
Low603
HighCentralization Related RisksOpen

In the contract `VRTVault` the role `admin` has authority over the functions shown in the diagram below. Any compromise to the `admin` account may allow the hacker to take advantage of this authority and modify the access control. ![](https://accelerator-tasks-prod.acc.corp.certik.com/670ff33ce3ba40aea3e6b8f5c500b7c5/diagrams/centralization_VRTVault-VRTVault-admin.svg) ---- Other privileged accounts have authority over the functions: - `pause()`; - `resume()`; - `withdrawBep20()`; - `setLastAccruingBlock()`; Any compromise to one of these accounts may allow the hacker to take advantage of this authority and: - pause the contract, preventing users from withdrawing their tokens; - transfer any token from the contract to an address they control; - set an extreme value to `lastAccruingBlock` so interests keep being accrued. ----- ----- In the contract `VAIVault` the role `admin` has authority over the functions shown in the diagram below. Any compromise to the `admin` account may allow the hacker to take advantage of this authority and modify the access control. ![](https://accelerator-tasks-prod.acc.corp.certik.com/670ff33ce3ba40aea3e6b8f5c500b7c5/diagrams/centralization_VAIVault-VAIVault-admin.svg) ---- Other privileged accounts have authority over the functions: - `pause()`; - `resume()`. Any compromise to one of the privileged addresses may allow the hacker to take advantage of this authority and pause or unpause the contract. ----- ----- In the contract `XVSStore` the role `admin` has authority over the functions shown in the diagram below. Any compromise to the `admin` account may allow the hacker to take advantage of this authority and : - set an address they control as the new `pendingAdmin`; - set an address they control as the new `owner`; - set any malicious token contract as a reward token. ![](https://accelerator-tasks-prod.acc.corp.certik.com/670ff33ce3ba40aea3e6b8f5c500b7c5/diagrams/centralization_XVSStore-XVSStore-admin.svg) ---- In the contract `XVSStore` the role `owner` has authority over the functions shown in the diagram below. Any compromise to the `owner` account may allow the hacker to take advantage of this authority and: - transfer reward tokens from the contract to an address they control; - transfer any token to its own address. - set any malicious token contract as a reward token. ![](https://accelerator-tasks-prod.acc.corp.certik.com/670ff33ce3ba40aea3e6b8f5c500b7c5/diagrams/centralization_XVSStore-XVSStore-owner.svg) ---- In the contract `XVSStore` the role `pendingAdmin` has authority over the functions shown in the diagram below. Any compromise to the `pendingAdmin` account may allow the hacker to take advantage of this authority and become the new admin. ![](https://accelerator-tasks-prod.acc.corp.certik.com/670ff33ce3ba40aea3e6b8f5c500b7c5/diagrams/centralization_XVSStore-XVSStore-pendingAdmin.svg) ----- ----- In the contract `XVSVault` the role `admin` has authority over the functions shown in the diagram below. Any compromise to the `admin` account may allow the hacker to take advantage of this authority and modify the access control. ![](https://accelerator-tasks-prod.acc.corp.certik.com/670ff33ce3ba40aea3e6b8f5c500b7c5/diagrams/centralization_XVSVault-XVSVault-admin.svg) ---- Other privileged accounts have authority over the functions: - `pause()` - `resume()` - `add()` - `set()` - `setRewardAmountPerBlock()` - `setWithdrawalLockingPeriod()` Any compromise to one of the privileged addresses may allow the hacker to take advantage of this authority and - pause or unpause the contract; - add a new pool with malicious tokens and set its reward allocation very high to steal reward tokens; - set a significantly high reward amount per block for certain tokens, allowing the hacker to earn more reward tokens than expected. - set the `lockPeriod` of a specific pool extremely high so users cannot request withdrawal anymore.

LowCheck Effect Interaction Pattern Violated (Out-ofOpen

A reentrancy attack can occur when the contract creates a function that makes an external call to another untrusted contract before resolving any effects. If the attacker can control the untrusted contract, they can make a recursive call back to the original function, repeating interactions that would have otherwise not run after the external call resolved the effects. *This finding is considered minor because the reentrancy only causes out-of-order events.* ### External call(s) ```solidity=193 IXVSStore(xvsStore).setRewardToken(_rewardToken, true); ``` ### Events emitted after the call(s) ```solidity=195 emit PoolAdded(_rewardToken, poolInfo.length - 1, address(_token), _allocPoint, _rewardPerBlock, _lockPeriod); ```

LowComparison to Boolean ConstantOpen

Boolean constants can be used directly and do not need to be compared to true or false. ```solidity=76 require(vaultPaused == false, "Vault is paused"); ``` --- ```solidity=56 require(vaultPaused == false, "Vault is paused"); ``` --- ```solidity=46 require(rewardTokens[token] == true, "only reward token can"); ``` --- ```solidity=108 require(vaultPaused == false, "Vault is paused"); ```

LowMissing Emit EventsOpen

There should always be events emitted in the sensitive functions that are controlled by centralization roles.

LowMissing Upper BoundOpen

In `VRTVault`, the function `setLastAccruingBlock()` allows setting `lastAccruingBlock` to an arbitrary value. ---- In `XVSVault`: - the function `setRewardAmountPerBlock()` allows setting `rewardTokenAmountsPerBlock[_rewardToken]` to an arbitrary value. - the function `setWithdrawalLockingPeriod()` allows setting `pool.lockPeriod` to an arbitrary value.

LowMissing Zero Address ValidationOpen

Addresses are not validated before assignment or external calls, potentially allowing the use of zero addresses and leading to unexpected behavior or vulnerabilities. For example, transferring tokens to a zero address can result in a permanent loss of those tokens. --- ```solidity=60 pendingAdmin = _admin; ``` - `_admin` is not zero-checked before being used.

LowUnused LibraryOpen

In the contract `XVSStore`, the library `SafeMath` is declared on a using-for directive but its functionalities are never used, which can lead to unnecessary complexity and reduced maintainability.

Contracts in scope

No deployed address is recorded for this audit.

The report names a repository or files. Open the report to see its scope.

Repository and files the report names (7)

  • contracts/XVSVault/XVSVault.sol
  • contracts/Vault/VAIVault.sol
  • contracts/XVSVault/XVSStore.sol
  • contracts/XVSVault/XVSVaultStorage.sol
  • contracts/VRTVault/VRTVaultStorage.sol
  • contracts/Vault/VAIVaultStorage.sol
  • contracts/VRTVault/VRTVault.sol

Part of Venus Protocol’s security record

Venus Protocol
Audits67 audits by 7 firmsLast audit Sep 2025, by Quantstamp.
Critical findingsNo open critical findingsAcross the 67 reports, 4 critical findings were reported. Each is marked fixed by the firm that reported it.
IncidentIncident 12 May 2022Source: De.Fi incident database.
Open Venus Protocol’s security record

Security firm

CertiK

1,045 projects reviewed · 1,376 reports · latest May 2025

See CertiK’s audits

Something 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