Lucene search
+L
Code423n4Recent

10190 matches found

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

Drain the award pool by feeding outrange epoch into function claimRewards

Handle 0xabc Vulnerability details Impact in function claimRewards, there is no checking on value in epochIds. Exploiter can claim more than the promotion award by calling the function with outrange epochs. Proof of Concept Consider a promotion with promitionid X and numberOfEpochs =Y. Exploiter...

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

Support of deflationary / rebasing tokens

Handle pauliax Vulnerability details Impact Deflationary fee on transfer / rebasing tokens are not supported. Because anyone can createPromotion with an arbitrary token, such tokens may be lost forever. Recommended Mitigation Steps Consider checking the actual amounts transferred balance...

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

Missing Validation Of createPromotion Parameters

Handle leastwood Vulnerability details Impact The createPromotion function is called by a creator account denoted as msg.sender to fund a promotion with tokens allocated on a per epoch basis across a set epochs. However, the function does not perform the necessary checks on function inputs to...

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

A malicious ticket can drain the tokens

Handle pauliax Vulnerability details Impact Anyone can createPromotion with any arbitrary ticket supposed it follows the proposed interface. Thus, it is possible to create a promotion with a malicious ticket that returns arbitrary values for getAverageBalanceBetween and...

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

Missing Check When Transferring Tokens Out For A Given Promotion

Handle leastwood Vulnerability details Impact The claimRewards function is called upon by ticket holders who parse a set of epochIds they wish to claim rewards on. An internal call is made to calculateRewardAmount to calculate the correct reward amount owed to the user. Subsequently, the...

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

cancelPromotion() Unable to cancel unstarted promotions

Handle WatchPug Vulnerability details For unstarted promotions, cancelPromotion will revert at block.timestamp - promotion.startTimestamp in getCurrentEpochId. Call stack: cancelPromotion - getRemainingRewards - getCurrentEpochId. function getRemainingRewardsPromotion memory promotion internal vi...

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

cancelPromotion will revert if the promotion is not started yet

Handle certora Vulnerability details cancelPromotion might fail unexpectedly. cancelPromotion calls getRemainingRewards which calls getCurrentEpochId: function getCurrentEpochIdPromotion memory promotion internal view returns uint256 // elapsedTimestamp / epochDurationTimestamp return...

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

Can claim epoch > 255 repeatedly due to bitshift truncation

Handle gzeon Vulnerability details Can claim epoch 255 repeatedly due to bitshift truncation Impact TwabRewards contract store user claimed reward in a claimedEpochs bitmap. function isClaimedEpochuint256 userClaimedEpochs, uint256 epochId internal pure returns bool return userClaimedEpochs epoch...

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

getRemainingRewards might fail unexpectedly

Handle certora Vulnerability details getRemainingRewards might fail unexpectedly. getRemainingRewards calls getRemainingRewards which calls getCurrentEpochId: function getCurrentEpochIdPromotion memory promotion internal view returns uint256 // elapsedTimestamp / epochDurationTimestamp return...

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

TwabRewards: fee on transfer token as promotion token will block at least one epoch reward claim

Handle GiveMeTestEther Vulnerability details Impact If the promotion token applies transfer fees, the total amount to claim will be less than "tokensPerEpoch numberOfEpochs" bcs a part of this amount is the fee = funds + fee, but only the "funds" can be withdrawn but the calculation in...

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

Can drain any promotion rewards with a evil ticket

Handle gzeon Vulnerability details Impact TwabRewards check legitimacy of ticket by checking if the ticket have a controller method. function requireTicketaddress ticket internal view requireticket != address0, "TwabRewards/ticket-not-zero-address"; bool succeeded, bytes memory data =...

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

Suggestion : To add explicit check for no of epochs to be 255 in createPromotion and extendPromotion

Handle 0x421f Vulnerability details So we are using uint256 to store 1/0 if that epoch is being claimed or not uint2561 is our base, so 255 is max limit we have now if someone creates a promotion with 255 epochs in epochs 255 , it will revert with "TypeError : Invalid Rational Number" Copied from...

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

Malicious Promotion Creators Can Drain Token Balances

