10190 matches found
Griefing attack by transferring aTokens to the contract
Originally part of a QA report by Tadashi 69 Griefing attack by transferring aTokens to the contract Summary: tokenToShares uses the following formula for computing the total shares of an user: return supply == 0 ? tokens : tokens.mulsupply.divaToken.balanceOfaddressthis; An attacker wishing to...
The bool return value of variable success is not checked/handled in removeCollateral() of NFTPairWithOracle.sol
Adding this issue from 77 which highlights a high-risk issue dupe of 21 --- The text was updated successfully, but these errors were encountered: All reactions...
AuraLocker.sol lock() can be used to dos user
Lines of code Vulnerability details Impact User funds permanently stuck in AuraLocker Proof of Concept The lock function allows anyone to deposit and lock tokens for another address. If the most recent lock is not expired, it pushes a new lock to the array of locks for that user in the following...
[WP-H3] Lack of liquidation makes it possible for alToken to be undercollateralized
Lines of code Vulnerability details function liquidate address yieldToken, uint256 shares, uint256 minimumAmountOut external override lock returns uint256 onlyWhitelisted; checkArgumentshares 0; YieldTokenParams storage yieldTokenParams = yieldTokensyieldToken; address underlyingToken =...
[WP-H1] Debt can be repaid with a depegged underlyingToken, which can be exploited by arbitrageurs and drives the market price of alToken to match the worst depegged underlyingToken
Lines of code Vulnerability details function normalizeUnderlyingTokensToDebtaddress underlyingToken, uint256 amount internal view returns uint256 return amount underlyingTokensunderlyingToken.conversionFactor; function repayaddress underlyingToken, uint256 amount, address recipient external...
AutoleverageBase: Must approve 0 first
Lines of code Vulnerability details Impact Some tokens like USDT do not work when changing the allowance from an existing non-zero allowance value.They must first be approved by zero and then the actual allowance must be approved. Proof of Concept Tools Used None Recommended Mitigation Steps...
TransmuterBuffer.sol calls depositUnderlying with no slippage bounds
Lines of code Vulnerability details Impact Loss of funds in TransmuterBuffer Proof of Concept If the buffer is called during and unfavorable time then a large portion of deposited funds may be lost due to slippage because deposit is called with 0 as the minimum out allowing any level of slippage...
DoS in wrap and unwrap
Lines of code Vulnerability details Impact the code is doing wrong check, so when things will work it will revert. Proof of Concept In the function wrap there is this lines: if error = ICERC20token.mintamount != NOERROR revert FuseErrorerror; but mint returns the amount that minted, so when error...
A well financed attacker could prevent any other users from minting synthetic tokens
Lines of code Vulnerability details Impact In the AlchemistV2 contract, users can deposit collateral to then borrow/mint the synthetic tokens offered by the protocol. The protocol also defines a minting limit that specifies how many synthetic tokens can be minted in a given time period. This exis...
[gALCX.sol] Attacker can make the contract unusable when totalSupply is 0
Lines of code Vulnerability details Impact An attacker can make the contract unusable when totalSupply is 0. Specifically, bumpExchangeRate function does not work correctly which results in making stake, unstake and migrateSource functions that do not work as expected. Proof of Concept Here are...
Alchemist can mint AlTokens above their assigned ceiling by calling lowerHasMinted()
Lines of code Vulnerability details Impact An alchemist / user can mint more than their alloted amount of AlTokens by calling lowerHasMinted before they reach their minting cap. Proof of Concept Function mint in AlchemicTokenV2Base.sol function mintaddress recipient, uint256 amount external...
[WP-H2] Always use a 1:1 ratio for all the underlyingTokens when calculating the collateral value is flawed and can cause systemic failure when one of the underlyingTokens is depegged
Lines of code Vulnerability details function normalizeUnderlyingTokensToDebtaddress underlyingToken, uint256 amount internal view returns uint256 return amount underlyingTokensunderlyingToken.conversionFactor; function totalValueaddress owner internal view returns uint256 uint256 totalValue = 0;...
Excluded user who added liquidity and then was unexcluded can block the withdrawals
83 comment Warden: throttle Excluded user who added liquidity didn't account for totalLiquidty increase. Later, if he is removed from excluded list and tries to remove liqudity, totalLiquidty will be subtracted which can lead to DoS for other user who want to remove liquidity Not sure if this is...
ATB-01M: Inexplicable Capability of Self-Limit Reduction
Lines of code Vulnerability details ATB-01M: Inexplicable Capability of Self-Limit Reduction | File | Lines | Type ---|---|--- AlchemicTokenV2Base.sol | L189-L191 | Access Control Description The mint function is meant to prevent arbitrary amount mints via the totalMinted variable being guarantee...
maxFee is not checked against a max value while being updated
187 comment Warden: catchup Lines of code Vulnerability details changeFee maxFee should be checked against a maximum value like 10% to make sure it is not set too high by mistake. Impact maxFee can be set beyond limits which would mess up fee calculations. Proof of Concept getTransferFee function...
New gALCX token denomination can be depressed by the first depositor
Lines of code Vulnerability details An attacker can become the first depositor for a recently created gALCX contract, providing a tiny amount of ALCX tokens by calling stake1 raw values here, 1 is 1 wei, 1e18 is 1 ALCX. Then the attacker can directly transfer, for example, 10^6 1e18 - 1 of ALCX t...
TransmuterBuffer's _alchemistWithdraw use hard coded slippage that can lead to user losses
Lines of code Vulnerability details exchange - exchange - alchemistWithdraw is user funds utilizing call sequence and the slippage hard coded to 1% there can cause a range of issues. For example, if there is not enough shares, the number of shares to withdraw will be unconditionally reduced to th...
Exchange Rate Race Condition
Lines of code Vulnerability details GAX-01M: Exchange Rate Race Condition | File | Lines | Type ---|---|--- gALCX.sol | L69-L81 | Improper State Assumption Description The gALCX contains a race condition whereby whenever the contract has no stakes such as when the contract is first deployed the...
TransmuterBuffer's setAlchemist will freeze deposited funds
Lines of code Vulnerability details Currently setAlchemist doesn't check whether there are any open positions left with the old Alchemist before switching to the new one. As this require a number of checks the probability of operational mistake isn't low and it's prudent to introduce the main...
Validate input variables bounds
83 comment Warden: throttle fee variables bounds are not checked. this can lead to expensive mistake --- The text was updated successfully, but these errors were encountered: All reactions...
AlchemicTokenV2Base minters can always surpass mint ceiling threshold
Lines of code Vulnerability details AlchemicTokenV2Base's lowerHasMinted function has onlyWhitelisted access control. Any minter is whitelisted, it is required to be able to run mint. Each minters' mint total amount is controlled by totalMinted cumulative counter, which can be reduced by running...
registerAsset misuse can permanently disable TransmuterBuffer and break the system
Lines of code Vulnerability details TransmuterBuffer's refreshStrategies is the only way to actualize yieldTokens array. The function requires registeredUnderlyings array to match current Alchemist's supportedUnderlyingTokens. In the same time registeredUnderlyings can be only increased via...
If totalShares for a token falls to zero while there is pendingCredit the contract will become stuck
Lines of code Vulnerability details Impact It is possible for the contract to become stuck and unable to perform any actions if the totalShares of a yield token fall to zero while there is some pendingCredit still to be paid. It will then be impossible to call deposit or withdraw functions, mints...
YearnTokenAdapter's wrap can become stuck as it uses one step approval for an arbitrary underlying
Lines of code Vulnerability details Some tokens do not allow for approval of positive amount when allowance is positive already to handle approval race condition, most known example is USDT. This can cause the function to stuck whenever a combination of such a token and leftover approval be met...
YieldManager: Uniswap token swaps through fixed path may break yield distribution
Lines of code Vulnerability details Details & Impact All harvested yield tokens are swapped through the Uniswap adapter to USDC. While out of scope, the Uniswap adapter code is relevant here, as I note that the path taken for the swap would be assetFrom - WETH - assetTo unless assetFrom is alread...
Ether can be locked in the LidoVault contract without a way to retrieve it
Lines of code Vulnerability details Impact If a borrower deposits stETH into the LidoVault contract via the payable function GeneralVault.depositCollateraladdress asset, uint256 amount and accidentally sends a non-zero Ether value with it, then the Ether value sent will be locked within the...
At LidoVault.sol, _withdrawFromYieldPool()function, ETH transfer return value is not checked
Lines of code Vulnerability details Impact At withdrawFromYieldPool ETH transfer return value is not checked as the return statement at line 141 breaks the return value checking. Proof of Concept function withdrawFromYieldPool address asset, uint256 amount, address to internal override returns...
ETH transefer is not checked properly
Lines of code Vulnerability details Title ETH transefer is not checked properly Impact Function will return successfully even if the transfer of ETH failed Proof of Concept in smart-contracts/LidoVault.solL141-L142 the function returns before checking that the ETH is sent properly. This may cause...
User may lose ETH when depositing stETH
Lines of code GeneralVault.solL75-L89 LidoVault.solL79-L104 Vulnerability details Impact When the depositCollateral function is used in the LidoVault.sol contract, a user depositing stETH may mistakenly have a non-zero msg.value. The ETH would be passed to the contract and the user would lose tha...
sendFundsToUser() function, where executors are fully trusted to provide the correct information to complete the cross-chain transfer
78 comment Warden: hickuphh3 One area of concern is the sendFundsToUser function, where executors are fully trusted to provide the correct information to complete the cross-chain transfer. Any executor that becomes compromised will enable the attacker to fully drain the available liquidity of a...
Return before require
Lines of code Vulnerability details Impact Lose of funds Proof of Concept In the function withdrawFromYieldLidoVault.sol after transferring ETH there is a return and just after there is a require. This require will never be reached as the return finishes the execution. As the result the transfer...
Lido adapter incorrectly calculates the price of the underlying token
Lines of code Vulnerability details Impact The Lido adapter incorrectly calculates the price of WETH in terms of WstETH. The function returns the price of WstETH in terms of stETH. The underlying token which we desire is WETH. Since stETH does not have the same value as WETH the output price...
Return value of send of ether not checked in _withdrawFromYieldPool
Lines of code Vulnerability details Impact A send of ether is done on LidoVault.sol:140. It is immediately followed by a return statement which will cause the function to return without checking the sent value on line 142. Line 142 is dead code. The impact is that the to address might not receive...
Unreachable require check in LidoVault.sol::_withdrawFromYieldPool()
Lines of code Vulnerability details Impact LidoVault.solL141 In case of ETH withdraw request from user. after exchanging stETH - ETH withdrawFromYieldPool send ETH to user but the require check is after the return of receivedETHAmount so this check won't happen. and in if call is going to fail it...
Withdrawing ETH collateral with max uint256 amount value reverts transaction
Lines of code Vulnerability details Impact Withdrawing ETH collateral via the withdrawCollateral function using typeuint256.max for the amount parameter reverts the transaction due to asset being the zero-address and IERC20Detailedasset.decimals not working for native ETH. Proof of Concept...
User does not get funds if sending ETH in LidoVault.sol fails, funds stay suck in the contract
Lines of code Vulnerability details Impact Detailed description of the impact of this finding. If the user uses smart contract to interact with the protocol with no receive/ payable fallback function, sending of ETH to the user will fail and the ETH would stay in the contract and withdraw action...
The check for value transfer success is made after the return statement in _withdrawFromYieldPool of LidoVault
Lines of code Vulnerability details Impact Users can lose their funds Proof of Concept The code checks transaction success after returning the transfer value and finishing execution. If the call fails the transaction won't revert since requiresent, Errors.VTCOLLATERALWITHDRAWINVALID; won't execut...
low-level call not validated in lidoVault
Lines of code Vulnerability details Impact In lines 140 and 141 a low-level transfer is performed and first it is reversed and then it is validated with the require if it was done correctly. This can generate many problems, since the transaction may not be carried out and a message may be returne...
require statment to very importent call to a contract,never gets called
Lines of code Vulnerability details Impact bool sent, bytes memory data = addressto.callvalue: receivedETHAmount''; return receivedETHAmount; require statement is never reached. this can be a failed call and not know about it causes function to go on with the desired outcome / return ends the...
hard-coded slippage may freeze user funds during market turbulence
Lines of code Vulnerability details Impact GeneralVault.solL125 GeneralVault set a hardcoded slippage control of 99%. However, the underlying yield tokens price may go down. If Luna/UST things happen again, users' funds may get locked. LidoVault.solL130-L137 Moreover, the withdrawal of the...
return before require statement
Lines of code Vulnerability details Impact Function LidoVaultwithdrawFromYieldPool returns before the return value of call is validated, so if the call fails the function finishes execution and the user doesn't receive ETH Proof of Concept Tools Used Manual review Recommended Mitigation Steps pla...
LidoVault: Premature return after sending ETH
Lines of code Vulnerability details Details & Impact The require check is performed after exiting the function, meaning that the ETH transfer’s validity check is skipped. This would thus cause invalid withdrawals to be erroneously processed as valid. Recommended Mitigation Steps Swap the require...
[WP-H5] LidoVault.sol Wrong implementation can cause the users to lose their funds when withdrawing ETH
Lines of code Vulnerability details function withdrawFromYieldPool address asset, uint256 amount, address to internal override returns uint256 address LIDO = addressesProvider.getAddress'LIDO'; if asset == address0 // Case of ETH withdraw request from user, so exchange stETH - ETH via curve uint2...
Slippage check is too strict when withdrawing ETH collateral from LidoVault
Lines of code Vulnerability details Impact When withdrawing ETH collateral from LidoVault with withdrawCollateral, stETH is exchanged to ETH via Curve while using a slippage value of 2% 200, L136. The resulting exchanged amount receivedETHAmount is then validated to be larger than the requested...
procee yield can be sandwiched by whales
Lines of code Vulnerability details Impact YieldManager.solL142-L171 YieldManager distributes yield according to the current state. Big whales can deposit into the protocol before the process yield is called and left the project. Sandwich attacks are hard to mitigate and whales can always extract...
Withdraw all with amount: type(uint256).max in native token (ETH) will always revert
Lines of code Vulnerability details if amount == typeuint256.max uint256 decimal = IERC20Detailedasset.decimals; amount = amountToWithdraw.multhis.pricePerShare.div10decimal; Per the comment: The asset address for collateral asset = 0x0000000000000000000000000000000000000000 means to use ETH as...
depositCollateral allows user's ETH sent along with the tx to be stuck forever
Lines of code Vulnerability details Impact LidoVault and ConvexCurveLPVault both inherit from GeneralVault that implement the method depositCollateral. This method has the keyword payable so it allows users to send ETH with the tx. depositToYieldPool that is called inside depositCollateral in bot...
ConvexCurveLPVault's _transferYield can become stuck with zero reward transfer
Lines of code Vulnerability details Now there are no checks for the amounts to be transferred via transferYield and processTreasury. As reward token list is external and an arbitrary token can end up there, in the case when such token doesn't allow for zero amount transfers, the reward retrieval...
Ether can be locked in the ConvexCurveLPVault contract without a way to retrieve it
Lines of code Vulnerability details Impact If a borrower deposits Curve LP tokens into the ConvexCurveLPVault contract via the payable function GeneralVault.depositCollateraladdress asset, uint256 amount and accidentally sends a non-zero Ether value with it, then the Ether value sent will be lock...
processYield() and distributeYield() may run out of gas and revert due to long list of extra rewards/yields
Lines of code Vulnerability details Impact Yields will not be able to be distributed to lenders because attempts to do so will revert Proof of Concept The processYield function loops overall of the extra rewards and transfers them File: smart-contracts/ConvexCurveLPVault.sol 1 105 uint256...