Lucene search
+L
Code423n4Recent

10190 matches found

Code423n4
Code423n4
•added 2021/12/19 12:0 a.m.•11 views

Improper design/implementation of SingleTokenJoinV2#joinTokenSingle() make it prone to fail

Handle WatchPug Vulnerability details for uint256 i; i bs.tokens.length; i++ IERC20 token = bs.tokensi; uint256 tokenAmount = balanceaddresstoken.mulamount.addfeeAmount.div totalSupply ; requiretokenAmount != 0, "AMOUNTTOOSMALL"; token.safeTransferFrommsg.sender, addressthis, tokenAmount; // If...

6.7AI score
SaveExploits0
Code423n4
Code423n4
•added 2021/12/19 12:0 a.m.•13 views

xToken Approvals Allow Spenders To Spend More Tokens

Handle leastwood Vulnerability details Impact The approve function has not been overridden and therefore uses xToken shares instead of the equivalent rebalanced amount, i.e. the underlying vault token amount. Proof of Concept The approved spender may spend more tokens than desired. In fact, the...

7AI score
SaveExploits0
Code423n4
Code423n4
•added 2021/12/19 12:0 a.m.•8 views

Lacking slippage protection in RebalanceManagerV3

Handle p4st13r4 Vulnerability details Impact In RebalanceManagerV3 calls to UniswapV2-like router is lacking slippage protection exposing the rebalance process to front-running attacks. Proof of Concept Tools Used Editor Recommended Mitigation Steps Consider adding a minOutput to...

6.9AI score
SaveExploits0
Code423n4
Code423n4
•added 2021/12/19 12:0 a.m.•9 views

BasketFacet.sol#joinPool() feeAmount should be considered when checking MAX_POOL_CAP_REACHED

Handle WatchPug Vulnerability details require totalSupply.addamount = this.getCap, "MAXPOOLCAPREACHED" ; uint256 feeAmount = amount.mulbs.entryFee.div1018; feeAmount should be considered. Otherwise, the new totalSupply may surpass pool cap. --- The text was updated successfully, but these errors...

7AI score
SaveExploits0
Code423n4
Code423n4
•added 2021/12/19 12:0 a.m.•9 views

Owner can lock any of basket tokens

Handle Czar102 Vulnerability details Impact Owner can remove any tokens, and since lock all funds that the contract has in a specific token. The owner may engineer the deletion in such way that afraid people will fear next locks and quit the basket, then the owner may add the token back, gaining...

6.8AI score
SaveExploits0
Code423n4
Code423n4
•added 2021/12/19 12:0 a.m.•7 views

totalSupply may exceed LibBasketStorage.basketStorage().maxCap

Handle Czar102 Vulnerability details Impact Total supply of the token may exceed the maxCap introduced. This can happen when a user wants to join the pool. The check in BasketFacet::joinPool... includes only the base amount, without fee. Thus, if fee is on and someone will want to create as many...

6.9AI score
SaveExploits0
Code423n4
Code423n4
•added 2021/12/19 12:0 a.m.•9 views

Unused ERC20 tokens are not refunded, and can be stolen by attacker

Handle WatchPug Vulnerability details Under certain circumstances, e.g. annualizedFee being minted to feeBeneficiary between the time user sent the transaction and the transaction being packed into the block and causing amounts of underlying tokens for each basketToken to decrease. It's possible ...

6.7AI score
SaveExploits0
Code423n4
Code423n4
•added 2021/12/19 12:0 a.m.•12 views

Owner of the BasketFacet can cause DoS for exitPool(...) function

Handle Czar102 Vulnerability details Impact Provided an owner can add any tokens to the basket, it may add a token, for which the owner can burn tokens from any account. Then, after adding the token to the basket, the owner may burn tokens so that token.balanceofBasketFacet will be below MINAMOUN...

6.8AI score
SaveExploits0
Code423n4
Code423n4
•added 2021/12/19 12:0 a.m.•10 views

unchecked return value from transfer()

Handle JMukesh Vulnerability details Impact transfer does not check the return , due which transfer may get failed without reverting . some tokens does not revert on failure , they just return false Proof of Concept Tools Used manual review Recommended Mitigation Steps use safetransferFrom from o...

