Part of CertiK’s series
CertiK reviewed Venus Protocol (Venus - Isolated Pools) on 19 Jun 2023: 44 findings, 1 critical; 38 marked fixed, 6 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 | 1 |
| High | 2 | 0 | 7 |
| Medium | 0 | 0 | 4 |
| Low | 4 | 0 | 26 |
The `collateralFactor` determines the maximum percentage a user can borrow against their collateral, while the `liquidationThreshold` is the maximum percentage of the collateral that the borrowed value can reach before the borrow is eligible for liquidation. This means that the `collateralFactor` should always be less than the `liquidationThreshold`, otherwise a user can borrow an amount and be eligible for liquidation at the same time (see scenario below). However, if `setCollateralFactor()` is called with such values it will revert due to the check: ```solidity=760 if (newLiquidationThresholdMantissa > newCollateralFactorMantissa) { revert InvalidLiquidationThreshold(); } ```
The function `_swapAsset()` uses the input `path` when swapping with the `pancakeSwapRouter`. However, if the `underlyingAsset` is not the `convertibleBaseAsset` the total amount is always set to be `amounts[1]`. However, this is not the amount of the `convertibleBaseAsset` that will be received if the input path has a length greater than 2. This will cause the wrong amount to be added to the `poolReserves` causing the value to be larger or smaller than expected. If the value is smaller than expected, then the contract will lock some of the `convertibleBaseAsset` in the contract as the balance stored will be less than the actual amount held by the contract.
The state variable `totalReserves` of the `VToken` contract becomes nonzero in one of three ways: 1. A borrower is liquidated - a portion of the corresponding seized amount of collateral defined by the `protocolSeizeShareMantissa` is sectioned for `totalReserves` (by default, this portion is 5% of the seized amount); 2. The function `addReserves()` is called - the caller supplies a corresponding amount of `underlying` token; 3. Through accumulated interest in function `accrueInterest()` The `totalReserves` is a `uint` that represents the portion of the contract's underlying balance which may be taken out of the contract and sent to the corresponding `protocolShareReserves` contract. Over time, `totalReserves` will accumulate interest with each call to the function `accrueInterest()`. The `borrowRateMantissa` is used in determining this rate of growth. It is necessary that the `totalReserves` value is kept relatively low, as accumulation over time may cause the `exchangeRate` to decrease towards 0. As such, it is assumed that in most cases the value of `totalReserves` is frequently reduced through function `reduceReserves()`. While the `underlying` balance of the contract is updated to reflect the update to `totalReserves` when either `addReserves()` or `seize()` is called, the `underlying` balance does not accumulate interest as `totalReserves` accumulates interest in updates through `accrueInterest()`. If `totalReserves` is not periodically reduced, the `totalReserves` value can account for more of the `underlying` balance of the contract over time. The fact that the function `reduceReserves()` is unprotected allows for the following attack vector.
The function `transferReserveForAuction()` checks if the `msg.sender` is the `shortfall` address. After the `shortfall` address calls this function, it will transfer the funds to `auctionContractAddress`. If `setAuctionContractAddress()` is called and these two addresses differ then the funds will be sent to the wrong address when `transferReserveForAuction()` is called in `Shortfall.sol`.
The function `liquidateAccount()` allows the `msg.sender` to liquidate the input `borrower` in multiple markets by inputting a dynamic `LiquidationOrder` array, `orders`. However, the input `LiquidationOrder` components, `vTokenCollateral` and `vTokenBorrowed`, are not checked for each entry of the array, and external calls are made to them, allowing an attack contract to be called.
### Function `liquidateAccount()` When function `liquidateAccount()` is called, the only liquidity snapshot check that is performed is whether `collateralToSeize` is at least as large as `snapshot.totalCollateral`. In such a case, the function reverts. Since the snapshot was already assessed, when `forceLiquidateBorrow()` is called on each `vTokenBorrowed` address, the fact that `skipLiquidityCheck` is set to `true` means that further assessment will not be performed on the snapshot. In particular, the check that `shortfall` is nonzero is not performed, meaning those that have a `shortfall` of zero can be liquidated via `liquidateAccount()` when their `totalCollateral` is less or equal to `minLiquidatableCollateral`. The `collateralToSeize` value is the `snapshot.borrows` value multiplied by the `liquidationIncentiveMantissa`. In the case where `liquidationIncentiveMantissa` is larger than `1e18`, the `collateralToSeize` will be larger than the value of `snapshot.borrows`; the fact that `collateralToSeize` is larger or equal to `snapshot.totalCollateral` does not imply that `snapshot.totalBorrows` is greater or equal to `snapshot.totalCollateral` in that case. With this set up, it is possible that the `borrows` of a `borrower` account do not exceed the `totalCollateral` and that `shortfall` is 0, but that this check still passes, allowing the `borrower` account to be liquidated. In such a case, the function `liquidateAccount()` is successfully called on a borrower that should not have been liquidated. It appears this can be called on any account in which `totalCollateral` does not exceed the `minLiquidatableCollateral`. ### Function `healAccount()` Function `healAccount()` can be called for an account in which `totalCollateral` does not exceed the `minLiquidatableCollateral`, and when the account's `borrows` multiplied by the `liquidationIncentiveMantissa` is at least the `totalCollateral`. Again, these are the only checks performed on the snapshot for the account within this function. It is still possible that this function can be called for accounts in which the `shortfall` value is 0, since the check in `healAccount()` scales the account's borrows, and the check in `_getHypotheticalLiquiditySnapshot()` scales the account's `totalCollateral` value to determine the corresponding `shortfall`.
If there is a single supplier left in any market, then they can cause the `totalSupply` to be very small and take advantage of a rounding error when the exchange rate is calculated. If the single supplier is malicious they can use this to drain the entire pools funds.
### Use of `_ensureMaxLoops()` on `accountAssets` Array Function `enterMarkets()` makes a check that length `vTokens.length` does not exceed a maximum limit through function `_ensureMaxLoops()`. The `enterMarkets()` function does not make any checks on whether the total number of markets entered for the user, ie, the length of `accountAssets`, exceeds the limit in `_ensureMaxLoops()`. This discrepancy allows the limit to be passed in `enterMarkets()`, but any other function relying on the check will revert. This means that `exitMarket()` cannot be called to reduce the number of markets the user is in, and, in particular, the function `_getHypotheticalLiquiditySnapshot()` reverts because of the `_ensureMaxLoops()` check, preventing a user from redeeming or borrowing. As a result, their position is trapped in the protocol. We note this issue is less likely to occur, unless the length of `allMarkets` has already exceeded the `maxLoopsLimit`, too, which is possible (see the recommendation below). ### Use of `_ensureMaxLoops()` on `RewardsDistributors` Array Function `addRewardsDistributor()` checks that the `rewardsDistributorsLength` does not exceed a given limit through use of `_ensureMaxLoops()`, but this value is incremented after the check. This means that the `rewardsDistributorsLength` may not exceed the `maxLoopsLimit`, but the updated value after the increment may. As a result, Any function checking that `_ensureMaxLoops()` is successful on the length of the `RewardsDistributors` array will cause a revert. Since the array cannot be decremented, any surpassing of the limit would cause the corresponding functions to stop working.
The `mintBehalf()` function allows a user to mint tokens on behalf of another user. However, there is no check that the input `minter`, the address to which the `vTokens` are minted, is not the zero address. This can cause issues if a user accidentally mints to the zero address as those `vTokens` will not be able to be recovered, causing the underlying to be locked in the contract. In addition, any supply rewards for that market can also then be claimed for the zero address, locking them forever.
The function `healAccount()` is only callable when ```solidity 1 > percentage ``` Where `percentage = div_(collateral, scaledBorrows)`. So that it covers the cases where `scaledBorrows > collateral`. The function `liquidateAccount()` is only callable when ```solidity collateralToSeize < snapshot.totalCollateral ``` where `collateralToSeize` is the scaled borrows and `snapshot.totalCollateral` is the collateral. Thus it covers the cases where `scaledBorrows < collateral`. As `healAccount()` and `liquidateAccount` must be the functions called to perform liquidations when `snapshot.totalCollateral <= minLiquidatableCollateral` if this is the case and `scaledBorrows = collateral` both of these functions will revert. Thus the case when `snapshot.totalCollateral <= minLiquidatableCollateral` and `scaledBorrows = collateral` is not handled.
The contract `PoolRegistry.sol` does not inherit its interface `PoolRegistryInterface.sol`. In addition, the function `getBookmarks()` is in `PoolRegistryInterface.sol`, however, the function is not implemented in `PoolRegistry.sol`. Furthermore, the function `getPoolsSupportedByAsset()` returns `uint256[]` in the interface, when the implementation returns an `address[]`. This also affects `getPoolsSupportedByAsset()` in `PoolLens.sol`, which also currently returns a `uint256[]`, when it should return an `address[]`. The contract `RiskFund.sol` does not inherit its interface `IRiskFund.sol`. The contract `ProtocolShareReserve.sol` does not inherit its interface `IProtocolShareReserve.sol`.
There is no storage gap preserved in the following parent contracts of the cited logic contracts. Any logic contract that acts as a base contract, and which is inherited by other upgradeable child contracts should have a reasonably sized storage gap preserved to accommodate new state variables introduced by future upgrades. #### `VToken` - Inherited contract `VTokenStorage` should include a storage gap; - Inherited contract `VTokenInterfaces` should include a storage gap. #### `Comptroller` - Inherited contract `ComptrollerV1Storage` should include a storage gap.
The function `initialize()` in `RewardsDistributor.sol` is `public` and can be called by anyone as long as the contract is deployed. --- The function `initialize()` in `ProtocolShareReserve.sol` calls `__Ownable_init()` instead of `__Ownable2Step_init()`.
### In the contract `ProtocolShareReserve` The `onlyOwner` modifier has been removed from `releaseFunds()`. This can cause funds to be released at unexpected times, as it can be called by any user. We want to ensure that this is the design intent. ### In the contract `PoolRegistry` When `addMarket()` is called the `initialSupply` will be taken from the `owner()` as opposed to the `msg.sender`. We want to ensure this is the design intent as previously this function could only be called by the owner so that necessarily the `msg.sender` was always the `owner()`. Additionally, the function `setPoolName()` can only be called by an approved entity to change the pool name. However, this function does not perform the following check: ```solidity require(bytes(name).length <= 100, "Pool's name is too large."); ``` As this check is performed in `createRegistryPool()` which is also only callable by an approved entity, we would like to know if it is the design intent to allow `setPoolName()` to exceed this limit.
The ERC-20 `approve` function has a well-known race condition whereby an adjustment of an existing approval can be exploited to utilize the full amount of the previously set approval as well as the newly set approval by monitoring the transaction mempool. See also [ERC20 API: An Attack Vector on Approve/TransferFrom Methods](https://docs.google.com/document/d/1YLPtQxZu1UAvO9cZ1O2RPXBbT0mooh4DYKjA_jp-RLM/edit#heading=h.m9fhqynw2xvt)
It is non-standard to include a `constructor` in an inherited construct which is used to house storage variables. We believe that this was to allow `immutable` variables to be included in `ComptrollerStorage`. However, `immutable` variables are not located in storage and are instead evaluated once at construction time and their value is copied to all the locations in the code where they are accessed.
### In `RiskFund.sol`, When `swapPoolsAssets()` is called, it swaps an underlying asset of a `vToken` to the convertible base asset and adds the amount of convertible base asset received to the `poolReserves` of the `vToken`'s associated pool. If an underlying asset is changed before all reserves are transferred for auction, then it is possible that the `poolReserves` value is accounting for two different tokens. This can cause confusion and require manual intervention to fix. ---- ### In `Shortfall.sol`, The `convertibleBaseAsset` can be changed at any given time. This includes during an auction. However, the auction cannot be closed if the `convertibleBaseAsset` on `RiskFund` and `Shortfall` are different. If this occurs, it would require manual change to be able to close the auction.
In `RiskFund.sol`, the file `PoolRegistry.sol` is imported twice.
In the comment above `updateWaitForFirstBidder` it states: "If the first bid is not made within this limit, the auction is closed and needs to be restarted". However, this is not the case as the only time `waitForFirstBidder` is used is in a check when calling `restartAuction()`. It is not used in any check when calling `placeBid()` so that the bids can be placed after this limit.
The function `calculateBorrowerReward()` returns the incorrect value if the case where users borrowed tokens before the market's borrow state index was set. In this case, it will always return 0, when it should return the rewards accumulated starting from the `rewardTokenInitialIndex`.
In `VToken.sol`, the function `_borrowBalanceStored()` is a `view` function using `storage` to read contents from a structure. --- In `AccessControlManager.sol`, the functions `isAllowedToCall()`, `hasPermission()`, `giveCallPermission()`, and `revokeCallPermission()` all have the input parameter `functionSig` with a data location of `memory`. The `functionSig` is never modified and is only used to compute the hash for each role. In addition, the functions are never called internally within the contract. Thus, their data location can be changed to `calldata` to avoid the gas consumption copying from `calldata` to `memory`.
Function `updateAssetsState()` can be called by anyone. A user can create a malicious `asset` ERC20 and make it appear as if the `ProtocolShareReserve` or `RiskFund` contracts have a balance of this malicious `asset` token. This will update the state of mappings `assetsReserves[asset]` and `poolAssetsReserves[comptroller][asset]` with the balance. This is not a risk as long as the centralized authorities of the protocol do not add these `asset` addresses as markets in the corresponding `comptroller` addresses. --- On a similar note, malicious tokens may be sent directly to `VToken` contracts. If `sweepToken()` is called on these malicious tokens, it may cause unforeseen actions to occur.
In the contract `Comptroller`, the following missing input validations were found: - In function `setCloseFactor()`, there is no check to the update on `closeFactorMantissa`. There appear to be constant bounds that would be of use for this check. - In function `setLiquidationIncentive()`, there is no check that the updated value `newLiquidationIncentiveMantissa` is a reasonable value for its intended use. - Privileged function `setMaxLoopsLimit()` in the `Comptroller` can adjust the value `maxLoopsLimit` without making any checks against its previous value. If the `maxLoopsLimit` is updated to a value lower than its previous state, then some state array lengths may automatically exceed the new limit, with no way to reduce their size, while other array lengths may still remain below the threshold. We recommend ensuring that the `maxLoopsLimit` cannot be updated to a value that is less than a state array length that is checked against it. ---- In the contract `RiskFund`, the following missing input validations were found: - Any address that has been given access to call `swapPoolsAssets()` by the access control manager, can input any array of `vToken` addresses to swap their pools assets reserves. However, these `vTokens` are never checked to ensure that the `comptroller` is registered and the `vToken` is a market of that comptroller. --- In the contract `Shortfall`, the following missing input validations were found: - In the initializer, the _minimumPoolBadDebt can be set to zero. We recommend not allowing this to be set to zero. - The function `startAuction()` should check if the pool is registered.
There should always be events emitted in sensitive functions that are controlled by centralization roles. In `ProtocolShareReserve.sol`, the following functions are missing emit events: - `releaseFunds()` ---- In `Comptroller.sol`, the following functions are missing emit events: - `addRewardsDistributor()` - `supportMarket()` The following events are declared but never used: - `NewBorrowCapGuardian()` --- In `RewardsDistributor.sol`, the following functions are missing emit events: - `initializeMarket()` - `updateRewardTokenSupplyIndex()` - `_updateRewardTokenSupplyIndex()` - `updateRewardTokenBorrowIndex()` - `_updateRewardTokenSupplyIndex()` ---- In `VTokenProxyFactory.sol`, the following functions are missing emit events: - `deployVTokenProxy()`
### In `RiskFund.sol`: The function `initialize()` does not check that the input `_accessControl` or `_shortFall` are not the zero address. ---- ### In `VToken.sol`: - The function `_initialize()` does not check that the following inputs are not the zero address: - `admin_` - `address(accessControlManager)` - `riskManagement.shortfall` - `riskManagement.riskFund` - `riskManagement.protocolShareReserve` - In the function `approve()` it is not checked that the input sender is not the zero address. It is expected that calls of the form `approve(spender, amount)` fail if the address in `spender` is the zero address; - The function `setAccessControlAddress()` does not check that `newAccessControlManager` is the zero address. --- ### In `Comptroller.sol`: - In the `constructor()`, there is no check that the input addresses `poolRegistry_` and `accessControl_` are not the zero address; - In function `setPriceOracle()`, there is no check that `address(newOracle)` is not `address(0)`. ---- ### In `Shortfall.sol`: - The function `_initialize()` does not check that the following inputs are not the zero address: - _convertibleBaseAsset - riskFund
The internal function `_claimRewardToken` takes an array of addresses `holders` as input as well as two bools `borrowers` and `suppliers`. It is only called in `RewardsDistributor.sol` by `claimRewardToken()`, with a single holder input and both bools always set to true. With the current design the inputs of `_claimRewardToken()` can be changed to accept a single address `holder` and omit the bool inputs.
The function `updatePrices()` calls `oracle_.updatePrice()` for all of the input accounts `accountAssets`. If the `preBorrowHook()` is called when the `borrower` is not currently entered in the market, then the market will be added to the borrowers `accountAssets` after `updatePrices()` is called. Thus it will not call `oracle_.updatePrice()` for the market that is being entered.
Storage variables are declared in the `Comptroller` contract; the `Comptroller` inherits from `ComptrollerV1Storage` and these variables should be declared within this child contract to maintain contract organization.
### `RewardsDistributor` The following typos and inconsistencies were found in this file: - The comments for `_distributeSupplierRewardToken` are not above the function and instead above the mapping `rewardTokenSupplyState`; - The `TODO` comment under `_distributeSupplierRewardToken` should either be deleted or explained and warned that it should only be called when a user is in the supplier market; - The comment for `distributeBorrowerRewardToken()` mentions `Comptroller.borrowAllowed` and `Comptroller.repayBorrowAllowed` which are not functions defined in the comptroller. The comment should instead reference `Comptroller.preBorrowHook` and `Comptroller.preRepayHook`; - The comment "vToken The market whose REWARD TOKEN speed to update" should be rephrased to be clearer. ---- ### `VToken` The following typos and inconsistencies were found in this file: - The word "compatilibily" is spelled incorrectly and should be corrected to "compatibility"; - The word "its" is incorrectly used and should be changed to "it's"; - The variable `srvTokensNew` should be `srcTokensNew`. ---- ### `PoolRegistry` The following typos and inconsistencies were found in this file: - In the comment for the `metadata` mapping, it says "Maps venus pool id to metadata", however, it maps a pool's `comptroller` address to metadata; - In the comment for the `_vTokens` mapping it says "Maps pool id to asset to vToken.", however, it maps a pool's `comptroller` address to asset to `vToken`; - In the comment for `getPoolByComptroller()` it says "The Comptroller implementation address", however, the address is the comptroller proxy address associated to the pool. In addition, in the function `_registerPool()`, the check `bytes(name).length <= 100` reverts if the input `name` is too large. However, the error message states that no pool name was supplied. We recommend changing the error message or check to reflect one another. ---- ### `ProtocolShareReserve` The following typos and inconsistencies were found in this file: - In the comments above `initialize()`, `_protocolIncome` is the address the protocol income is sent to, not the remaining protocol income; - In the function `initialize()`, the error message for the check that `_protocolIncome` is not the zero address does not reflect that it is the protocol's income address. ---- ### `RiskFund` The following typos and inconsistencies were found in this file: - In the comments for the function `initialize()`, it states "Asset should be worth of min amount to convert into base asset". We recommend changing this to something more clear such as "minimum amount assets must be worth to convert into base asset"; - In multiple locations, "amout" is spelled incorrectly and should be changed to "amount"; - In `swapPoolsAssets()`, the input array `underlyingAssets` can cause confusion as the addresses of the `vToken` of an underlying should be input, not the addresses of the underlying themselves. If this is changed, the comment for the parameter should also be changed to reflect it is an array of `vToken` addresses; - The event `ConvertableBaseAssetUpdated` and function `setConvertableBaseAsset()` use "convertable", when it should be "convertible". ---- ### `ReserveHelpers` The following typos and inconsistencies were found in this file: - The comments for `updateAssetsState()` only mention updating "after transferring to risk fund", however, this function is also called when transferring funds to the protocol share reserve. ---- ### `Comptroller` The following typos and inconsistencies were found in this file: - The word "safelly" is spelled incorrectly and should be corrected to "safely"; - The function `preRepayHook()` does not use the inputs `payer` or `repayAmount`; - The function `preLiquidateHook()` does not use the input `liquidator`; - The function `preSeizeHook()` does not use the input seizeTokens; - The comments above `preLiquidateHook()` state "Not restricted if vToken is enabled as collateral" which can cause confusion as the function is not restricted. --- ### `ComptrollerInterface` The following functions are not present within the `Comptroller` contract and can be removed from the `ComptrollerInterface`: - `priceOracle()` - `getXVSRewardsByMarket()` - `compSpeeds()` ---- ### `VTokenProxyFactory` The address `vTokenProxyAdmin_` is never used when deploying the `vToken`. We recommend either implementing or removing this variable from the `VTokenArgs` struct. --- ### `Shortfall` - The function `setConvertableBaseAsset()` is spelled incorrectly and should be spelled `setConvertibleBaseAsset()`. - The emitted event `ConvertableBaseAssetUpdated` is spelled incorrectly and should be spelled `ConvertibleBaseAssetUpdated`. - The event `ConvertableBaseAssetUpdated` is spelled incorrectly and should be spelled `ConvertibleBaseAssetUpdated` --- ## The following typos and inconsistencies were found in commit: [78c5a0947dda78e3df87ad16b6f2a4521ee12968](https://github.co
The `payable` casting is used within the `VToken` contract, but this contract is not set up to be compatible with ETH.
It is checked that the `msg.sender` is the `vToken`, so `accountAssets[msg.sender]` will not be the account assets of the `borrower`. However, this check is unnecessary as other checks prevent the account assets from exceeding the `maxLoopsLimit`. In particular note that whenever a market is supported, via `supportMarket()`, when `_addMarket()` is called it ensures that after adding the market to the `allMarkets` array it does not exceed the `maxLoopsLimit`. As the only way for a market to be listed is through calling `supportMarket()`, this ensures that the total number of listed markets does not exceed the `maxLoopsLimit`. The function `_addToMarket()` will only allow borrowers to be added to markets that are listed. As the listed markets do not exceed the `maxLoopsLimit` it follows that a borrower cannot be added to enough markets that it would exceed the `maxLoopsLimit`.
The contract `JumpRateModelV2` inherits both `InterestRateModel` and `BaseJumpRateModelV2`. However, `BaseJumpRateModelV2` also inherits `InterestRateModel` so that only `BaseJumpRateModelV2` needs to be inherited.
The struct `AddMarketInput` has the parameter `vTokenProxyAdmin`, however, it is never used.
Since contract `VToken` inherits from `VTokenInterface`, it is unnecessary to refer to this contract when referencing struct type `RiskManagementInit`.
The following state variables are never used in the `Comptroller` codebase: ```solidity uint256 public maxAssets; ``` --- ```solidity address public pauseGuardian; bool public transferGuardianPaused; bool public seizeGuardianPaused; mapping(address => bool) public mintGuardianPaused; mapping(address => bool) public borrowGuardianPaused; ``` --- ```solidity address public borrowCapGuardian; ```
`poolReserves` is public and thus has a compiler-generated getter function making the `getPoolReserve()` function unnecessary.
The linked variables assigned in the constructor can be declared as `immutable`. Immutable state variables can be assigned during contract creation but will remain constant throughout the lifetime of a deployed contract. A big advantage of immutable variables is that reading them is significantly cheaper than reading from regular state variables since they will not be stored in storage.
There may be market conditions where a liquidator is incentivized to not liquidate a borrow, and instead call `healAccount()`. This is not desirable as it incurs bad debt for the protocol and liquidators should always be incentivized to liquidate as soon as possible. The possible impact of this depends on the value of `minLiquidatableCollateral`, as the larger the value, the more bad debt that can be incurred. As auctions require a minimum amount of bad debt to start, a liquidator may want to increase the bad debt so that an auction for the reserves occurs, betting that they will win the auction. Please inform us of what the intended range of values for `minLiquidatableCollateral` are. One of our concerns with `healAccount()` is the following scenario: Assume for simplicity that the protocol does not take any fees. In general the amount of profit would be smaller as the cost of the price manipulation and protocol fees must be taken into account. However, if the token owner is able to mint their own tokens, the price can be manipulated for a low cost. A user deposits 1000 USD of `tokenA` as collateral with a collateral factor of 80%. And then borrows 800 USD dollars of a stablecoin against it. The user manipulates the price of tokenA causing the price to drop so low that the collateral is worth 100 USD. The user then calls `healAccount()` on their own account paying a little less than 100 USD dollars to get approximately 100 USD in tokenA. (This is assuming the `minimumLiquidatableCollateral` is set to the highest provided estimated of 100 USD see the alleviation below.) The price is then put back to normal so that the attacker has around 1000 USD dollars in tokenA and also has the 800 USD they borrowed originally. Minus the 100 USD they payed when healing the account this nets them around 700 USD at the cost of the Venus Protocol. The user could repeat this process as many times as they wish, in general the more price manipulation and higher the collateral factor, the greater the amount that can be gained.
The report names a repository or files. Open the report to see its scope.
Repository and files the report names (55)
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