Part of Quantstamp’s series
Quantstamp reviewed Venus Protocol (Venus Multichain Support) on 19 Dec 2023: 20 findings, 0 critical; 12 marked fixed, 8 acknowledged; 2 more marked mitigated.
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 | Mitigated |
|---|---|---|---|---|
| Critical | 0 | 0 | 0 | 0 |
| High | 0 | 0 | 0 | 0 |
| Medium | 0 | 1 | 3 | 0 |
| Low | 0 | 7 | 9 | 2 |
Marked Undetermined or Informational by the firm. Not counted as findings.
The protocol is planned to be deployed on Arbitrum and opBNB. Both chains allow users to send cross-chain messages to call L2 contracts from L1 so that the interaction with L2 protocols can continue even if the sequencer is down. However, when an L2 contract receives a cross-chain call from L1, the `msg.sender` value is usually not the sender who initiates the cross-chain call on L1. On Arbitrum, the `msg.sender` is the [aliased address](https://docs.arbitrum.io/arbos/l1-to-l2-messaging#address-aliasing) of the original sender. On opBNB, which is built on the OP Stack, the `msg.sender` can be the [L2 messenger contract](https://community.optimism.io/docs/developers/bridge/messaging/#accessing-msg-sender) or an [aliased address](https://community.optimism.io/docs/developers/bedrock/differences/#deposits-from-the-underlying-l1-ethereum-goerli-etc-to-l2-op-mainnet-op-goerli-etc), depending on which L1 contract is called and whether the original sender is a contract or not. Therefore, access control mechanisms based on the `msg.sender` value should take such changes into account if a privileged role needs to call an L2 contract from L1 in certain circumstances, for example, in an emergency but directly sending L2 transaction is not possible since the sequencer is down. In the past, the Uniswap Factory deployed on Arbitrum did not consider address aliasing, and its owner was set to the address of the Timelock contract on L1, causing the execution of governance proposals on Arbitrum to be temporarily blocked ([reference](https://gov.uniswap.org/t/consensus-check-fix-the-cross-chain-messaging-bridge-on-arbitrum/18547)).
The `BaseXVSProxyOFT` contract takes `sharedDecimals_` as a constructor parameter and sets the `ld2sdRate`. According to the code comments in `OFTCoreV2`, > _sharedDecimals should be the minimum decimals on all chains The XVS tokens will have 18 decimals on each EVM chain. However, it should be noted that there is an upper limit of `type(uint64).max` on `sd` amounts. This is required for bridging to non-EVM chains such as Aptos and Solana. If `sharedDecimals_` is set to 18, at most ~18 XVS tokens can be bridged in each call. As mentioned by the Layer Zero docs, ["OFTV2 is intended to be used with no more than 10 shared decimals"](https://layerzero.gitbook.io/docs/evm-guides/layerzero-omnichain-contracts/oft/oft-v1-vs-oftv2-which-should-i-use#what-are-the-differences-between-the-two-versions).
In the function `AccessControlManager.giveCallPermission()`, the event `PermissionGranted` is bypassable by computing the `role` off-chain and calling the function `AccessControlManager.grantRole()` directly. Similarly, the event `PermissionRevoked` is bypassable by calling `AccessControlManager.revokeRole()` directly.
Every Solidity file specifies in the header a version number of the format `pragma solidity (^)0.x.y`. The caret (`^`) before the version number implies an unlocked pragma, meaning that the compiler will use the specified version _and above_, hence the term "unlocked".
The above-listed contracts are compiled using Solidity version 0.5.16 or 0.8.13, which contains known compiler bugs, according to the [Solidity official's compiler bug list](https://docs.soliditylang.org/en/latest/bugs.html). Specifically, Solidity version 0.8.13 includes one bug labeled as `medium/high` severity and two bugs labeled as `medium` severity. According to our examination, these bugs seem to not affect the code in scope. For 0.5.16, it is considered a relatively outdated version and is not recommended for production use.
The function `isTrustedRemote()` will return true if `_srcAddress` is an empty array and if the `_srcChainId` has not been added to `trustedRemoteLookup` yet.
The `XVS` token inherits from the `ERC20` contract, initialized by `ERC20("XVS", "Venus XVS")`. The first parameter is the `name` of the ERC-20 token, while the second is the `symbol`. As a result, the `XVS` token will have the name `XVS` and the symbol of `Venus XVS`.
The `_isEligibleToSend()` and `_isEligibleToReceive()` functions in the `BaseXVSProxyOFT` contract allow a whitelisted user to send or receive arbitrary token amount, which is not restricted by the single-transaction and daily limits. The bridges will still update the `chainIdToLast24HourTransferred` mapping to account for the transfer value in USD from whitelisted users. As a result, large transfers from whitelisted users may block regular users' transfers within the same daily window if the whitelisted user's transaction gets executed first. On the other hand, regular users will not be affected if their transactions are executed before the whitelisted users. The execution order of transactions leads to different outcomes. This issue is marked as Infomational as its validity and impact depend on the expected protocol behavior.
The report names a repository or files. Open the report to see its scope.
Repository and files the report names (22)
240 projects reviewed · 338 reports · latest Nov 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