7AI score
SaveExploits0
Code423n4
Code423n4
•added 2021/12/19 12:0 a.m.•12 views

Unchecked ERC20 transfer call

Handle p4st13r4 Vulnerability details Impact Standard ERC20 tokens return a boolean when transfer method is called. A check should be done to account for ERC20 tokens that are not compliant to the standard. Proof of Concept Relevant lines: 3 Tools Used Editor Recommended Mitigation Steps Check...

6.9AI score
SaveExploits0
Code423n4
Code423n4
•added 2021/12/19 12:0 a.m.•24 views

Frontrunning attack via swap token functionality

Handle thankyou Vulnerability details Impact Amun utilizes both Pangolin and Uniswap's Routers to swap tokens within a given pair. One of the router functions used by Amun is swapExactTokensForTokens. Amun provides this function several arguments that the Router contract then utilizes to commence...

7.4AI score
SaveExploits0
Code423n4
Code423n4
•added 2021/12/19 12:0 a.m.•12 views

SingleNativeTokenExitV2 assumes first exchange holds the outputToken

Handle kenzo Vulnerability details SingleNativeTokenExitV2 allows the user to exit and execute trades via multiple exchanges. When finishing the trades and sending a single output token back to the user, the contract takes that token from the last swap in the first exchange's trades. There is...

7AI score
SaveExploits0
Code423n4
Code423n4
•added 2021/12/19 12:0 a.m.•14 views

Basket's max cap can be surpassed due to beneficiary entry fee

Handle kenzo Vulnerability details When joining a basket, the function verifies that the total supply + tokens the user asks to mint is smaller than the basket's max supply. However, this doesn't take into account the fact that additional tokens will be minted if there's an entry fee beneficiary...

6.9AI score
SaveExploits0
Code423n4
Code423n4
•added 2021/12/19 12:0 a.m.•9 views

Unchecked return value from low-level call()

Handle JMukesh Vulnerability details Impact The return value of the low-level call is not checked, so if the call fails, the Ether will be locked in the contract. If the low level is used to prevent blocking operations, consider logging failed calls. Proof of Concept Tools Used manual review...

6.9AI score
SaveExploits0
Code423n4
Code423n4
•added 2021/12/19 12:0 a.m.•7 views

Creator of pie can mint any amount of _initialSupply, and drain underlying tokens via exitPool

Handle hubble Vulnerability details Impact The Creator of pie or msg.sender of bakePie in PieFactoryContract, can set any high value of initialSupply and get the ERC20 tokens minted. There is no relation to the intialSupply and the amount of underlying Tokens added to the Pie during the bakePie...

6.8AI score
SaveExploits0
Code423n4
Code423n4
•added 2021/12/19 12:0 a.m.•11 views

SingleNativeTokenExitV2 only returns single output token

Handle cmichel Vulnerability details The SingleNativeTokenExitV2.exit function performs a list of arbitrary user-defined swaps on the exited token basket. These could result in many different final "output" tokens ending up in the contract after the swaps. However, the contract assumes that there...

6.9AI score
SaveExploits0
Code423n4
Code423n4
•added 2021/12/19 12:0 a.m.•5 views

totalSupply may go above this.getCap()

Handle gzeon Vulnerability details Impact Pool cap is checked in L154 require totalSupply.addamount = this.getCap, "MAXPOOLCAPREACHED" ; but since we mint amount to the user and some % of feeAmount to Beneficiary, totalSupply can actually go above the defined cap. Recommended Mitigation Steps...

6.9AI score
SaveExploits0
Code423n4
Code423n4
•added 2021/12/19 12:0 a.m.•16 views

denial of service

Handle certora Vulnerability details the balance of outputToken is checked to be exactly joinTokenStruct.outputAmount. It is not recommeded and it's better to use = Impact The worst scenario is a denial of service in case there is already an amount of the output token in the contract. It is easil...

6.5AI score
SaveExploits0
Code423n4
Code423n4
•added 2021/12/19 12:0 a.m.•10 views

Attacker can break joinTokenSingle() by transferring basketToken to the contract

Handle WatchPug Vulnerability details uint256 outputAmount = outputToken.balanceOfaddressthis; require outputAmount == joinTokenStruct.outputAmount, "FAILEDOUTPUTAMOUNT" ; In the current implementation, joinTokenSingle requires balanceOf outputToken strictly equal to outputAmount in calldata...