Handle leastwood Vulnerability details Impact The createPromotion allows any user to create and fund promotions for a specific number of epochs. Ticket holders are entitled to a percentage of the rewards based on their TWAB. createPromotion references a ticket address which can be controlled by t...

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

If a promoter cancels a promotion, unclaimed rewards of ticket holders are lost

Handle hubble Vulnerability details Impact Loss of rewards for the ticket holders who have not yet claimed the rewards accrued until the previous epocs, if the promoter cancels the promotion after any epoch. Proof of Concept contract : TwabRewards function : cancelPromotion line 132 delete...

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

Possibility to drain TwabRewards smart contract tokens

Handle kemmio Vulnerability details Impact Possibility to drain all smart contract assets abusing rogue ticket contract Proof of Concept The vulnerability arises because of inconsistent check of requireTicket in createPromotion requireTicketticket; function requireTicketaddress ticket internal vi...

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

getRemainingRewards() Malfunction for unstarted promotions

Handle WatchPug Vulnerability details For unstarted promotions, cancelPromotion will revert at block.timestamp - promotion.startTimestamp in getCurrentEpochId. Call stack: getRemainingRewards - getRemainingRewards - getCurrentEpochId. function getCurrentEpochIdPromotion memory promotion internal...

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

AaveYield: Misspelled external function name making functions fail

Handle 0xngndev Vulnerability details Impact In AaveYield.sol the functions: liquidityToken withdrawETH depositETH Make a conditional call to IWETHGatewaywethGateway.getAWETHAddress This function does not exist in the wethGateway contract, causing these function to fail with the error "Fallback n...

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

getRewardsAmount doesn't check epochs haven't been claimed

Handle harleythedog Vulnerability details Impact In ITwabRewards.sol, it is claimed that getRewardsAmount should account for epochs that have already been claimed, and not include these epochs in the total amount indeed, there is a line that says @dev Will be 0 if user has already claimed rewards...

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

StartTimestamp is not checked

Handle defsec Vulnerability details Impact When the promotion is created, the promotion.startTimestamp variable can be so old date. That will cause to affect to epoch calculation. Proof of Concept 1. Navigate to the following contract code. promotionsnextPromotionId = Promotion msg.sender, ticket...

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

Possibility to drain SavingsAccount contract assets

Handle kemmio Vulnerability details Impact A malicious actor can manipulate switchStrategy function in a way to withdraw tokens that are locked in SavingsAccount contract the risk severity should be reviewed Proof of Concept Firstly an attacker need to deploy a rogue strategy contract implementin...

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

Auction.sol#settleAuction() Bonder may not be able to settle a bonded auction, leading to loss of funds

Handle WatchPug Vulnerability details uint256 a = factory.auctionMultiplier basket.ibRatio; uint256 b = bondBlock - auctionStart BASE / factory.auctionDecrement; uint256 newRatio = a - b; address memory pendingTokens, uint256 memory pendingWeights, uint256 minIbRatio = basket.getPendingWeights;...

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

Fee calculation is slightly off

Handle gzeon Vulnerability details Impact The fee calculation uint256 timeDiff = block.timestamp - lastFee; uint256 feePct = timeDiff licenseFee / ONEYEAR; uint256 fee = startSupply feePct / BASE - feePct; tries to calculate a fee such that fee/supply+fee = %fee using a simple interest formula i....

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

Basket:handleFees(): fees are overcharged

Handle GiveMeTestEther Vulnerability details Impact The fee calculation is based on the totalSupply of the basket token. But some amount of the totalSupply represents the fees paid to the publisher/ protocol owner. Therefore the fees are "overcharged": because the fee amount is calculated on a pa...

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

Promotion creator can't cancel promotion before it has begun

Handle kenzo Vulnerability details If a promotion creator has created a promotion for the future, and decides to cancel it, he can not do so due to an underflow in a calculation. Impact Promotion creator funds will be locked until promotion begins. Proof of Concept Promotion's startTimestamp is...

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

Multiple initialization of Collateral contract

Handle 0x1f8b Vulnerability details Impact The attacker can initialize the contract, take malicious actions, and allow it to be re-initialized by the project without any error being noticed.. Proof of Concept The initialize method of the Collateral contract does not contain the initializer...

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

