Lucene search
+L
Code423n4Most viewed

10190 matches found

Code423n4
Code423n4
added 2021/12/06 12:00 a.m.17 views

depositToken != rewardToken

Handle pauliax Vulnerability details Impact function createStream should validate that depositToken != rewardToken, otherwise, some functionality may not work as intended, e.g. in function recoverTokens it will become impossible to reach the second 'if' statement. Recommended Mitigation Steps...

6.9AI score
SaveExploits0
Code423n4
Code423n4
added 2021/12/01 12:00 a.m.17 views

MiningService.setBonding should use BONDING role instead of REINVESTOR one

Handle hyh Vulnerability details Impact BONDINGROLE cannot be managed after it was initialized. Proof of Concept setBonding set the wrong role via swapRole: Recommended Mitigation Steps Set BONDINGROLE instead of REINVESTORROLE in setBonding function: Now: function setBondingaddress bonding publi...

7AI score
SaveExploits0
Code423n4
Code423n4
added 2021/12/01 12:00 a.m.17 views

arbitraryCall() can get blocked by an attacker

Handle GiveMeTestEther Vulnerability details Impact "arbitraryCall"'s L733 use case is to claim airdrops by "gov". If the address "who" is a token that could be send as an incentive by an attacker via "createIncentive" then such claim can be made unusable, because on L735 there is a...

6.8AI score
SaveExploits0
Code423n4
Code423n4
added 2021/11/30 12:00 a.m.17 views

RewardReinvestor Is Vulnerable To Sandwich Attacks

Handle leastwood Vulnerability details Impact The splitReinvest function in RewardReinvestor is called upon by bonded users. An attacker can monitor the blockchain for calls to this function and launch a sandwich attack in combination with a flash loan to steal funds. A malicious user is...

6.9AI score
SaveExploits0
Code423n4
Code423n4
added 2021/11/24 12:00 a.m.17 views

Missing scaling factor in recordKeyPurchase?

Handle cmichel Vulnerability details The Unlock.recordKeyPurchase function computes the maxTokens as: maxTokens = IMintableERC20udt.balanceOfaddressthis valueInETH / 2 + 2 valueInETH / grossNetworkProduct / grossNetworkProduct; Note that grossNetworkProduct was already increased by valueInETH in...

7AI score
SaveExploits0
Code423n4
Code423n4
added 2021/11/24 12:00 a.m.17 views

Frontrunning PublicLock.initialize() can prevent upgrades due to insufficient access control

Handle elprofesor Vulnerability details Impact The unlock protocols base contract Unlock.sol uses setLocktemplate to initialize the implementation contract for the PublicLock proxy. This function will initialize the relevant PublicLock contract which has been deployed separately...

6.9AI score
SaveExploits0
Code423n4
Code423n4
added 2021/11/24 12:00 a.m.17 views

Key self transfers lead to expiry

Handle cmichel Vulnerability details The MixinTransfer.shareKey function does not disallow transfering the key to oneself, i.e. from == recipient. When doing a self-transfer, the remaining time for oneself should be reduced by the fees, but the keys immediately expire due to explicitly setting th...

6.9AI score
SaveExploits0
Code423n4
Code423n4
added 2021/11/22 12:00 a.m.17 views

User can refund the received airdropped (free) "key"

Handle GiveMeTestEther Vulnerability details Impact User can refund the received airdropped free "key". If a lot of users received a airdropped "key" they can drain the funds of the lock. e.g. key owner cannot withdraw anything, user that purchased a key can't cancel and refund. Proof of Concept ...

6.8AI score
SaveExploits0
Code423n4
Code423n4
added 2021/11/18 12:00 a.m.17 views

_transferBurn does not actually burn tokens (decrease supply)

Handle harleythedog Vulnerability details Impact The implementation of transferBurn in ovl/OverlayToken.sol does not actually burn any tokens since totalSupply is not decreased see the implementation for burn for reference of what should be done. The transferBurn function is a helper function tha...

7.1AI score
SaveExploits0
Code423n4
Code423n4
added 2021/11/17 12:00 a.m.17 views

ERC1155Supply vulnerability in OpenZeppelin Contracts

Handle defsec Vulnerability details Impact When ERC1155 tokens are minted, a callback is invoked on the receiver of those tokens, as required by the spec. When including the ERC1155Supply extension, total supply is not updated until after the callback, thus during the callback the reported total...