6.8AI score
SaveExploits0
Code423n4
Code423n4
•added 2021/12/19 12:0 a.m.•10 views

User created baskets are owned by defaultController

Handle 0x0x0x Vulnerability details User created baskets are owned by defaultController and help from the defaultController is needed to use any functionality or setup the basket. In test simply one account is used, but when a user wants to create a basket, they can’t control it properly...

6.9AI score
SaveExploits0
Code423n4
Code423n4
•added 2021/12/19 12:0 a.m.•16 views

It might not be possible to withdraw tokens from the basket

Handle Czar102 Vulnerability details Impact When enough basket token owners exit, it will be impossible to exit pool with the last MINAMOUNT tokens because of this check. This will result in locking some tokens forever. Recommended Mitigation Steps Consider resigning from this check or performing...

6.9AI score
SaveExploits0
Code423n4
Code423n4
•added 2021/12/18 12:0 a.m.•11 views

No access control on assignFees() function in NFTXVaultFactoryUpgradeable contract

Handle ych18 Vulnerability details In If the Vault owner decides to set factoryMintFee and factoryRandomRedeemFee to zero, any user could call the function NFTXVaultFactoryUpgradeable.assignFees and hence all the fees are updated. --- The text was updated successfully, but these errors were...

6.9AI score
SaveExploits0
Code423n4
Code423n4
•added 2021/12/18 12:0 a.m.•6 views

SHOULD CHECK RETURN DATA FROM CHAINLINK AGGREGATORS

Handle defsec Vulnerability details Impact The latestRoundData function in the contract PriceFeed.sol fetches the asset price from a Chainlink aggregator using the latestRoundData function. However, there are no checks on roundID. Stale prices could put funds at risk. According to Chainlink's...

6.6AI score
SaveExploits0
Code423n4
Code423n4
•added 2021/12/18 12:0 a.m.•12 views

NFTXStakingZap Performs A Dangerous Equality Check Which Can Brick Contract

Handle leastwood Vulnerability details Impact NFTXStakingZap provides an interface for users to interact with NFTX vaults by adding ERC1155/ERC721 tokens as liquidity. The addLiquidity721WETH and addLiquidity1155WETH functions perform strict equality checks on the vaults balance for the...

7AI score
SaveExploits0
Code423n4
Code423n4
•added 2021/12/18 12:0 a.m.•10 views

_mint721() function can be broken because of strict equality check on token balance

Handle jayjonah8 Vulnerability details Impact In NFTXMarketplaceZap.sol the mint721 function has a require check that the balance must be equal to the amount of vault tokens in the contract. uint256 balance = count BASE - count INFTXVaultvault.mintFee; requirebalance ==...

6.9AI score
SaveExploits0
Code423n4
Code423n4
•added 2021/12/18 12:0 a.m.•11 views

NFTXMarketplaceZap Performs A Dangerous Equality Check Which Can Brick Contract

Handle leastwood Vulnerability details Impact NFTXMarketplaceZap provides an interface for users to interact with NFTX vaults by buying, selling and swapping ERC1155/ERC721 tokens. The mint721 and mint1155 functions perform strict equality checks on the vaults token balance for the...

7AI score
SaveExploits0
Code423n4
Code423n4
•added 2021/12/17 12:0 a.m.•8 views

sendAllocatedYETI() can be called by anyone

Handle jayjonah8 Vulnerability details Impact In TeamAllocation.sol, the sendAllocatedYETI function simply distributes YETI to the team. This is a transfer of value and it currently can be called by anyone as the onlyTeam modifier is not used here. Proof of Concept Tools Used Manual code review...

7.1AI score
SaveExploits0
Code423n4
Code423n4
•added 2021/12/17 12:0 a.m.•5 views

receiveCollateral() can be called by anyone

Handle jayjonah8 Vulnerability details Impact In StabilityPool.sol, the receiveCollateral function should be called by ActivePool per comments, but anyone can call it passing in tokens and amounts args to update stability pool balances. Proof of Concept Tools Used Manual code review Recommended...

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

Contract can lose funds

