Swipe Venus Protocol

CertiKFiles named in the report

CertiK reviewed Venus Protocol (Swipe Venus Protocol) on 16 Dec 2020: 43 findings, 0 critical; 21 marked fixed, 22 open.

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

Report hosted on skynet.certik.com.

Trustblock does not review code.

Findings43

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

SeverityOpenAcknowledgedFixed
Critical000
High000
Medium000
Low22021
LowIncorrect order of functionsOpen

The structure of the codebase does not conform to the official Solidity style guide of `v0.5.16` . The style guide can be found at https://docs.soliditylang.org/en/v0.5.16/style-guide.html#orde r-of-functions.

LowIncorrect order of functionsOpen

The structure of the codebase does not conform to the official Solidity style guide of v0.5.16 . The style guide can be found at https://docs.soliditylang.org/en/v0.5.16/style-guide.html#orde r-of-functions.

LowInefficient `storage` declarationOpen

The mapping declarations on the aforementioned lines have `vToken` address as their keys and all of these mapping can be converted into a single mapping where the value will be of struct type. This will greatly reduce the lookup gas costs associated with multiple mappings.

LowInefficient `storage` declarationOpen

The mappings declarations on the aforementioned lines have `user address` as their keys. These mappings can be converted into a single mapping having value of struct type.

LowInefficient `storage` layoutOpen

The properties of struct Market on the aforementioned lines laid out within the struct ineffeciently where they are taking a full 32-bytes in storage in space.

LowInefficient `storage` layoutOpen

The storage variables on the aforementioned are inefficiently laid out in the storage of the contract.

LowInefficient comparisonOpen

The comparison on the aforementioned line is inefficient as the length of `accountAssets[borrower].length` can never grow beyond maxAssets and hence the comparison can be changed from `accountAssets[borrower].length >= maxAssets` to `accountAssets[borrower].length == maxAssets` which is gas efficient.

LowInefficient function declarationsOpen

The functions on the aforementioned lines perform the same functionalities with one providing public interface while the other one has internal visibility.

LowInefficient function implementationOpen

The function on the aforementioned line loops through holders twice which is inefficient and the code can be rectified to loop through holders only once.

LowPossibility of replay attackOpen

The permit function on the aforementioned line performs the operation of deriving signer address from the signature values of `v` , `r` and `s` . The state varible `DOMAIN_SEPARATOR` that used to calculate hash has a constant value of chainid which does not change after contract deployment. The issue arises in the event of fork when the cross-chain replay attacks can be executed. The attack scenario can be though as if a fork of Ethereum happens and two different networks have id of for example `1` and `9` . The chainid coded in `DOMAIN_SEPARATOR` will be the same on contracts residing in both of the forks. If the chainid is 1 is stored the contract then the permit transaction signed for chainid `1` will be executable on both of the forks.

Show 10 more
LowRequisite Value of ERC-20 `transferFrom()` / `traOpen

While the ERC-20 implementation does necessitate that the `transferFrom()` / `transfer()` function returns a `bool` variable yielding `true` , many token implementations do not return anything i.e. Tether (USDT) leading to unexpected halts in code execution.

LowUnlocked Compiler VersionOpen

The contract has unlocked compiler version. An unlocked compiler version in the source code of the contract permits the user to compile it at or above a particular version. This, in turn, leads to differences in the generated bytecode between compilations due to differing compiler version numbers. This can lead to an ambiguity when debugging as compiler specific bugs may occur in the codebase that would be hard to identify over a span of multiple compiler versions rather than a specific one.

LowUnlocked Compiler VersionOpen

The contract has unlocked compiler version. An unlocked compiler version in the source code of the contract permits the user to compile it at or above a particular version. This, in turn, leads to differences in the generated bytecode between compilations due to differing compiler version numbers. This can lead to an ambiguity when debugging as compiler specific bugs may occur in the codebase that would be hard to identify over a span of multiple compiler versions rather than a specific one.

LowUnlocked Compiler VersionOpen

The contract has unlocked compiler version. An unlocked compiler version in the source code of the contract permits the user to compile it at or above a particular version. This, in turn, leads to differences in the generated bytecode between compilations due to differing compiler version numbers. This can lead to an ambiguity when debugging as compiler specific bugs may occur in the codebase that would be hard to identify over a span of multiple compiler versions rather than a specific one.

LowUnlocked Compiler VersionOpen

The contract has unlocked compiler version. An unlocked compiler version in the source code of the contract permits the user to compile it at or above a particular version. This, in turn, leads to differences in the generated bytecode between compilations due to differing compiler version numbers. This can lead to an ambiguity when debugging as compiler specific bugs may occur in the codebase that would be hard to identify over a span of multiple compiler versions rather than a specific one.

LowUnlocked Compiler VersionOpen

The contract has unlocked compiler version. An unlocked compiler version in the source code of the contract permits the user to compile it at or above a particular version. This, in turn, leads to differences in the generated bytecode between compilations due to differing compiler version numbers. This can lead to an ambiguity when debugging as compiler specific bugs may occur in the codebase that would be hard to identify over a span of multiple compiler versions rather than a specific one.

LowUnlocked Compiler VersionOpen

The contract has unlocked compiler version. An unlocked compiler version in the source code of the contract permits the user to compile it at or above a particular version. This, in turn, leads to differences in the generated bytecode between compilations due to differing compiler version numbers. This can lead to an ambiguity when debugging as compiler specific bugs may occur in the codebase that would be hard to identify over a span of multiple compiler versions rather than a specific one.

LowUnnecessary `assert` useOpen

The `assert` use on the aforementioned line is unnecessary as `i` will always be less than `len` .

LowUsage of `uint` instead of `uint256`Open

The contract is using `uint` to declare 256-bit unsigned integers. Although, `uint` is an alias for `uint256` and both represent the same underlying integer allocation. It is advisable that for clean coding practices the complete form uint256 should be used instead of the alias `uint` .

LowUsage of `uint` instead of `uint256`Open

The contract is using uint to declare 256-bit unsigned integers. Although, `uint` is an alias for `uint256` and both represent the same underlying integer allocation. It is advisable that for clean coding practices the complete form `uint256` should be used instead of the alias `uint`.

Show 2 more
LowUsage of uint instead of uint256Open

The contract is using `uint` to declare 256-bit unsigned integers. Although, `uint` is an alias for `uint256` and both represent the same underlying integer allocation. It is advisable that for clean coding practices the complete form `uint256` should be used instead of the alias `uint` .

LowUsage of uint instead of uint256Open

The contract is using uint to declare 256-bit unsigned integers. Although, uint is an alias for uint256 and both represent the same underlying integer allocation. It is advisable that for clean coding practices the complete form uint256 should be used instead of the alias uint.

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

  • contracts/VAI/lib.sol
  • contracts/VAIController.sol
  • contracts/ErrorReporter.sol
  • contracts/VAIUnitroller.sol
  • contracts/VAI/VAI.sol
  • contracts/Unitroller.sol
  • contracts/ComptrollerStorage.sol
  • contracts/PriceOracle.sol
  • contracts/VAIControllerStorage.sol
  • contracts/Comptroller.sol
  • contracts/VAIControllerInterface.sol
  • contracts/ComptrollerInterface.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