10190 matches found
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...
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...
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...
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...
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...
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...
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...
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 =...
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...
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...
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...
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...
Wrong blocksPerYear in WhitePaperInterestRateModel
Lines of code Vulnerability details Impact Venus is deployed on BNB Chain instead of Ethereum. Their block times are different. And WhitePaperInterestRateModel.sol is modified from compound. Therefore, blocksPerYear should be modified or Venus would get the wrong rate when using...
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...
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...
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...
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...
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...
getAccountSnapShot always returns NO_ERROR no matter what's its inputs is.
Lines of code Vulnerability details Impact In the safeGetAccountSnapShot function, it seems the getAccountSnapshot always return NOERROR, so the checking if err != 0 revert SnapshotErroraddressvToken, user; Becomes meaningless because err is always equal to 0. This may lead to critical issues...
Lack of Access Control in claimRewards Function
Lines of code Vulnerability details Impact The calculateNewRewards function should also check whether the rewardsCapped variable is greater than the rewardsClaimedInEpoch variable to ensure that rewards are not claimed that exceed the reward cap, because an attacker could exploit this vulnerabili...
There can be a maximum of 11 proposals
Lines of code Vulnerability details Impact Overflow Proof of Concept The proposeExtraordinary function restricts that the result of the getMinimumThresholdPercentage function must be less than or equal to 1018. The maximum length of the fundedExtraordinaryProposals array is 10, but there is no...
PositionManager's moveLiquidity can set wrong deposit time and permanently freeze LP funds moved
Lines of code Vulnerability details moveLiquidity set new destination index LP entry deposit time to be equal to the source index deposit time, while destination bucket might have defaulted after that time. This is generally not correct as source bucket bankruptcy is controlled i.e. LP shares tha...
Insufficient Validation of Total Tokens Requested.
Lines of code Vulnerability details Impact In the proposeExtraordinary function in the Funding contract. Specifically, in the following line: L105 if uint256totalTokensRequested getSliceOfTreasuryMaths.WAD - getMinimumThresholdPercentage revert InvalidProposal; If the totalTokensRequested paramet...
Delegation rewards are not counted toward granting fund
Lines of code Vulnerability details Impact Each period reserves a reward for granting up to 3% GBC: Global Budget Constraint. The GBC is split into two parts: 1. 90% for proposal granting. Any proposal requesting more than 90% will revert. The total amount requested across winning proposals must...
Attacker can drain the token from the user's account
Lines of code Vulnerability details Vulnerability details Impact There is a potential vulnerability if the increaseLPAllowance function is not implemented safely and allows for arbitrary increases to the token allowance. File: ajna-core/src/PositionManager.sol pool.increaseLPAllowanceowner,...
Using memory instead of storage in 'redeemPositions' will result in incorrect LP Balance
Lines of code Vulnerability details Impact This bug could lead to a situation where a user can 'redeem' their positions without the associated liquidity positions LPs being properly reset. This could result in the user being able to artificially inflate their LP balance, which could lead to...
Race condition vulnerability in positionManager minting function
Lines of code Vulnerability details Impact race condition vulnerability can result in the issuance of duplicate token IDs. When multiple transactions are executed in quick succession attempting to mint tokens, they may end up being assigned the same ID due to a shared counter or variable used to...
Users may lose rewards
Lines of code Vulnerability details Impact In RewardsManager.sol we have claimRewards function: function claimRewards uint256 tokenId, uint256 epochToClaim external override StakeInfo storage stakeInfo = stakestokenId; if msg.sender != stakeInfo.owner revert...
Division by Zero Vulnerability in _calculateNewRewards function.
Lines of code Vulnerability details Impact The calculateNewRewards function in the smart contract performs a division operation with totalInterestEarnedInPeriod, which could be zero, but there is a problem that can result in a division-by-zero error, causing the smart contract to behave...
Incorrect Calculation of Max Amount of Quote Tokens in moveLiquidity() Function in PositionManager.sol.
Lines of code Vulnerability details Impact The updateInterest function is called before retrieving the fromPosition value from positionsparams.tokenIdparams.fromIndex in the moveLiquidity function. This means that the bucketDeposit value may not reflect the current accrued interest, which can...
The design flaws have resulted in unfairness in the protocol.
Lines of code Vulnerability details Impact Ordinary traders are not aware that the contract does not have sufficient ajna tokens when receiving rewards, resulting in partial loss of ajna. Smart traders will check the contract token balance before claiming rewards, which leads to unfairness. Proof...
It is not possible to create or execute new extraordinary proposals after 10 funded Extraordinary Proposals
Lines of code Vulnerability details Impact With each executed offer, the value of getMinimumThresholdPercentage increases, resulting in the fact that when trying to create a new proposal or execute existing, getMinimumThresholdPercentage exceeds 1e18 and we catch an underflow error via...
Treasury accounting miss voters rewards
Lines of code Vulnerability details treasury is overstated over time as each distribution period it adds back the delegate rewards part, which is actually spent on voters rewards. I.e. it is updated with fundsAvailable - totalTokensRequested difference, while totalTokensRequested is limited to 90...
Position NFT can be spammed with insignificant positions by anyone until rewards DoS
Lines of code Vulnerability details Impact The PositionManager.memorializePositionsparams method can be called by anyone per design, see 3rd party test cases and allows insignificantly small any value 0 positions to be attached to anyone else's positions NFT, see PoC. As a result, the...
Inconsistence input of depositTime might lead to unexpected result
Lines of code Vulnerability details Impact Inconsistency by relying on depositTime at positions hashmap instead of reading the value from lenderInfo Proof of Concept The depositTime is being read from fromPosition.depositTime at moveLiquidity function and not from lenderInfo L268 and L285...
Use of msg.sender in mayInteract Modifier
Lines of code Vulnerability details Impact The use of msg.sender in the mayInteract modifier in the contract. I have identified a potential vulnerability in the use of msg.sender. In this case, the vulnerability is caused by using msg.sender to authorize interactions with the contract. Since...
Risk of Gas Limit Exceedance During Proposal Sorting
Lines of code Vulnerability details Impact The array of up to 10 proposals using the insertion sort algorithm in insertionSortProposalsByVotes function in the StandardFunding.sol contract but, if the number of proposals exceeds 10, the sorting process may cause the function to exceed the block ga...
NOT CONFIRMED
Lines of code L1 Vulnerability details NOT CONFIRMED Assessed type Decimal --- The text was updated successfully, but these errors were encountered: All reactions...
Proposed Token Request Exceeds Available Funds Check Missing.
Lines of code Vulnerability details Impact The proposeStandard function in StandardFunding.sol contract does not include a direct check to ensure that the proposed tokens requested are less than or equal to the actual available funds for the distribution period. Instead, it only checks if the...
Incorrect calculation of the remaining updatedRewards leads to possible underflow error
Lines of code Vulnerability details Impact RewardsManage.sol keeps track of the total number of rewards collected per epoch for all pools: File: 2023-05-ajna\ajna-core\src\RewardsManager.sol 73: /// @dev epoch = rewards claimed mapping. 74: mappinguint256 = uint256 public override rewardsClaimed;...
stake() function: The provided stake function lacks checks to prevent a lender from staking multiple NFTs in the same Ajna pool. The function allows any owned position NFT to be staked without considering whether the lender has already staked in the pool. This potentially opens up the system to an abuse where a lender stakes multiple NFTs for the same liquidity position.
Lines of code Vulnerability details Impact The current stake function lacks checks to prevent a lender from staking multiple NFTs in the same Ajna pool. This could lead to an abuse of the system where a lender stakes multiple NFTs for the same liquidity position, potentially earning more rewards...
Extraordinary proposal can become stuck
Lines of code Vulnerability details Since standard and extraordinary proposals use the same treasury funds accounting variables and extraordinary voting period is long enough 1 month, it is possible that extraordinary proposal that was valid and gained enough votes will end up frozen: it might no...
ExtraordinaryFunding may fail due to a decrease in the treasury funds due to a StandardFunding new distribution round
Lines of code Vulnerability details Impact Users could spend gas and possibly other off chain resources voting on an ExtraordinaryFunding proposal which would later revert when executing. Proof of Concept If an ExtraordinaryFunding proposal requests an amount of tokens between 48.5% and 50% of th...
An expired parameter is required because there may be slippage in the calculation.
Lines of code Vulnerability details Impact Due to changes in interest rates, failure to process transactions in a timely manner may result in missing out on ideal rewards. Proof of Concept The calculation of the clainRewards function involves interest rates, which are variable. If...
Integer Overflow in executeExtraordinary Function.
Lines of code Vulnerability details Impact The executeExtraordinary function casts a uint128 value to a uint256 value, which could lead to an integer overflow vulnerability. An attacker can provide a large uint128 value that exceeds the maximum value for uint256, causing the value to overflow and...
unstake() function: The unstake function permits the unstaking of multiple position NFTs from the same liquidity pool (LP) by the same lender. This opens the possibility for a lender to claim more Ajna token rewards than they are entitled to by staking and unstaking multiple NFTs associated with the same LP.
Lines of code Vulnerability details Impact The absence of a mechanism to prevent a lender from unstaking multiple NFTs for the same liquidity pool LP could potentially lead to the exploitation of the Ajna token reward system. A lender can mint, stake, and unstake multiple NFTs for the same LP fro...
Extraordinary Funding proposal could be susceptible back-run
Lines of code Vulnerability details Impact An extraordinary proposal can be proposed, voted on, and executed within a single transaction, in the same block. As a result, an attacker with enough voting power to meet the conditions on their own could back-run a transaction to steal funds from the...
PositionManager's moveLiquidity can freeze funds by removing destination index even when the move was partial
Lines of code Vulnerability details positionIndex.removeparams.fromIndexremoves the PositionManager entry even when it is only partial removal as a result of IPoolparams.pool.moveQuoteToken... call. I.e. it is correct to do fromPosition.lps -= vars.lpbAmountFrom, but the resulting amount might no...
Missing Proposal Validations in Funding Contract.
Lines of code Vulnerability details Impact The Funding.sol contract's validateCallDatas function validates the targets, values, and calldatas parameters for a proposal but does not check if the proposal is valid based on the current state of the contract. For example, it does not check if the...
Unchecked increment in calculateRewards function of RewardsManager.sol.
Lines of code Vulnerability details Impact In the calculateRewards function, there is an unchecked increment in the for loop, in the code it can allow an attacker to cause an integer overflow in the calculateRewards function by manipulating the loop variable, resulting in incorrect rewards...