6.8AI score
SaveExploits0
Code423n4
Code423n4
added 2021/11/15 12:00 a.m.17 views

Newly Registered Assets Skew Consultation Results

Handle leastwood Vulnerability details Impact The TwapOracle.consult function iterates over all token pairs which belong to either VADER or USDV and then calculates the price of the respective asset by using both UniswapV2 and Chainlink price data. This helps to further protect against price...

7AI score
SaveExploits0
Code423n4
Code423n4
added 2021/11/15 12:00 a.m.17 views

Wrong design/implementation of addLiquidity() allows attacker to steal funds from the liquidity pool

Handle WatchPug Vulnerability details The current design/implementation of Vader pool allows users to addLiquidity using arbitrary amounts instead of a fixed ratio of amounts in comparison to Uni v2. We believe this design is flawed and it essentially allows anyone to manipulate the price of the...

6.8AI score
SaveExploits0
Code423n4
Code423n4
added 2021/11/15 12:00 a.m.17 views

IbbtcVaultZap.sol#setGuardian doesn't set the guardian, but governance

Handle 0x0x0x Vulnerability details Proof of Concept This function is intended to change the guardian, but the code changes the governance address as seen in the code: function setGuardianaddress guardian external onlyGovernance; governance = guardian; It should be replaced with the following cod...

7.1AI score
SaveExploits0
Code423n4
Code423n4
added 2021/11/15 12:00 a.m.17 views

Unused slippage params

Handle pauliax Vulnerability details Impact Unused slippage params. function addLiquidity in VaderRouter both V1 and V2 do not use slippage parameters: uint256, // amountAMin = unused uint256, // amountBMin = unused making it susceptible to sandwich attacks / MEV. For a more detailed explanation,...

6.9AI score
SaveExploits0
Code423n4
Code423n4
added 2021/11/15 12:00 a.m.17 views

Synth tokens can get over-minted

Handle WatchPug Vulnerability details Per the document: It also is capable of using liquidity units as collateral for synthetic assets, of which it will always have guaranteed redemption liquidity for. However, in the current implementation, Synth tokens are minted based on the calculation result...

6.7AI score
SaveExploits0
Code423n4
Code423n4
added 2021/11/15 12:00 a.m.17 views

Attacker can claim more IL by manipulating pool price then removeLiquidity

Handle gzeon Vulnerability details Impact Vader reimburse user IL immediately when user withdraw from the pool VaderRouterV2.sol:L227, an attacker can therefore manipulate the pool balance causing a high IL, remove liquidity and restore the pool balance such that he will receive a larger IL...

6.9AI score
SaveExploits0
Code423n4
Code423n4
added 2021/11/15 12:00 a.m.17 views

VaderRouter.calculateOutGivenIn calculates wrong swap

Handle cmichel Vulnerability details The 3-path hop in VaderRouter.calculateOutGivenIn is supposed to first swap foreign assets to native assets in pool0, and then the received native assets to different foreign assets again in pool1. The first argument of VaderMath.calculateSwapamountIn,...

7AI score
SaveExploits0
Code423n4
Code423n4
added 2021/11/15 12:00 a.m.17 views

TWAPOracle.getRate does not scale the ratio

Handle cmichel Vulnerability details The TWAPOracle.getRate function simply performs an integer division to compute the rate. function getRate public view returns uint256 result uint256 tUSDInUSDV = consultUSDV; uint256 tUSDInVader = consultVADER; // @audit shouldn't this scale by 1e18 first?...

6.9AI score
SaveExploits0
Code423n4
Code423n4
added 2021/11/15 12:00 a.m.17 views

mintSynth() and burnSynth() can be front run

Handle WatchPug Vulnerability details Given that mintSynth and burnSynth will issue and redeem assets based on the price of the pool reserves, and they will create price impact based on the volume being minted and burnt. However, the current implementation provides no parameter for slippage...

7AI score
SaveExploits0
Code423n4
Code423n4
added 2021/11/14 12:00 a.m.17 views

The first lp provider can destroy the pool

Handle jonah1005 Vulnerability details Impact First lp provider received liquidity amount same as the nativeDeposit amount and decides the rate. If the first lp sets the pool's rate to an extreme value no one can deposit to the pool afterward. please refer to the proof of concept section A...

