CertiK reviewed Venus Protocol (Swipe Venus Protocol) on 16 Dec 2020: 43 findings, 0 critical; 21 marked fixed, 22 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 | 0 | 0 | 0 |
| Medium | 0 | 0 | 0 |
| Low | 22 | 0 | 21 |
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.
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.
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.
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.
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.
The storage variables on the aforementioned are inefficiently laid out in the storage of the contract.
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.
The functions on the aforementioned lines perform the same functionalities with one providing public interface while the other one has internal visibility.
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.
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.
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.
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.
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.
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.
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.
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.
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.
The `assert` use on the aforementioned line is unnecessary as `i` will always be less than `len` .
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` .
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`.
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` .
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.
The report names a repository or files. Open the report to see its scope.
Repository and files the report names (12)
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