Lucene search
K
Code423n4Recent

10190 matches found

Code423n4
Code423n4
added 2023/05/18 12:0 a.m.6 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
Exploits0
Code423n4
Code423n4
added 2023/05/18 12:0 a.m.8 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
Exploits0
Code423n4
Code423n4
added 2023/05/18 12:0 a.m.11 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
Exploits0
Code423n4
Code423n4
added 2023/05/18 12:0 a.m.8 views

Upgraded Q -> 2 from #255 [1684436602164]

Judge has assessed an item in Issue 255 as 2 risk. The relevant finding follows: QA-03: Anyone can memorialize LP positions from another user Description The function PositionManager.memorializePositions contains no access control. This means anyone can memorialize other LP's positions, provided...

6.8AI score
Exploits0
Code423n4
Code423n4
added 2023/05/15 12:0 a.m.22 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
Exploits0
Code423n4
Code423n4
added 2023/05/15 12:0 a.m.15 views

USDC blacklisted accounts can DOS the bidding system in Shortfall

Lines of code Vulnerability details Impact Shortfall contract is used to clear off any pool bad debt via auction. If the debt reached its mimimum value, anybody can start off the auction and place the bid. Attacker can bid with tokene.g. USDC, USDT that have a contract level admin controlled...

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

Shortfall.sol#placeBid does not limit the bid spread

Lines of code Vulnerability details Impact Shortfall.solplaceBid does not limit the bid spread. The attacker can increase the price by a small amount each time causing the auction to never stop. Proof of Concept Tools Used manual Recommended Mitigation Steps limit the bid spread Assessed type DoS...

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

All the lp tokens will be stuck in the AMO2 contract if CVXStaker.withdrawAllAndUnwrap is called with sendToOperator flag

Lines of code Vulnerability details Impact Loss all the stEth and xEth lp tokens. Proof of Concept The CVXStaker.withdrawAllAndUnwrap can be called by the admin. And if the sendToOperator param is true, all the lp tokens of the CVXStaker contract include lp tokens staked in the CVX and left in th...

7.1AI score
Exploits0
Code423n4
Code423n4
added 2023/05/15 12:0 a.m.9 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
Exploits0
Code423n4
Code423n4
added 2023/05/15 12:0 a.m.11 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
Exploits0
Code423n4
Code423n4
added 2023/05/15 12:0 a.m.13 views

Comptroller.exitMarket() does not get an updated exchange rate causing inacurate exit validations

Lines of code Vulnerability details Impact The user can use the exitMarket function to remove an asset from the account liquidity calculation; disabling them as collateral. The problem is that the user can call exitMarket before the vToken updates their accrue interests via accrueInterest functio...

6.5AI score
Exploits0
Code423n4
Code423n4
added 2023/05/15 12:0 a.m.12 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
Exploits0
Code423n4
Code423n4
added 2023/05/15 12:0 a.m.11 views

mint and burn can be attacked by sandwiches

Lines of code Vulnerability details Impact The rewards of mint and burn are calculated based on the ratio of uTokenincluding debt and vToken, so it can be sandwiched by attackers. Proof of Concept Tools Used manual Recommended Mitigation Steps It is recommended to add the minimum receiving quanti...

6.9AI score
Exploits0
Code423n4
Code423n4
added 2023/05/15 12:0 a.m.15 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
Exploits0
Code423n4
Code423n4
added 2023/05/15 12:0 a.m.9 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
Exploits0
Code423n4
Code423n4
added 2023/05/15 12:0 a.m.15 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
Exploits0
Code423n4
Code423n4
added 2023/05/15 12:0 a.m.8 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
Exploits0
Code423n4
Code423n4
added 2023/05/15 12:0 a.m.9 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
Exploits0
Code423n4
Code423n4
added 2023/05/15 12:0 a.m.14 views

Comptroller.sol#liquidateCalculateSeizeTokens assumes the same precision for vTokenBorrowed and vTokenCollateral

Lines of code Vulnerability details Impact File: Comptroller.sol 1099 uint256 exchangeRateMantissa = VTokenvTokenCollateral.exchangeRateStored; // Note: reverts on error 1100 uint256 seizeTokens; 1101 Exp memory numerator; 1102 Exp memory denominator; 1103 Exp memory ratio; 1104 1105 numerator =...

6.9AI score
Exploits0
Code423n4
Code423n4
added 2023/05/15 12:0 a.m.19 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
Exploits0
Code423n4
Code423n4
added 2023/05/15 12:0 a.m.9 views

Whales can freeze all user funds

Lines of code Vulnerability details Impact Whales can freeze user funds by adding large amounts of a smaller token, while keeping collateral in other tokens. By accumulating interest in the small token, they will be able to call reduceReserves once the interest increased enough to match the cash...