Handle csanuragjain Vulnerability details Impact Fund loss Proof of Concept 1. Navigate to contract at 2. Assume owner created a Basket with 1 token A which is 0.1 USD 3. User joins the pool using joinPool function 4. Owner removes the token so that basket becomes empty and adds another token B...

6.8AI score
SaveExploits0
Code423n4
Code423n4
•added 2021/12/17 12:0 a.m.•12 views

Token mint without transfer

Handle csanuragjain Vulnerability details Impact User will be minted token without transferring any amount Proof of Concept 1. Owner has removed all tokens from the basket using removeToken function. So bs.tokens.length=0 2. User joins the pool using joinPool function. Now below happens: a. Since...

6.9AI score
SaveExploits0
Code423n4
Code423n4
•added 2021/12/17 12:0 a.m.•9 views

User can lose Funds

Handle csanuragjain Vulnerability details Impact User funds lost Proof of Concept 1. Navigate to contract at 2. User joins a pool having 5 tokens in the basket by using joinPool function 3. Owner decides to remove 1 of the token from the basket 4. User exits the pool by calling exitPool function...

6.7AI score
SaveExploits0
Code423n4
Code423n4
•added 2021/12/17 12:0 a.m.•10 views

User funds could be stuck

Handle csanuragjain Vulnerability details Impact Although chances are rare but user can be denied to exit pool Proof of Concept 1. If user decides to exit pool and any one token has MINAMOUNT then transaction will revert and user wont be able exit until that token has sufficient balance. This mea...

6.9AI score
SaveExploits0
Code423n4
Code423n4
•added 2021/12/16 12:0 a.m.•16 views

buyAndSwap1155WETH() function may cause loss of user assets

Handle cccz Vulnerability details Impact In the NFTXMarketplaceZap.sol contract, the buyAndSwap1155WETH function uses the WETH provided by the user to exchange VaultToken, but when executing the buyVaultToken method, msg.value is used instead of maxWethIn. Since msg.value is 0, the call will fail...

7.2AI score
SaveExploits0
Code423n4
Code423n4
•added 2021/12/16 12:0 a.m.•6 views

No use of reentrency guards

Handle jayjonah8 Vulnerability details Impact The README.md makes the point that reentrancy attacks are a cause for concern, but the protocol makes no use of reentrancy guards in any file or in the functions users interact with. Proof of Concept The are no Reentrancy guards in the entire code bas...

7AI score
SaveExploits0
Code423n4
Code423n4
•added 2021/12/16 12:0 a.m.•10 views

Users Can Siphon AaveYield Rewards By Depositing And Withdrawing Collateral

Handle leastwood Vulnerability details Impact The AaveYield contract provides users with the option to choose Aave as their strategy of choice to generate yield. Users will make deposits to this strategy via the SavingsAccount contract. Upon deposit, shares are minted at a 1:1 exchange rate and t...

6.9AI score
SaveExploits0
Code423n4
Code423n4
•added 2021/12/16 12:0 a.m.•10 views

Constructor does not ensure that addresses are not the same

Handle jayjonah8 Vulnerability details Impact In WJLP.sol, 3 addresses are passed in setting the MasterChefJoe, JLP, and JOE addresses in storage. There are no checks ensuring that these addresses are different from one another. This means that during deployment, a mistake can easily be made of...

7AI score
SaveExploits0
Code423n4
Code423n4
•added 2021/12/16 12:0 a.m.•11 views

No checks in setAddresses() functions

Handle jayjonah8 Vulnerability details Impact Since the setAddresses functions can only be called once during deployment and passes in many addresses which are set in storage, its important to have safety checks ensuring that there are no duplicate addresses which can easily happen while passing...

7.2AI score
SaveExploits0
Code423n4
Code423n4
•added 2021/12/16 12:0 a.m.•8 views

_from and _to can be the same address on wrap() function

Handle jayjonah8 Vulnerability details Impact In WJLP.sol, the wrap function pulls in amount base tokens from from, then stakes them to mint WAssets which it sends to to. It then updates rewardOwner's reward tracking such that it now has the right to future yields from the newly minted WAssets. B...

7.1AI score
SaveExploits0
Code423n4
Code423n4
•added 2021/12/16 12:0 a.m.•9 views

buyAndSwap1155WETH() function does not work

