Lucene search
+L
Code423n4Recent

10190 matches found

Code423n4
Code423n4
added 2023/05/18 12:0 a.m.13 views

Upgraded Q -> 2 from #467 [1684434787599]

Judge has assessed an item in Issue 467 as 2 risk. The relevant finding follows: L-03 Anyone can memorialize other users' position if the owner approves PositionManager There isn't a check to ensure that the caller is the actual owner of the position, so anyone can memorialize a position if the...

6.8AI score
SaveExploits0
Code423n4
Code423n4
added 2023/05/18 12:0 a.m.18 views

Upgraded Q -> 2 from #404 [1684435083624]

Judge has assessed an item in Issue 404 as 2 risk. The relevant finding follows: Global Budget Constraint is said to be 2% in Docs But It Is 3% in The code Description: In the docs it is mentioned that Global Budget Constraint should be 2% but in the code here it is hardcoded to 3%. --- The text...

7.1AI score
SaveExploits0
Code423n4
Code423n4
added 2023/05/18 12:0 a.m.7 views

Upgraded Q -> 2 from #101 [1684391676051]

Judge has assessed an item in Issue 101 as 2 risk. The relevant finding follows: L-01 --- The text was updated successfully, but these errors were encountered: All reactions...

7AI score
SaveExploits0
Code423n4
Code423n4
added 2023/05/18 12:0 a.m.10 views

Upgraded Q -> 2 from #410 [1684435015507]

Judge has assessed an item in Issue 410 as 2 risk. The relevant finding follows: QA-2 Publicly Callable memorializePositions Function Allows Unauthorized memorization of User Positions memorializePositions function in positionManager.sol allows any caller to modify position information of any use...

6.6AI score
SaveExploits0
Code423n4
Code423n4
added 2023/05/15 12:0 a.m.18 views

wxETH is vulnerable to the inflation attack

Lines of code Vulnerability details wxETH is vulnerable to the inflation attack The wxETH contract is vulnerable to the attack known as "inflation attack" in which a bad actor can front-run initial stake transactions and steal all deposit funds. Impact The staking functionality of wxETH is...

6.9AI score
SaveExploits0
Code423n4
Code423n4
added 2023/05/15 12:0 a.m.15 views

Lack of method to delete a rewardsDistributor in Comptroller.sol can break rewards distribution permanently

Lines of code Vulnerability details Proof of Concept The storage array rewardsDistributors will be used to distribute the rewards across the hooks in Comptroller.sol, namely preMintHook, preRedeemHook, preBorrowHook, preRepayHook, preSeizeHook and preTransferHook We can see addRewardsDistributor...

6.7AI score
SaveExploits0
Code423n4
Code423n4
added 2023/05/15 12:0 a.m.26 views

When borrowRateMantissa is higher than the limit value, VToken contract will be DOS

Lines of code Vulnerability details Impact File: VToken.sol 678 function accrueInterest public virtual override returns uint256 --skip-- 695 uint256 borrowRateMantissa = interestRateModel.getBorrowRatecashPrior, borrowsPrior, reservesPrior; 696 requireborrowRateMantissa borrowRateMaxMantissa. Thi...

6.8AI score
SaveExploits0
Code423n4
Code423n4
added 2023/05/15 12:0 a.m.16 views

VToken mint -- Inflation attack

Lines of code Vulnerability details Impact The token could be impacted by an inflation attack. Proof of Concept At present, vToken is still susceptible to the well-known ERC4626 'Inflation Attack'. This vulnerability allows the total asset count to be inflated by making donations. This means that...

6.7AI score
SaveExploits0
Code423n4
Code423n4
added 2023/05/15 12:0 a.m.11 views

[H1] Incorrect constant set at WhitePaperInterestRateModel

Lines of code Vulnerability details Impact Incorrect calculation of critical parameters like baseRatePerBlock. Proof of Concept The constant blocksPerYear is incorrectly set uint256 public constant blocksPerYear = 2102400; // @audit 15 seconds per block However, for Binance Smart Chain the blocks...

7AI score
SaveExploits0
Code423n4
Code423n4
added 2023/05/15 12:0 a.m.14 views

totalBorrows is not deducted properly when Comptroller#healAccount is called

Lines of code Vulnerability details Impact TotalBorrowed in VToken is not accounted properly when healAccount is called. Proof of Concept ComptrollerhealAccount intends to forgive the debt of the account if the debt goes far too underwater. When that happens, the collateral is seized, some of the...

6.7AI score
SaveExploits0
Code423n4
Code423n4
added 2023/05/15 12:0 a.m.13 views

