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-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;...
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...
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...
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...
[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 =...
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...
[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...
[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...
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...
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...
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...
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...
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 _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...
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...
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...
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...
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...
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...
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...
[WP-H12] Wrong implementation of ConvexCurveLPVault#withdrawOnLiquidation() may cause the positions collateralized with ConvexCurveLP unbale to be liquidated as withdrawOnLiquidation() will always fail
Lines of code Vulnerability details function withdrawuint256 amount, address to internal returns uint256 // Withdraw from Convex address baseRewardPool = getBaseRewardPool; IConvexBaseRewardPoolbaseRewardPool.withdrawAndUnwrapamount, true; // Deliver Curve LP Token...
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...
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...
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...
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...
Unchecked call in _withdrawFromYieldPool
Lines of code GeneralVault.solL100-L128 LidoVault.solL122-L149 Vulnerability details Impact In the withdrawFromYieldPool function in LidoVault.sol, the receivedETHAmount value is returned before the sent value for the call function is checked on line 142. When withdrawCollateral is called in...
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...
Overexert on-chain slippage/loss control may cause users' funds to be frozen in the contract
Lines of code Vulnerability details requirewithdrawAmount = amount.percentMul9900, Errors.VTWITHDRAWAMOUNTMISMATCH; The GeneralVault.sol contract comes with a on-chain slippage/loss control to ensure the output amount is no more than 1% less of the requested amount. This can be a problem when the...
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...
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...
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...
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...
Initialization function can be front-run
Lines of code Vulnerability details Impact The call to the initialize function can be front-run, and a malicious provider can be passed in and set to addressesProvider on any contract that inherits GeneralVault. This is significant because the onlyAdmin modifier checks if the msg.sender is...
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...
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...
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...
Withdraw success check don't happen
Lines of code Vulnerability details Impact The protocol suppose to send ETH to the user, but in case of fail, nothing will check it. Proof of Concept the code is 140 bool sent, bytes memory data = addressto.callvalue: receivedETHAmount''; 141 return receivedETHAmount; 142 requiresent,...
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...
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...
Title: Yield can be unfairly divided because of MEV/Just-in-time stablecoin deposits
Lines of code Vulnerability details Impact An attacker can use MEV via gas auction or Flashbots or control of miners to cause an unfair division of yield. By providing a very large relative to the size of all other stablecoin deposits combined stablecoin deposit Just-in-Time before an admin's cal...
User can forfeit other user rewards
Lines of code Vulnerability details Impact User can forfeit other user rewards by giving a higher startIndex in getReward function Proof of Concept 1. Assume User B has not received any reward yet so that his userClaimstokenUser B=0 2. User A calls getReward function with account as User B and...
[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...
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...
[LidoVault.sol][_withdrawFromYieldPool] Should not call return receivedETHAmount before the require check
Lines of code Vulnerability details Impact It is possible that users cannot receive ETH if sending ETH to users is not successful because the require check is unreachable. Proof of Concept withdrawFromYieldPool function executes the following code if user requests ETH withdrawal. if asset ==...