6.8AI score
SaveExploits0
Code423n4
Code423n4
added 2021/11/14 12:00 a.m.17 views

Zap contract's redeem() function doesn't check which token the user wants to receive

Handle Ruhum Vulnerability details Impact In the redeem function, the user can pass a token address. That's the token they receive in return for the ibbtc they give back. Because of missing address checks the user can provide any possible ERC20 token here without the function reverting. Although...

7AI score
SaveExploits0
Code423n4
Code423n4
added 2021/11/12 12:00 a.m.17 views

Anyone Can Arbitrarily Call FSDVesting.updateVestedTokens()

Handle leastwood Vulnerability details Impact The updateVestedTokens function is intended to be called by the FSD.sol contract when updating a user's vested token amount. A check is performed to ensure that user == beneficiary, however, as user is a user controlled argument, it is possible to spo...

6.9AI score
SaveExploits0
Code423n4
Code423n4
added 2021/11/08 12:00 a.m.17 views

Contract BasicSale is missing an approve(address(vestLock), 2**256-1) call

Handle Reigada Vulnerability details Impact As we can see in the contracts AirdropDistribution and InvestorDistribution, they both have the following approve call: mainToken.approveaddressvestLock, 2256-1; This is necessary because both contracts transfer tokens to the vesting contract by calling...

7AI score
SaveExploits0
Code423n4
Code423n4
added 2021/10/30 12:00 a.m.17 views

WrappedIbbtc and WrappedIbbtcEth contracts do not filter out price feed outliers

Handle hyh Vulnerability details Impact If price feed is manipulated in any way or there is any malfunction based volatility on the market, both contracts will pass it on a user. In the same time it's possible to construct mitigation mechanics for such cases, so user economics be affected by...

7AI score
SaveExploits0
Code423n4
Code423n4
added 2021/10/28 12:00 a.m.17 views

MochiTreasuryV0.sol Is Unusable In Its Current State

Handle leastwood Vulnerability details Impact MochiTreasuryV0.sol interacts with Curve's voting escrow contract to lock tokens for 90 days, where it can be later withdrawn by the governance role. However, VotingEscrow.vy does not allow contracts to call the following functions; createlock,...

7AI score
SaveExploits0
Code423n4
Code423n4
added 2021/10/26 12:00 a.m.17 views

Unchecked ERC20 transfer calls

Handle loop Vulnerability details ERC20 transfer and transferFrom calls normally return true on a succesful transfer. In DutchAuctionLiquidator the call asset.transfermsg.sender, collateral; is made. asset refers to whichever ERC20 asset is used for the vault of that auction. If asset is an ERC20...

6.8AI score
SaveExploits0
Code423n4
Code423n4
added 2021/10/21 12:00 a.m.17 views

Validator can fail to receive commission reward in redeemAllRewards

Handle jonah1005 Vulnerability details Impact Validator can fail to receive commission reward by calling redeemAllRewards. There's a check in redeemAllRewards uint128 rewards = sharesToTokenss.shares, v.exchangeRate - s.staked; requirerewards 0, "Nothing to redeem"; The validator's tx might be...

6.8AI score
SaveExploits0
Code423n4
Code423n4
added 2021/10/20 12:00 a.m.17 views

Wrong implementation of CreditLimitByMedian.sol#getLockedAmount() makes it unable to unlock lockedAmount in CreditLimitByMedian model

Handle WatchPug Vulnerability details function getLockedAmount LockedInfo memory array, address account, uint256 amount, bool isIncrease public pure override returns uint256 if array.length == 0 return 0; uint256 newLockedAmount; if isIncrease ... else for uint256 i = 0; i amount newLockedAmount ...

6.9AI score
SaveExploits0
Code423n4
Code423n4
added 2021/10/19 12:00 a.m.17 views

disableValidator() can distort totalGlobalShares (edge case)

Handle gpersoon Vulnerability details Impact Assume a validator has been added Assume this validator calls disableValidator maybe by accident or it recognizes a mistake Assume stake hasn't been called yet and endEpoch is still 0 The function disableValidator will execute and set v.disabledEpoch t...

7.3AI score
SaveExploits0
Code423n4
Code423n4
added 2021/10/18 12:00 a.m.17 views

Signature replay attacks for different identities (nonce on wrong party)