Wrong blocksPerYear calculation in WhitePaperInterestRateModel.sol

Lines of code Vulnerability details Impact In WhitePaperInterestRateModel.sol, File: contracts/WhitePaperInterestRateModel.sol 17 uint256 public constant blocksPerYear = 2102400; There is wrong calculation of blocksPerYear and blocksPerYear is the approximate number of blocks per year that is...

6.8AI score
SaveExploits0
Code423n4
Code423n4
added 2023/05/15 12:0 a.m.10 views

User can bypass _ensureMaxLoops check

Lines of code Vulnerability details Impact The user can bypass ensureMaxLoops check in Comptroller.sol to add in accountAssets all possible markets through borrow functions of VToken.sol. Proof of Concept The user adds max number of markets through enterMarkets. Then user can add another markets...

6.9AI score
SaveExploits0
Code423n4
Code423n4
added 2023/05/15 12:0 a.m.12 views

First 1 wei deposit can produce lose of user xETH funds in wxETH

Lines of code Vulnerability details Description The present implementation of the wxETH::stake functions permits the sending of tokens to the contract, even if the quantity of wxETH is zero. This can result in users losing funds, particularly when the initial deposit is only 1 wei, and the extent...

6.6AI score
SaveExploits0
Code423n4
Code423n4
added 2023/05/15 12:0 a.m.14 views

vTokenPrice used instead of weightedVTokenPrice when calculating snapshot.totalCollateral in _getHypotheticalLiquiditySnapshot

Lines of code Vulnerability details Impact In the getHypotheticalLiquiditySnapshot function when the value of snapshot.totalCollateral is calculated the vTokenPrice is used instead of weightedVTokenPrice, this will lead the function to return the wrong value for snapshot.totalCollateral resulting...

7AI score
SaveExploits0
Code423n4
Code423n4
added 2023/05/15 12:0 a.m.11 views

Inadequate checks for comptroller in PoolRegistry#addMarket allows malicious comptrollers to be added

Lines of code Vulnerability details Impact Malicious comptrollers will be available in the protocol Proof of Concept The addMarket function only checks that the input.comptroller is not the 0 address, but does not check if the comptroller was actually created by the PoolRegistry contract. A...

6.7AI score
SaveExploits0
Code423n4
Code423n4
added 2023/05/15 12:0 a.m.15 views

Comptroller.sol#_getHypotheticalLiquiditySnapshot assumes that all UnderlyingTokens have the same precision

Lines of code Vulnerability details Impact File: Comptroller.sol 1316 // Get the normalized price of the asset 1317 Exp memory oraclePrice = Exp mantissa: safeGetUnderlyingPriceasset ; 1318 1319 // Pre-compute conversion factors from vTokens - usd 1320 Exp memory vTokenPrice = mulExp mantissa:...

6.9AI score
SaveExploits0
Code423n4
Code423n4
added 2023/05/15 12:0 a.m.26 views

AMO2 doesn't add the lp balance of the CVXStaker to the withdrawable token amount

Lines of code Vulnerability details Impact The lp tokens held by CVXStaker can't be able to used or withdrew by AMO2. Although the jam is not permanent and the owner of the CVXStaker can use recoverToken function to withdraw them, it will cause the functions about removing liquidity break down in...

6.7AI score
SaveExploits0
Code423n4
Code423n4
added 2023/05/15 12:0 a.m.16 views

Inflation attack by drip

Lines of code Vulnerability details Impact The drip might inflate the exchange rate on an initial stake such that that subsequent stakers get minted zero wxETH. Their stake can then be unstaked by the first staker, together with their own first stake and inflation investment. Effectively, the fir...

6.6AI score
SaveExploits0
Code423n4
Code423n4
added 2023/05/15 12:0 a.m.16 views

Bad debt auctions can be DoSed forever

Lines of code Vulnerability details Vulnerability Details For function Shortfall::placeBid in shortfall contract on L183 and L190 , the previous highest bidder’s funds stored in the shortfall contract has to be sent back to the bidder. This operation has to be successful before any new bid can be...

6.6AI score
SaveExploits0
Code423n4
Code423n4
added 2023/05/15 12:0 a.m.21 views

withdrawAllAndUnwrap() the clpToken transfer to AMO.sol may be locked in the contract

Lines of code Vulnerability details Impact in withdrawAllAndUnwrap the clpToken transfer to AMO.sol may be locked in the contract Proof of Concept withdrawAllAndUnwrap You can specify sendToOperator==true to transfer the clpToken to operator The code is as follows: function withdrawAllAndUnwrap...

7AI score
SaveExploits0
Code423n4
Code423n4
added 2023/05/15 12:0 a.m.18 views

