Venus - Time based contracts & SeizeVenus

CertiKFiles named in the report

Audit

Part of CertiK’s series

CertiK reviewed Venus Protocol (Venus - Time based contracts & SeizeVenus) on 17 Jan 2024: 10 findings, 0 critical; 9 marked fixed, 1 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
High101
Medium000
Low008
HighPotential Storage CollisionFixed

In PR 324, contract `TimeManagerV8` is being imported for use within each of the in-scope contracts. Given the contract's order of inheritance within these contracts, and that the contract contains a `__gap` storage variable, it will cause storage collisions if it is used to upgrade any existing deployments.

LowBlock Number-Based Variables Should Be Made ImmutFixed

Within the Shortfall contract, block-based defaults `DEFAULT_NEXT_BIDDER_BLOCK_LIMIT` and `DEFAULT_WAIT_FOR_FIRST_BIDDER` remain as 100 for the contract, even though a 100-block span may take drastically varying times depending on the chain. Since it is known that the time-based limits would be around 300 seconds, it may be beneficial to make these variables immutable so that a reasonable block limit value can be set based on the chain at the time of deployment.

LowLogic Can Be Skipped If Holder Has Zero Venus AccFixed

If `venusAccrued[holder] = 0`, then `totalHoldings` and `venusAccrued[holder]` will be updated unnecessarily.

LowMaximum Should Depend On Chain And Whether The CoFixed

The `MAX_BORROW_RATE_MANTISSA` is set to limit the borrow rate. However, the average block time of different chains will vary so that different maximums should be chosen. Additionally, if the contracts are time-based, then the maximum should be based on the maximum per second. Considering if the contract is time-based with the current maximum of .0005% per second, this allows for an annual borrow rate of 15,768%.

LowMissing or Incomplete NatSpecFixed

### PR417 RewardFacet - The comments above `seizeVenus()` do not include the return value.

LowMissing Return Statement in `setReduceReservesBloFixed

The function cited is intended to return uint type variables. However, neither function explicitly sets the return value within the function logic.

LowTypos And InconsistenciesFixed

### PR410 RewardFacet - In the function `grantXVSInternal()`, the temporary variable `xvs` does not have a trailing underscore. - In the function `grantXVSInternal()` the temporary variable `_xvsVToken` uses a leading underscore, however, according to the [**Solidity Style Guide**](https://docs.soliditylang.org/en/latest/style-guide.html#avoiding-naming-collisions), trailing underscores should be used to avoid naming collisions. ### PR417 RewardFacet - The function `updateAndDistributeRewards()` is `internal`, however, it does not include Internal in the function name, which seems to be the convention throughout the codebase. ### PR410 SetterFacet - The input of the function `_setXVSToken()` uses a leading underscore, when the convention followed throughout the codebase is to use a trailing underscore to avoid naming collisions for inputs. - The input of the function `_setXVSVToken()` uses a leading underscore, when the convention followed throughout the codebase is to use a trailing underscore to avoid naming collisions for inputs. ### PR410 FacetBase - In the function `releaseToVault()` the temporary variable `_xvs` uses a leading underscore, however, according to the [**Solidity Style Guide**](https://docs.soliditylang.org/en/latest/style-guide.html#avoiding-naming-collisions), trailing underscores should be used to avoid naming collisions.

LowUnnecessary Variable UpdateFixed

In the function `claimVenus()` the temporary variable `j` is used as the index in a single for loop. However, it is unnecessarily set to zero as it will already be initialized to 0.

LowValue Naming Should Be Updated to Reflect PossiblFixed

The locations cited contain local variables or comments which reference a value per block, and which are not modified to document the possibility that the averaged value may be *per block* or *per second*, according to choices made via the inherited `TimeManager` contract. In the comments above `_setLastRewardingBlockTimestamp()`, the word "block" should be replaced with "block timestamp" since the function is for explicitly setting timestamp-related values.

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 (16)

  • contracts/JumpRateModelV2.sol
  • contracts/Tokens/VTokens/VToken.sol
  • contracts/Shortfall/Shortfall.sol
  • contracts/XVSVault/XVSVault.sol
  • contracts/lib/constants.sol
  • contracts/WhitePaperInterestRateModel.sol
  • contracts/Comptroller/Diamond/facets/RewardFacet.sol
  • contracts/VTokenInterfaces.sol
  • contracts/Comptroller/Diamond/facets/FacetBase.sol
  • contracts/Comptroller/Diamond/facets/SetterFacet.sol
  • contracts/Rewards/RewardsDistributor.sol
  • contracts/XVSVault/TimeManagerV5.sol
  • contracts/Comptroller/ComptrollerStorage.sol
  • contracts/XVSVault/XVSVaultStorage.sol
  • contracts/Lens/PoolLens.sol
  • contracts/VToken.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