6.8AI score
Exploits0
Code423n4
Code423n4
added 2023/05/15 12:0 a.m.8 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
Exploits0
Code423n4
Code423n4
added 2023/05/15 12:0 a.m.12 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
Exploits0
Code423n4
Code423n4
added 2023/05/15 12:0 a.m.10 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
Exploits0
Code423n4
Code423n4
added 2023/05/15 12:0 a.m.7 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
Exploits0
Code423n4
Code423n4
added 2023/05/15 12:0 a.m.13 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
Exploits0
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
Exploits0
Code423n4
Code423n4
added 2023/05/15 12:0 a.m.9 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
Exploits0
Code423n4
Code423n4
added 2023/05/15 12:0 a.m.12 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
Exploits0
Code423n4
Code423n4
added 2023/05/15 12:0 a.m.19 views

wxETH.sol Inflation Attack

Lines of code Vulnerability details Impact The first staker may suffer an Inflation Attack and lose the funds Proof of Concept Currently wxETH still has the common ERC4626 'Inflation Attack' malicious users can front-run the first staker, raise exchange rates through donations, then achieve...

7.1AI score
Exploits0
Code423n4
Code423n4
added 2023/05/15 12:0 a.m.8 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
Exploits0
Code423n4
Code423n4
added 2023/05/15 12:0 a.m.6 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
Exploits0
Code423n4
Code423n4
added 2023/05/15 12:0 a.m.7 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
Exploits0
Code423n4
Code423n4
added 2023/05/15 12:0 a.m.10 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
Exploits0
Code423n4
Code423n4
added 2023/05/15 12:0 a.m.7 views

Shortfall.sol#updateNextBidderBlockLimit may cause the current auction to end immediately

Lines of code Vulnerability details Impact File: Shortfall.sol 293 function updateNextBidderBlockLimituint256 nextBidderBlockLimit external 294 checkAccessAllowed"updateNextBidderBlockLimituint256"; 295 requirenextBidderBlockLimit != 0, "nextBidderBlockLimit must not be 0"; 296 uint256...

6.8AI score
Exploits0
Code423n4
Code423n4
added 2023/05/15 12:0 a.m.12 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
Exploits0
Code423n4
Code423n4
added 2023/05/15 12:0 a.m.11 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
Exploits0
Code423n4
Code423n4
added 2023/05/15 12:0 a.m.10 views

totalBorrows inflates faster than the sum of each position's debt

Lines of code Vulnerability details Impact File: VToken.sol 678 function accrueInterest public virtual override returns uint256 --skip-- 710 Exp memory simpleInterestFactor = mulExp mantissa: borrowRateMantissa , blockDelta; 711 uint256 interestAccumulated = mulScalarTruncatesimpleInterestFactor,...

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

Loans can be rolled an unlimited number of times

Lines of code Vulnerability details Impact Loans can be rolled an unlimited number of times, without letting the lender decide if has been done too many times already Proof of Concept It will cause the totalBorrow of the contract to increase infinitely, affecting the exchangeRate. Tools Used manu...

6.9AI score
Exploits0
Code423n4
Code423n4
added 2023/05/15 12:0 a.m.7 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
Exploits0
Code423n4
Code423n4
added 2023/05/15 12:0 a.m.10 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
Exploits0
Code423n4
Code423n4
added 2023/05/15 12:0 a.m.12 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
Exploits0
Code423n4
Code423n4
added 2023/05/15 12:0 a.m.7 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
Exploits0
Code423n4
Code423n4
added 2023/05/15 12:0 a.m.9 views

Potential Division by Zero in utilizationRate method

Lines of code Vulnerability details Impact In the case where cash + borrows - reserves equals 0, the function would try to divide by zero which will result in a runtime error. Proof of Concept An attacker might manipulate the state of the contract to where cash + borrows - reserves equals zero...

6.9AI score
Exploits0
Code423n4
Code423n4
added 2023/05/15 12:0 a.m.6 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
Exploits0
Code423n4
Code423n4
added 2023/05/15 12:0 a.m.9 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
Exploits0
Code423n4
Code423n4
added 2023/05/15 12:0 a.m.5 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
Exploits0
Code423n4
Code423n4
added 2023/05/15 12:0 a.m.11 views

Stale risk fund assets may make protocol loose funds

Lines of code Vulnerability details Vulnerability Details When swapping Risk funds in a pool swapPoolsAssetsaddress,uint256,address from one market underlying asset type to convertibleBaseAsset , only a limited selected markets are supplied as input parameter. function swapPoolsAssets address...

6.7AI score
Exploits0
Code423n4
Code423n4
added 2023/05/15 12:0 a.m.10 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
Exploits0
Code423n4
Code423n4
added 2023/05/15 12:0 a.m.9 views

PLACEBID() IN SHORTFALL.SOL MAY LEAD TO DENIAL OF SERVICE AND FRONT RUNNING ATTACKS

Lines of code Vulnerability details Impact The Shortfall.placeBid function in the Venus protocol exhibits potential vulnerabilities that may lead to denial-of-service DoS and front-running attacks. A malicious actor could exploit these vulnerabilities to disrupt the auction process, manipulate...

6.8AI score
Exploits0
Total number of security vulnerabilities10190