Basket.sol#publishNewIndex() Lack of input validation may cause fund loss to anyone who bonds an auction

Handle WatchPug Vulnerability details According to the newRatio formula in settleAuction, the maximum value of newRatio is factory.auctionMultiplier basket.ibRatio. However, since there is no validation for the value of minIbRatio when setting it, if the publisher publishes a newIndex with...

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

divide-before-multiply

Handle 0v3rf10w Vulnerability details Impact divide-before-multiply can lead to miscalculation of fees in below function Proof of Concept Vulnerable Function : Basket.handleFeesuint256 Basket.sol133-153 : uint256 feePct = timeDiff licenseFee / ONEYEAR; uint256 fee = startSupply feePct / BASE -...

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

Basket.sol#auctionBurn calculates ibRatio wrong

Handle 0x0x0x Vulnerability details The function is implemented as follows: function auctionBurnuint256 amount onlyAuction nonReentrant external override uint256 startSupply = totalSupply; handleFeesstartSupply; burnmsg.sender, amount; uint256 newIbRatio = ibRatio startSupply / startSupply -...

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

Missing cap on LicenseFee

Handle gzeon Vulnerability details Impact There is no cap on LicenseFee. While change of LicenseFee is under 1 day timelock, introducing a maxLicenseFee can improve credibility by removing the "rug" vector. There is a minLicenseFee in the contracts, while imo make little sense to have minLicenseF...

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

Reentrancy vulnerability in Basket contract's initialize() method.

Handle broccolirob Vulnerability details A malicious "publisher" can create a basket proposal that mixes real ERC20 tokens with a malicious ERC20 token containing a reentrancy callback in it's approve method. When the initialize method is called on the newly cloned Basket contract, a method calle...

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

Change in auctionMultiplier/auctionDecrement change profitability of auctions and factory can steal all tokens from a basket abusing it

Handle 0x0x0x Vulnerability details When factory changes auctionMultiplier or auctionDecrement profitability of bonded auctions change. There is no protection against this behaviour. Furthermore, factory owners can decide to get all tokens from baskets where they are bonded for the auction. Proof...

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

Publisher can scam users by changing license fees and using auction to freeze user funds

Handle 0x0x0x Vulnerability details Publisher can call changeLicenseFee to change fees. There is no maximum cap for this parameter. At first glance, because there is a timelock period of 1 day, the users have enough time to react. But if the publisher can start an auction and bondForRebalance. Th...

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

Lost fees due to precision loss in fees calculation

Handle kenzo Vulnerability details In fees calculation, division is being used in the midst of the calculation, not at the end of it. This leads to lost precision in fee amount as solidity doesn't save remainder of division. Division should happen at the end to maintain precision. Impact Lost fee...

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

Basket can be fully drained if the auction is settled within a specific block

Handle Ruhum Vulnerability details Impact The settleAuction function allows someone to settle the auction by transferring funds in a way that the new pending index is fulfilled. As a reward, they are able to take out as many tokens as they want as long as the pending index is fulfilled after that...

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

Missing SafeApprove(0)

Handle sirhashalot Vulnerability details There are instances where the SafeApprove 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. Additionally, the comment before the...

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

Publisher can lock all user funds in the Basket in order to force a user to have their bond burned

Handle TomFrenchBlockchain Vulnerability details Impact All user funds in a basket being held hostage by the publisher Proof of Concept The Basket publisher can propose an auction in order to set new tokens and weights with a 1 day timelock. As part of this call they can set the minIbRatio variab...

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

Wrong emergencyWithdraw logic

Handle 0x1f8b Vulnerability details Impact The contract doesn't work as expected. Proof of Concept The method, emergencyWithdraw inside the contract yield/NoYield doesn't work as expected, the transfer was done with received value, and it should be done with amount, so the emergencyWithdraw never...

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

Wrong fee calculation after totalSupply was 0

Handle kenzo Vulnerability details handleFees does not update lastFee if startSupply == 0. This means that wrongly, extra fee tokens would be minted once the basket is resupplied and handleFees is called again. Impact Loss of user funds. The extra minting of fee tokens comes on the expense of the...

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