Comptroller.sol#healAccount did not call updateRewardTokenBorrowIndex to update the reward

Lines of code Vulnerability details Impact healAccount should call updateRewardTokenBorrowIndex to calculate the reward before affecting the debt value. Proof of Concept Tools Used manual Recommended Mitigation Steps call updateRewardTokenBorrowIndex before heal account. Assessed type Other --- T...

6.9AI score
SaveExploits0
Code423n4
Code423n4
added 2023/05/15 12:0 a.m.15 views

It is possible to override pool params in PoolRegistry.sol since the creator field is never set for a venus pool

Lines of code Vulnerability details Proof of Concept PoolRegistry.createPoolRegistry will call PoolRegistry.registerPool which will make a check on the creator field for a pool. VenusPool memory venusPool = poolByComptrollercomptroller; requirevenusPool.creator == address0, "PoolRegistry: Pool...

6.8AI score
SaveExploits0
Code423n4
Code423n4
added 2023/05/15 12:0 a.m.10 views

Incorrect slippage check in the AMO2.rebalanceUp can be attacked by MEV

Lines of code Vulnerability details Impact The AMO2.rebalanceUp uses AMO2.bestRebalanceUpQuote function to avoid MEV attack when removing liquidity with only one coin. But the bestRebalanceUpQuote does not calculate the slippage correctly in this case, which is vulnerable to be attacked by MEV...

6.7AI score
SaveExploits0
Code423n4
Code423n4
added 2023/05/15 12:0 a.m.21 views

Inconsistent check for LP balance in AMO

Lines of code Vulnerability details Inconsistent check for LP balance in AMO While pulling LP tokens from the CVXStaker contract, the AMO queries the current available balance using the staked balance, which is inconsistent with the implementation of the withdraw function. Impact Curve LP tokens...

6.6AI score
SaveExploits0
Code423n4
Code423n4
added 2023/05/15 12:0 a.m.7 views

Inflation attack by token transfer

Lines of code Vulnerability details Impact The first staker can inflate the exchange rate by transferring tokens directly to the contract such that subsequent stakers get minted zero wxETH. Their stake can then be unstaked by the first staker, together with their own first stake and inflation...

6.8AI score
SaveExploits0
Code423n4
Code423n4
added 2023/05/15 12:0 a.m.11 views

Incorrectly calculation of the total tokens to be seized because of the difference on the scale of magnitude for the prices of the underlying assets

Lines of code Vulnerability details Impact The total number of tokens to be seized could be wrongly calculated if the underlying assets of vTokenBorrowed & vTokenCollateral have a different decimals. Proof of Concept The price returned by the ChainlinkOracle contract of the Venus Protocol, the...

6.7AI score
SaveExploits0
Code423n4
Code423n4
added 2023/05/15 12:0 a.m.11 views

Malicious actor can win auction unfavorably to the protocol by block stuffing

Lines of code Vulnerability details Vulnerability Details When protocol’s bad debt is auctioned off with 10% incentive at the beginning. A user who gives the best bid, wins. The auction ends when at least one account placed a bid, and current block number is bigger than nextBidderBlockLimit:...

6.7AI score
SaveExploits0
Code423n4
Code423n4
added 2023/05/15 12:0 a.m.9 views

MALICIOUS BORROWER CAN DELAY THE Comptroller.liquidateAccount() TRANSACTION BY REPAYING ONE OF HIS BORROWED ASSET SO THAT repayAmount > borrowBalance WILL OCCUR FOR THAT BORROWED ASSET, THUS REVERTING THE TRANSACTION

Lines of code Vulnerability details Impact In the Comptroller.liquidateAccount function, the liquidation orders are executed by calling the forceLiquidateBorrow function and setting the skipLiquidityCheck to true. Hence during the check for the preLiquidateHook, in the VToken.liquidateBorrowFresh...

6.8AI score
SaveExploits0
Code423n4
Code423n4
added 2023/05/15 12:0 a.m.11 views

Unfair handling of rewards for users with a high amount of rewards

Lines of code Vulnerability details Users can claim their rewards in RewardDistributor.claimRewardToken. The reward handling part is done in grantRewardToken: 416: function grantRewardTokenaddress user, uint256 amount internal returns uint256 417: uint256 rewardTokenRemaining =...

6.7AI score
SaveExploits0
Code423n4
Code423n4
added 2023/05/15 12:0 a.m.14 views

Virgin stake can claim all drops

Lines of code Vulnerability details Impact If wxETH drips when nothing is staked, then the first staker can claim every drop. Proof of Concept Suppose drip is enabled when totalSupply == 0. At least one block passes and the first staker stakes, just 1 xETH is enough. This mints her 1 wxETH. This...