Handle cmichel Vulnerability details A single QuickAccount can serve as the "privilege" for multiple identities, see the comment in QuickAccManager.sol: NOTE: a single accHash can control multiple identities, as long as those identities set it's hash in privilegesaddressthis. this is by design If...

7.1AI score
SaveExploits0
Code423n4
Code423n4
added 2021/10/16 12:00 a.m.17 views

cancel() calculates hashTx in the wrong way

Handle gpersoon Vulnerability details Impact The function cancel of contract QuickAccManager uses the wrong way to calculate the hash that has to be cancelled. It uses: "bytes32 hashTx = keccak256abi.encodeaddressthis, block.chainid, accHash, nonce, txns;" Where it should use "bytes32 hash =...

6.9AI score
SaveExploits0
Code423n4
Code423n4
added 2021/10/15 12:00 a.m.17 views

MAX_TRUST_LIMIT might be too high

Handle gpersoon Vulnerability details Impact Both SumOfTrust.sol and CreditLimitByMedian.sol contain an expensive sort function. This is used by UserManager.sol via the functions getLockedAmount and getCreditLimit. If the list of stakers would be very long then the sort would take up all the gas...

7AI score
SaveExploits0
Code423n4
Code423n4
added 2021/10/09 12:00 a.m.17 views

Denial of Service in Basket.mint()

Handle pants Vulnerability details The function Basket.mint calls Basket.mintTo, but both Basket.mint and Basket.mintTo use the nonReentrant modifier. Impact The function Basket.mint will always revert when it calls Basket.mintTo, due to reentrancy. Tool Used Manual code review. Recommended...

7.1AI score
SaveExploits0
Code423n4
Code423n4
added 2021/10/05 12:00 a.m.17 views

Erc20.transferFrom() doesn't work on non-standard compliant tokens like USDT

Handle pants Vulnerability details Non-standard compliant tokens like USDT don't return a return value on transferFrom. The function Erc20.transferFrom reverts if the token doesn't return a return value, as it is defined to always return a boolean. Impact When using any non-standard compliant tok...

7.1AI score
SaveExploits0
Code423n4
Code423n4
added 2021/09/29 12:00 a.m.17 views

HybridPool's reserve is converted to "amount" twice

Handle cmichel Vulnerability details The HybridPool's reserves are stored as Bento "amounts" not Bento shares in updateReserves because balance converts the current share balance to amount balances. However, when retrieving the reserve0/1 storage fields in getReserves, they are converted to amoun...

6.7AI score
SaveExploits0
Code423n4
Code423n4
added 2021/09/22 12:00 a.m.17 views

approveUnderlying isn't safe

Handle 0xsanson Vulnerability details Impact In Basket.sol, approveUnderlying is used to approve tokens to be spent by the Auction. The current implementation uses a simple approve function, instead of the safer safeApprove. Also it's recommended to have an approve to zero first, since the...

6.8AI score
SaveExploits0
Code423n4
Code423n4
added 2021/09/16 12:00 a.m.17 views

missing access control in basket.sol

Handle jah Vulnerability details Impact function mint and function minTo are not protected so anyone can mint Proof of Concept Tools Used manual analysis Recommended Mitigation Steps use modifier to check who can call the function --- The text was updated successfully, but these errors were...

7AI score
SaveExploits0
Code423n4
Code423n4
added 2021/09/15 12:00 a.m.17 views

convert fails for fee-on-transfer tokens

Handle 0xsanson Vulnerability details Impact The Controller contract can call converter.convert inside earn and withdraw functions, after transferring amount of tokens to the Converter contract. This contract assumes that it has received exactly amount tokens, however this isn't true for...

7AI score
SaveExploits0
Code423n4
Code423n4
added 2021/09/15 12:00 a.m.17 views

An attacker can steal funds from multi-token vaults

Handle WatchPug Vulnerability details The total balance should NOT be simply added from different tokens' tokenAmounts, considering that the price of tokens may not be the same. function balanceOfThis public view returns uint256 balance address memory tokens = manager.getTokensaddressthis; for...

6.7AI score
SaveExploits0
Code423n4
Code423n4
added 2021/09/15 12:00 a.m.17 views

Controller.withdraw(...) User may lose funds when withdraw wantToken from the underlying contract

Handle WatchPug Vulnerability details The wantToken of the strategy may be different from the token argument of Controller.withdrawaddress token, uint256 amount according to code at line 469-474 of Controller.sol. if want != token address converter = vaultDetailsmsg.sender.converter;...

