Venus - Liquidator Contract

CertiKFiles named in the report

Audit

Part of CertiK’s series

CertiK reviewed Venus Protocol (Venus - Liquidator Contract) on 4 Jul 2023: 11 findings, 0 critical; 9 marked fixed, 2 open.

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

Report hosted on skynet.certik.com.

Trustblock does not review code.

Findings11

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

SeverityOpenAcknowledgedFixed
Critical000
High200
Medium001
Low008
MediumIf `vToken` Is Added Multiple Times To `pendingReFixed

If the redemption of a `vToken` fails when liquidating, then that `vToken` is added to the `pendingRedeem` array. Thus if multiple liquidations happen with the same `vTokenCollateral` and all redemptions fail, the same `vToken` will be added to the `pendingRedeem` array multiple times. Thus when `_reduceReservesInternal()` is called it will reference the same `vToken` at different indexes. However, this function uses the contracts balance of `vToken`, so that if it redeems for one of the indexes the `vTokenBalance` of the contract will become zero. Then when any of the other indexes are attempted, the redemption will revert as it will have a zero amount. In this way the `pendingRedeem` array will grow with no ability to remove some of its elements, which can be used to prevent the contract from being able to redeem `vToken` and transfer the underlying asset to the protocol share reserve.

Low`markets()` Does Not Use All Return ValuesFixed

The function `markets()` in the comptroller returns a triple `(bool, uint256, bool)`, however the interface only has a `bool` return value. Currently this will function as intended as it will reference the correct memory to return the first `bool` in the triple which corresponds to if the market is listed. However, it is possible that in future iterations of the virtual machine that this behavior will not remain the same.

LowInefficient For LoopFixed

The function `_reduceReservesInternal()` has a for loop that starts with the `index` at `range - 1` and decreases by 1 as long as the `index` is greater than or equal to 0. Thus at the final step the `index = 0` is decremented so that it must be a signed integer. However, in the logic of the for loop, the index is only used when it is an unsigned integer and the loop can be refactored to only use unsigned integers.

LowLack Of Input ValidationFixed

The function `liquidateBorrow()` takes an input `vToken` and `vTokenCollateral` which are never checked to be supported `vToken`. Thus a malicious user can input a malicious contracts address for them so that it will fail on redemption and `vTokenCollateral` will be added to the `pendingRedeem` array. This leads to a potential denial of service as enough `vToken` can be added to the array so that other pending redemptions will not be executed. In addition, this allows an entry point for a hacker as whenever `liquidateBorrow()` is called, it will call `_reduceReservesInternal()` which will make an external call to a potentially malicious address.

LowMultiple Functions To Set Access Control ManagerFixed

The function `setAccessControl()` and the inherited function `setAccessControlManager()` for `AccessControlledV8` both call the inherited internal function `_setAccessControlManager` to set the `_accessControlManager`.

LowPossible ReentrancyFixed

The functions `liquidateBorrow()` and `reduceReserves()` are external and can be called by anyone. While `liquidateBorrow()` has the `nonReentrant` modifier, `reduceReserves()` does not and may allow an attacker to re-enter the contract. In particular, the external calls made to the inputs `vToken` and `vTokenCollateral` of `liquidateBorrow()` may be used to call `reduceReserves()` and re-enter the contract. *This finding is considered minor because the reentrancy only causes out-of-order events.*

LowTyposFixed

In the function `_distributeLiquidationIncentive()`, `siezedAmount` should be spelled as `seizedAmount`.

LowUnchecked Blocks Can Optimize ContractFixed

In the function `reduceReservesInternal()`, the for loop `index` can be decremented inside an unchecked block to save gas as `index >= 0` ensures it will not underflow.

LowUnused Custom ErrorFixed

The custom error `UnderlyingTransferFailed` is declared but never used.

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

  • contracts/Liquidator/LiquidatorStorage.sol
  • contracts/Liquidator/Liquidator.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