6.6AI score
SaveExploits0
Code423n4
Code423n4
added 2023/05/15 12:0 a.m.8 views

Bad debt bidders’ funds are locked forever when Shortfall address is changed during ongoing debt auction

Lines of code Vulnerability details Vulnerability Details When the protocol accrues bad debt, it can be auctioned off to anyone who is willing to pay. Each user wanting to participate in the auction has to lock their bid in Shortfall contract: function placeBidaddress comptroller, uint256 bidBps...

6.7AI score
SaveExploits0
Code423n4
Code423n4
added 2023/05/15 12:0 a.m.11 views

Zero token transfer can cause a potential DoS in CVXStaker

Lines of code Vulnerability details Zero token transfer can cause a potential DoS in CVXStaker The CVXStaker contract doesn't check for zero amount while transferring rewards, which can end up blocking the operation. Impact The CVXStaker contract is in charge of handling interaction with the Conv...

7AI score
SaveExploits0
Code423n4
Code423n4
added 2023/05/15 12:0 a.m.9 views

Wrong use of the deadline for the swapExactTokensForTokens function

Lines of code Vulnerability details Impact deadline: Unix timestamp after which the transaction will revert. uniswap api docs. Venus sets the deadline to block.timestamp, then the transaction will never revert. Proof of Concept Transactions may be blocked resulting in transactions using unintende...

6.9AI score
SaveExploits0
Code423n4
Code423n4
added 2023/05/15 12:0 a.m.14 views

Shortfall.sol#initialize's waitForFirstBidder and nextBidderBlockLimit too short

Lines of code Vulnerability details Impact File: Shortfall.sol 147 waitForFirstBidder = 100; 148 nextBidderBlockLimit = 10; Binance Smart Chain has a block time of around 3 seconds. This could lead to an attacker blocking other bids to bid for the token at a low price. Proof of Concept Tools Used...

6.7AI score
SaveExploits0
Code423n4
Code423n4
added 2023/05/15 12:0 a.m.22 views

Missing transaction expiration check result in asset tokens selling at a lower price

Lines of code Vulnerability details Impact Selling of asset tokens misses the transaction expiration check, which may lead to reward tokens being sold at a price that's lower than the market price at the moment of a swap. Proof of Concept The swapAsset function, which is responsible for selling...

6.8AI score
SaveExploits0
Code423n4
Code423n4
added 2023/05/15 12:0 a.m.13 views

Unspent allowance may break functionality in AMO

Lines of code Vulnerability details Unspent allowance may break functionality in AMO An unspent allowance may cause a denial of service during the calls to safeApprove in the AMO contract. Impact The AMO contract uses the safeApprove function to grant the Curve pool permission to spend funds whil...

6.5AI score
SaveExploits0
Code423n4
Code423n4
added 2023/05/15 12:0 a.m.10 views

Using old oracle prices for estimation users assets before redeeming

Lines of code Vulnerability details Impact Users can avoid correct estimation of assets and redeem more tokens than would redeem in case of estimation with updated oracle prices. Proof of Concept exitMarket function doesn't call oracle.updatePrice before checkRedeemAllowed check at all...

6.9AI score
SaveExploits0
Code423n4
Code423n4
added 2023/05/15 12:0 a.m.12 views

Rebalance amounts should be checked so that updated balances falls within thresholds

Lines of code Vulnerability details Rebalance amounts should be checked so that updated balances falls within thresholds Rebalance operations are allowed when the current percentage of xETH in the Curve pool is outside the defined thresholds. However, there is no check to ensure that the amount o...

6.6AI score
SaveExploits0
Code423n4
Code423n4
added 2023/05/15 12:0 a.m.12 views

Incorrect decimal handling in _startAuction, resulting in wrong auction.startBidBps

Lines of code Vulnerability details Shortfall.startAuction uses the oracle price of the underlying tokens to price the pool bad debt: Shortfall.sol 389: for uint256 i; i the price returned by priceOracle.getUnderlyingPrice has a number of decimals equal to 36 - vToken decimals. This means the...

6.7AI score
SaveExploits0
Code423n4
Code423n4
added 2023/05/15 12:0 a.m.17 views

Wrong WhitePaperInterestRateModel block per year calculations incur losses for users and the protocol

Lines of code Vulnerability details Vulnerability Details Blocks per year calculations in WhitePaperInterestRateModel improperly assume 15 seconds block time, while on Binance Smart Chain it’s 3 seconds. This has grave consequences, because it is used in calculating borrower’s interest rate and...