6.8AI score
SaveExploits0
Code423n4
Code423n4
added 2021/09/15 12:00 a.m.17 views

Vault may not have enough tokens for withdraw

Handle 0xRajeev Vulnerability details Impact There is an assumption in LegacyController.vault that the vault will have enough tokens0 to cover the balance difference. If not, the user may receive less than amount requested and balance funds get lost/locked unless the vault withdraws from the...

6.9AI score
SaveExploits0
Code423n4
Code423n4
added 2021/09/15 12:00 a.m.17 views

wrong YAXIS estimates

Handle cmichel Vulnerability details The Harvester.getEstimates contract tries to estimate a YAXIS amount but uses the wrong path and/or amount. It currently uses a WETH input amount to compute a YAXIS - WETH trade. address memory path; path0 = IStrategystrategy.want; path1 =...

6.9AI score
SaveExploits0
Code423n4
Code423n4
added 2021/09/13 12:00 a.m.17 views

harvestNextStrategy never executes because lastCalled is 0 and stays 0

Handle gpersoon Vulnerability details Impact The function harvestNextStrategy of Harvester.sol checks canHarvest to make sure it can harvest. Initially strategy.lastCalled will be 0 so canHarvest will return false. Thus the require in harvestNextStrategy fails And it never reaches the point where...

6.9AI score
SaveExploits0
Code423n4
Code423n4
added 2021/09/12 12:00 a.m.17 views

Controller transfer extra token on withdrawing tokens

Handle jonah1005 Vulnerability details Impact The Controlle�r's function withdrawaddress token, uint256 amount should return whatever amount of the token user/vault asks. However, it tries to withdraw strategy.want token and convert it. Take for example, when a user/vault calls withdrawdai, 100,...

6.8AI score
SaveExploits0
Code423n4
Code423n4
added 2021/09/08 12:00 a.m.17 views

Liquidity token value can be manipulated

Handle cmichel Vulnerability details Vulnerability Details The liquidity token value AssetHandler.getLiquidityTokenValue is the sum of the value of the individual claims on cash underlying or rather cTokens and fCash. The amount to redeem on each of these is computed as the LP token to redeem...

6.7AI score
SaveExploits0
Code423n4
Code423n4
added 2021/09/08 12:00 a.m.17 views

Allowance checks not correctly implemented

Handle cmichel Vulnerability details Vulnerability Details The nTokenAction implements two token approvals, the nTokenWhitelist which is always used first, and the nTokenAllowance which is checked second. If the nTokenWhitelist does not have enough allowance for the transfer, the transaction fail...

6.9AI score
SaveExploits0
Code423n4
Code423n4
added 2021/08/25 12:00 a.m.17 views

Market whitelist does not work

Handle cmichel Vulnerability details The RCTreasury.marketWhitelistCheck function gets the marketWhitelistmsgSender variable and performs a special check if it's non-zero. However, there's no way to set the whitelist in the first place making this function unnecessary. Impact The market whitelist...

6.9AI score
SaveExploits0
Code423n4
Code423n4
added 2021/08/14 12:00 a.m.17 views

Rewards squatting - setting rewards in different ERC20 tokens opens various economic attacks.

Handle moose-code Vulnerability details Impact Users have essentially have an option to either claim currently earned reward amounts on future rewards tokens, or the current rewards token. Although stated on line 84, it does not take into account the implications and lock in this contract will ha...

6.7AI score
SaveExploits0
Code423n4
Code423n4
added 2021/08/13 12:00 a.m.17 views

TimeLock cannot schedule the same calls multiple times

Handle cmichel Vulnerability details The TimeLock.schedule function reverts if the same targets and data fields are used as the txHash will be the same. This means one cannot schedule the same transactions multiple times. Impact Imagine the delay is set to 30 days, but a contractor needs to be pa...

6.9AI score
SaveExploits0
Code423n4
Code423n4
added 2021/08/10 12:00 a.m.17 views

initializeMarket always initialize the latest market

Handle jonah1005 Vulnerability details Impact In longshore contract's initializeMarket, while it should initialize according to the parameter marketIndex, it initialize latestMarket. This would break two market, the market of marketIndex' and market of latestMarket. User's fund would get stuck at...

6.9AI score
SaveExploits0
Total number of security vulnerabilities5000