Prime.sol - User can claim Prime token without having any staked XVS, because his stakedAt isn’t reset whenever he is issued an irrevocable token
Venus Prime
HighCode4rena
Every publicly disclosed report for Venus Prime and what kind of bugs they were.
Newest first. Only what Venus Prime chose to make public.
Venus Prime
HighThe report notes that several privileged functions in a smart contract are guarded only by an owner check, so a single externally owned account holding that role would be a centralisation risk and single point of failure. An attacker who obtained that private key, or a holder who lost it, could compromise or lock the contract's administrative actions.
Venus Prime
MediumThe updateScores function in the Prime contract fails to increment the loop counter when a user's score is already updated, causing an infinite loop and out-of-gas revert. An attacker can front-run a legitimate updateScores call with a call that updates one of the same users, causing the original call to revert and delaying score updates.
Venus Prime
MediumThe score calculation for a staked user returns zero whenever either the staked XVS balance or the supplied capital is zero, even when the alpha weighting parameter is set to 1. This means a user who only stakes XVS and supplies no capital would incorrectly receive a score of zero instead of the full staking-based score.
Venus Prime
MediumThe score calculation used the vToken's decimals instead of the underlying token's decimals, inflating the capital value and causing the market's rewardIndex to remain zero. As a result, users would not accrue any rewards.
Venus Prime
HighA malicious user can prevent their score from being updated after alpha or multiplier changes by manipulating the pendingScoreUpdates counter, allowing them to keep an inflated score and accrue outsized rewards at the expense of other users.
Venus Prime
HighVenus Prime
MediumThe preLiquidateHook and preSeizeHook functions do not check whether a borrower has exited a market, so a liquidator can seize collateral from a market the user has disabled. This could lead to unjust liquidation of assets that the user no longer considers collateral.
Venus Prime
MediumThe Shortfall auction contract refunds the previous highest bidder using a direct token transfer. If that refund fails (e.g., due to a token blacklist or an ERC777 recipient rejecting the transfer), the new higher bid cannot be placed, so the previous bidder remains the winner and the auction is disrupted.
Venus Prime
MediumVenus Prime
MediumThe ShortFall auction contract computes the amount owed to the highest bidder in USD terms but then transfers that same number of convertibleBaseAsset tokens directly, without converting through the price oracle. If the base asset is not pegged to USD, the winner could receive far more value than intended.
Venus Prime
MediumThe auction for bad debt allows a bidder to win by preventing others from bidding for a short window. An attacker can stuff blocks with dummy transactions to stop overbids and win at the least favourable price for the protocol.
Venus Prime
MediumVenus Prime
MediumThe placeBid function identifies an auction only by the comptroller address, so if the auction is restarted before a bid transaction is mined, the bid applies to the new auction instead of the one the user intended. This could cause the user to pay a large debt for little seized risk fund.
Venus Prime
MediumThe WhitePaperInterestRateModel contract uses a blocksPerYear constant of 2102400, which assumes a 15-second block time, but Venus Protocol runs on BNB Chain with 3-second blocks. This makes the per-block interest rate five times higher than intended, causing borrowers to pay excessive interest and distorting market incentives.
Venus Prime
HighThe Comptroller contract calculates collateral and borrow balances using stale oracle prices and unaccrued interest for markets other than the one being directly interacted with. An attacker could exploit this to borrow, redeem, or transfer more than allowed when a collateral token's price has fallen but not yet been updated.
Venus Prime
MediumThe liquidateAccount function requires the repaid amount to exactly equal the borrower's borrow balance, which grows every block as interest accrues. A liquidator whose transaction lands in a later block than expected will have the call revert, so liquidations fail and must be retried.
Venus Prime
MediumThe RiskFund contract's swap function hardcodes the swap deadline to the current block timestamp, so a pending swap can be executed at any later time. An attacker or MEV bot could sandwich a stale transaction, and the user could also unknowingly execute a bad trade after a long delay.
Venus Prime
MediumThe `_ensureMaxLoops` function reverts if the iteration count exceeds `maxLoopsLimit`, but `liquidateAccount` may require more orders than the limit allows, preventing liquidation of an underwater account. An attacker could exploit this by creating a position that cannot be liquidated, potentially causing bad debt.
Venus Prime
MediumThe getPoolBadDebt view function in PoolLens multiplies a market's bad debt by the oracle price without dividing by 1e18, unlike the equivalent calculation in Shortfall. This makes the reported bad debt in USD massively inflated compared with the correct value.
Venus Prime
MediumThe report claims that an attacker can manipulate the exchange rate of a Venus VToken by directly transferring underlying tokens to the contract, which inflates the exchange rate and could allow the attacker to borrow beyond the collateral factor and earn more rewards. The sponsor disputed most of the impact, arguing that the donation benefits all existing vToken holders and that the attacker would be better off simply minting more tokens.
Venus Prime
MediumThe utilization rate calculation in a smart contract can return a value greater than 1 when reserves exceed cash, because the formula does not handle that case. This could lead to incorrect interest rate calculations.
Venus Prime
MediumThe Comptroller.healAccount function seizes collateral and clears debt but does not distribute rewards earned by the borrower before healing. As a result, the healed account loses the rewards it had accrued on its debt.
Venus Prime
Medium