6.8AI score
SaveExploits0
Code423n4
Code423n4
added 2023/05/15 12:0 a.m.11 views

Every time borrow, the interest is treated as a loan to calculate the interest

Lines of code Vulnerability details Impact File: VToken.sol 896 uint256 accountBorrowsPrev = borrowBalanceStoredborrower; 897 uint256 accountBorrowsNew = accountBorrowsPrev + borrowAmount; After each loan, the original interest will be converted into the loan amount. This can cause interest to...

6.8AI score
SaveExploits0
Code423n4
Code423n4
added 2023/05/15 12:0 a.m.8 views

Rebalancing may overshoot

Lines of code Vulnerability details Impact A rebalance operation may overshoot, bringing the percentage outside the thresholds. Proof of Concept There are contractual limitations on the rebalance operations. It is assumed that these are put in place to ensure that the Rebalance Defender bot is no...

6.7AI score
SaveExploits0
Code423n4
Code423n4
added 2023/05/15 12:0 a.m.15 views

preBorrowHook and preRepayHook can call updateRewardTokenBorrowIndex with old borrowIndex

Lines of code Vulnerability details Impact Under normal circumstances, the user calls VToken.borrow, further calls accrueInterest to update borrowIndex, and then calls preBorrowHook to trigger updateRewardTokenBorrowIndex. But since preBorrowHook is an externl function, an attacker can directly...

6.8AI score
SaveExploits0
Code423n4
Code423n4
added 2023/05/15 12:0 a.m.14 views

Borrowers can be liquidated before default by being based on the borrowBalance from other pools

Lines of code Vulnerability details Impact Borrower can be liquidated before default based on the borrowBalance from other pools. In the liquidity snapshot, borrows from other pools are added as total borrow but the collateral that is used which might not be used as collateral for the poolfor the...

6.9AI score
SaveExploits0
Code423n4
Code423n4
added 2023/05/15 12:0 a.m.16 views

CVXStaker.sol Unable to process newly add rewardTokens

Lines of code Vulnerability details Impact The lack of a mechanism to modify rewardTokens If convex adds new extraRewards CVXStaker.sol cannot transfer the added token Proof of Concept CVXStaker.sol will pass in rewardTokens in constructor and in getReward, loop this array to transfer rewardToken...

6.9AI score
SaveExploits0
Code423n4
Code423n4
added 2023/05/15 12:0 a.m.11 views

Borrower can redeem there collateral without repaying debt completely

Lines of code Vulnerability details Impact A borrower can redeem token in a pool though it has been used as a collateral in another pool without repaying the debt. Borrower can redeem the token as underlying asset even if his/her loan position is in the situation of liquidation. Proof of Concept...

6.9AI score
SaveExploits0
Code423n4
Code423n4
added 2023/05/15 12:0 a.m.13 views

stakedBalance() The wrong number of balance may be returned

Lines of code Vulnerability details Impact stakedBalance maybe return wrong number,Causes AMO.sol not to work properly Proof of Concept stakedBalance use for get the current staked balance of CVXStaker The code is as follows: function stakedBalance public view returns uint256 balance balance =...

6.8AI score
SaveExploits0
Code423n4
Code423n4
added 2023/05/15 12:0 a.m.12 views

A user asset cannot be seized if the supplied market's collateral to seize(vTokenCollateral)is different than the pool(seizerContract) where the liquidateBorrow function is called.

Lines of code Vulnerability details Impact A user asset cannot be seized if the supplied market's collateral to seizevTokenCollateralis different than the poolseizerContract where the liquidateBorrow function is called. Proof of Concept A user asset cannot be seized if the supplied market's...

6.7AI score
SaveExploits0
Code423n4
Code423n4
added 2023/05/15 12:0 a.m.17 views

the blocksPerYear for the WhitePaperInterestRateModel is set incorrectly

Lines of code Vulnerability details Impact the blocksPerYear is set to 2102400 in the WhitePaperInterestRateModel this should be equal to number of blocks per year that is assumed by the interest rate model, but the number of block is set incorrectly and it's not equal to block per year. Proof of...

6.8AI score
SaveExploits0
Code423n4
Code423n4
added 2023/05/15 12:0 a.m.8 views

# riskFund.poolReserves return the token amount & its compaired with the USD value (units are not same)

Lines of code Vulnerability details riskFund.poolReserves return the token amount & its compaired with the USD value units are not same poolReserves in RiskFund.sol returns the token amount. But its compaired with the incentivizedRiskFundBalance which is in USD value. Proof of Concept 403 uint256...

6.8AI score
SaveExploits0
Total number of security vulnerabilities10190