Handle cccz Vulnerability details Impact The buyAndSwap1155WETH function uses the WETH provided by the user to exchange VaultToken, but when executing the buyVaultToken method, msg.value is used instead of maxWethIn. Since msg.value is 0, the call will fail. function buyAndSwap1155WETH uint256...

7AI score
SaveExploits0
Code423n4
Code423n4
•added 2021/12/16 12:0 a.m.•7 views

_safeJoeTransfer doesn't refund users JOE incase of rounding error

Handle jayjonah8 Vulnerability details Impact In WJLP.sol a user can call the claimReward function to claim the JOE rewards they are owed. This eventually calls the safeJoeTransfer function which will check if the amount to send is greater than the joeBal of the contract. If the amount is greater...

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

Missing approve(0)

Handle sirhashalot Vulnerability details Impact There are 3 instances where the IERC20.approve function is called only once without setting the allowance to zero. Some tokens, like USDT, require first reducing the address' allowance to zero by calling approvespender, 0. Transactions will revert...

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

Missing payable

Handle robee Vulnerability details The following functions are not payable but uses msg.value - therefore the function must be payable. This can lead to undesired behavior. CreditLine.sol, depositCollateral is payable but doesn't use msg.value CreditLine.sol, repay is payable but doesn't use...

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

denial of service

Handle certora Vulnerability details if the borrow token is address0 ether, and someone calls withdrawLiquidity, it calls SavingsAccountUtil.transferTokens which will transfer to msg.sender, msg.value of withdrawLiquidity, because it's an internal function. In other words, the liquidity provided...

6.9AI score
SaveExploits0
Code423n4
Code423n4
•added 2021/12/15 12:0 a.m.•18 views

Aave's share tokens are rebasing breaking current strategy code

Handle cmichel Vulnerability details When depositing into Aave through the AaveYield.lockTokens contract strategy, one receives the sharesReceived amount corresponding to the diff of aToken balance, which is just always the deposited amount as aave is a rebasing token and 1.0 aToken = 1.0...

6.8AI score
SaveExploits0
Code423n4
Code423n4
•added 2021/12/15 12:0 a.m.•15 views

Anyone can liquidate credit line when autoLiquidation is false without supplying borrow tokens

Handle harleythedog Vulnerability details Impact It is intended that if a credit line has autoLiquidation as false, then only the lender can be the liquidator see docs here: . However, this is not correctly implemented, and anyone can liquidate a position that has autoLiquidation set to false. Ev...

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

Borrow should increase principal by withdrawn amount

Handle cmichel Vulnerability details The CreditLine.borrow function increases the principal by the amount parameter, but the borrower only receives tokenDiffBalance. // @audit increases by amount instead of tokenDiffBalance creditLineVariablesid.principal =...

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

In CreditLine#_borrowTokensToLiquidate, oracle is used wrong way

Handle 0x0x0x Vulnerability details Current implementation to get the price is as follows: uint256 ratioOfPrices, uint256 decimals = IPriceOraclepriceOracle.getLatestPriceborrowAsset, collateralAsset; But it should not consult borrowToken / collateralToken, rather it should consult the inverse of...

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

Ether can be locked in the PoolFactory contract without a way to retrieve it

Handle broccolirob Vulnerability details If a borrower calls the createPool function with a non-zero value, but also includes an ERC20 token address for collateralToken, then the Ether value sent will be locked in the PoolFactory contract forever. createPool L260-317 In the createPool function, a...

6.9AI score
SaveExploits0
Code423n4
Code423n4
•added 2021/12/15 12:0 a.m.•7 views

Wrong returns of SavingsAccountUtil.depositFromSavingsAccount() can cause fund loss

Handle WatchPug Vulnerability details The function SavingsAccountUtil.depositFromSavingsAccount is expected to return the number of equivalent shares for given asset. / @notice internal function used to get amount of collateral deposited to the pool @param fromSavingsAccount if true, collateral i...

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

Incorrect safeApprove usage

Handle Jujic Vulnerability details Impact safeApprove won't work when current allowance 0, there may be cases when strategies will not use all allowance, so switch to new strategy will be blocked. Proof of Concept Tools Used Recommended Mitigation Steps I recommend approving to zero and then...

6.9AI score
SaveExploits0
Total number of security vulnerabilities10190