tokenWhitelist might break if removeFromTokenWhitelist is called multiple times with the same token

Handle gzeon Vulnerability details Impact In removeFromTokenWhitelist of ProtocolGovernance, numberOfValidTokens is decreased by 1 if addr is in tokenEverAdded. There are no check if the addr is still in the whitelist and therefore numberOfValidTokens can be repeatedly decreased to 0 by calling...

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

AaveVault does not update TVL on deposit/withdraw

Handle cmichel Vulnerability details Aave uses rebasing tokens which means the token balance aToken.balanceOfthis increases over time with the accrued interest. The AaveVault.tvl uses a cached value that needs to be updated using a updateTvls call. This call is not done when depositing tokens whi...

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

Admin can break _numberOfValidTokens

Handle cmichel Vulnerability details The ProtocolGovernance.numberOfValidTokens can be decreased by the admin in the ProtocolGovernance.removeFromTokenWhitelist function: function removeFromTokenWhitelistaddress addr external requireisAdminmsg.sender, "ADM"; tokensAllowedaddr = false; if...

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

Wrong implementation of performanceFee can cause users to lose 50% to 100% of their funds

Handle WatchPug Vulnerability details A certain amount of lp tokens shares of the vault will be minted to the strategyPerformanceTreasury as performanceFee, the amount is calculated based on the minLpPriceFactor. However, the current formula for toMint is wrong, which issues more than 100% of the...

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

Users can avoid paying vault fees

Handle cmichel Vulnerability details The LPIssuer.deposit/withdraw function charges protocol&management&performance fees through inflating the LP supply in the chargeFees function. However, this LP fees minting is skipped if the elapsed time is less than the managementFeeChargeDelay: if elapsed...

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

Bad redirects can make it impossible to deposit & withdraw

Handle cmichel Vulnerability details The GatewayVault.push function gets redirects from the strategyParams. If redirectsi = j, vault index i's deposits are redirected to vault index j. Note that the deposits for vault index i are cleared, as they are redirected: for uint256 j = 0; j The same is...

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

UniswapV3's path issue for swapExactOutput

Handle cmichel Vulnerability details UniswapV3 expects a path object like tokenA, feeAB, tokenB, feeBC, tokenC. The UniV3Trader.swapExactOutput code tries to reverse this path to get to tokenC, feeBC, tokenB, feeAB, tokenA but that's not what the reverseBytes function does. Note that it reverts t...

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

Withdraw from AaveVault will receive less than actual share

Handle gzeon Vulnerability details Impact AaveVault cache tvl and update it at the end of each push and pull. When withdrawing from LpIssuer, tokenAmounts is calculated using the cached tvl to be pulled from AaveVault. This will lead to user missing out their share of the accrued interest /...

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

Consider fees while calculating tvl of univ3

Handle 0x421f Vulnerability details As of now fees owed are not being considered I think here due to this A comes in deposits at time X his deposit genrates fess Now though B comes later, he gets unfair adv from As deposit Just use pool.burn to update fees I think --- The text was updated...

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

YearnVault.sol#pull() will most certainly fail

Handle WatchPug Vulnerability details for uint256 i = 0; i balance yTokenAmount = balance; if yTokenAmount == 0 continue; yToken.withdrawyTokenAmount, to, maxLoss; tokenAmountsi, addressthis; actualTokenAmounts = tokenAmounts; The actual token withdrew from yToken.withdraw will most certainly be...

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

Basket:handleFees fee calculation is wrong

Handle GiveMeTestEther Vulnerability details Impact The fee calculation on L141 is wrong. It should only get divided by BASE and not BASE - feePct Proof of Concept This shows dividing only by BASE is correct: Assumptions: BASE is 1e18 accordign to the code timeDiff is exactly ONEYEAR for easier...

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

IsContract Function Usage

Handle defsec Vulnerability details Impact the isContract function that uses EXTCODESIZE was discovered to be hackable. The function will return false if it is invoked from a contract's constructor because the contract has not been deployed yet. The code should be used very carefully, if at all, ...

7.1AI score
SaveExploits0
Total number of security vulnerabilities10190