Lucene search
K
Code423n4Recent

10190 matches found

Code423n4
Code423n4
•added 2022/01/26 12:0 a.m.•7 views

Restaking period could be disabled

Handle pedroais Vulnerability details Impact If the period is disabled arbitraging unstacked funds would be impossible which would destroy the protocol. Proof of Concept When the lockup period ends users have to restake or withdraw their funds to avoid being arbitraged. The arbRestake retake the...

6.9AI score
Exploits0
Code423n4
Code423n4
•added 2022/01/26 12:0 a.m.•8 views

Owner should be able to choose to not ignore failures in updateYieldStrategy

Handle harleythedog Vulnerability details Impact In Sherlock.sol, the function updateYieldStrategy ignores all errors when yieldStrategy.withdrawAll is called, and I believe this is an dangerous design choice. If yieldStrategy.withdrawAll reverts, then all the funds that are deposited in the yiel...

6.9AI score
Exploits0
Code423n4
Code423n4
•added 2022/01/26 12:0 a.m.•10 views

Attacker can collect all positive rebase from the poll

Handle gzeon Vulnerability details Impact The concept of ElasticSwap is not to change relative price upon positive rebase event. However, this allow an attacker to sandwich a known positive rebase event for profit. Proof of Concept 1. Assuming we have pool with 10000 base and 10000 quote token 2...

6.9AI score
Exploits0
Code423n4
Code423n4
•added 2022/01/26 12:0 a.m.•7 views

Users shouldn't be forced into a specific strategy (possible rug pull)

Handle harleythedog Vulnerability details Impact As already discussed in the previous Sherlock C4 contest here, it is best to mitigate rug pull possibilities even if the team is well intentioned, there is still the risk of being called out, and less users might interact with the project if the...

6.7AI score
Exploits0
Code423n4
Code423n4
•added 2022/01/26 12:0 a.m.•7 views

Anyone can withdraw others

Handle robee Vulnerability details Anyone can withdraw users shares. Although we think that they are sent to the right address, it is still 1 not the desired behavior 2 can be dangerous if the receiver is a smart contract 3 the receiver may not know someone withdraw him...

6.9AI score
Exploits0
Code423n4
Code423n4
•added 2022/01/26 12:0 a.m.•7 views

Sherlock: arbRestake() doesnt reduce addressShares of owner

Handle GreyArt Vulnerability details Impact As per the documentation, “After 2 weeks without action on an unlocked position arbs can come in to arbRestakeid, 20% of the underlying USDC amount principal + yield is at risk for the owner of the position.” While shares are redeemed for the arbitrager...

6.8AI score
Exploits0
Code423n4
Code423n4
•added 2022/01/26 12:0 a.m.•10 views

Big deposits will revert

Handle pedroais Vulnerability details Impact Big deposits will revert Proof of Concept If a deposit is greater than the total deposited the transaction will revert. In this line of code totalTokenBalanceStakers - amount is computed. If amount is bigger than TVL staking will revert. I consider thi...

7.1AI score
Exploits0
Code423n4
Code423n4
•added 2022/01/26 12:0 a.m.•9 views

Non-transferable critical privileged role

Handle gzeon Vulnerability details Impact DEPLOYER is a constant in Manager and it is the only role that can call setSherlockCoreAddress to change sherlockCore address. Consider this is a critical function and there might be a need to change the deplorer address in the future e.g. governance...

7AI score
Exploits0
Code423n4
Code423n4
•added 2022/01/26 12:0 a.m.•9 views

Attacker can grief initial pool by providing 1 baseToken, 1 quoteToken, and manually transferring 1 baseToken

Handle camden Vulnerability details Impact Read the attack composition below. But the main criteria is that the attacker has to be the first person to provide liquidity. They can at least from my testing permanently grief a pool and make it impossible for any later person to get liquidity tokens,...

6.6AI score
Exploits0
Code423n4
Code423n4
•added 2022/01/26 12:0 a.m.•7 views

[WP-H2] Transferring quoteToken to the exchange pool contract will cause future liquidity providers to lose funds

Handle WatchPug Vulnerability details In the current implementation, the amount of LP tokens to be minted when addLiquidity is calculated based on the ratio between the amount of newly added quoteToken and the current wallet balance of quoteToken in the Exchange contract. However, since anyone ca...

6.8AI score
Exploits0
Code423n4
Code423n4
•added 2022/01/26 12:0 a.m.•4 views

Re-try withdrawAll from inactive strategy

Handle pauliax Vulnerability details Impact When the withdrawAll from yieldStrategy fails, it nevertheless sets the new yieldStrategy and the old one is forgiven. try yieldStrategy.withdrawAll catch bytes memory reason emit YieldStrategyUpdateWithdrawAllErrorreason; emit...

6.9AI score
Exploits0
Code423n4
Code423n4
•added 2022/01/26 12:0 a.m.•11 views

[WP-H1] The value of LP token can be manipulated by the first minister, which allows the attacker to dilute future liquidity providers' shares

Handle WatchPug Vulnerability details For the first minter of an Exchange pool, the ratio of X/Y and the totalSupply of the LP token can be manipulated. A sophisticated attacker can mint and burn all of the LP tokens but 1 Wei, and then artificially create a situation of rebasing up by transferri...

6.7AI score
Exploits0
Code423n4
Code423n4
•added 2022/01/26 12:0 a.m.•7 views

anyone can call forceRemoveByActiveBalance()

Handle Tomio Vulnerability details Impact A user can call forceRemoveByActiveBalance and this function didn’t verify if the caller is equal to the protocol agent, that eventually clear the remaining balance. Proof of Concept --- The text was updated successfully, but these errors were encountered...

7AI score
Exploits0
Code423n4
Code423n4
•added 2022/01/26 12:0 a.m.•10 views

calculateLiquidityTokenFees returns zero fee

Handle sirhashalot Vulnerability details Impact The MathLib.sol calculateLiquidityTokenFees function returns a non-zero fee quantity only if rootK rootKLast. The rootK and rootKLast values are calculated from the same values, so this will never occur. This will result in the DAO never receiving a...

7AI score
Exploits0
Code423n4
Code423n4
•added 2022/01/26 12:0 a.m.•7 views

[WP-H0] In the case of Single Asset Entry, new liquidity providers will suffer fund loss due to wrong formula of ΔRo

Handle WatchPug Vulnerability details Current Implementation When baseToken rebase up Per the document: and related code: Gamma is the ratio of shares received by the new liquidity provider when addLiquidity ΔRo to the new totalSupply total shares = Ro' = Ro + ΔRo. ΔRo = Ro/1 - γ γ Ro Gamma =...

7AI score
Exploits0
Code423n4
Code423n4
•added 2022/01/26 12:0 a.m.•10 views

The amount of tokens received by the pool might be less than expected for feeOnTransfer tokens

Handle UncleGrandpa925 Vulnerability details Impact This issue impacts any pools that use fee-on-transfer quoteTokens. The codebase is inspired by Uniswap, with one important change: the router is built right into the pool themselves. In addLiquidity, after having updated all internal parameters...

6.8AI score
Exploits0
Code423n4
Code423n4
•added 2022/01/26 12:0 a.m.•9 views

Denial-of-service condition: emergency shutdown after pair creation loses contract funds

Handle static Vulnerability details Impact If the owner of the contract set specifically the Factory owner, executes allowEmergencyWithdraw after the pair is created, then the withdraw functions including the emergencyWithdraw will not function and the funds including the liquidity tokens, will b...

6.8AI score
Exploits0
Code423n4
Code423n4
•added 2022/01/26 12:0 a.m.•6 views

Exchange will become inoperable if internalBalances' quoteTokenReserveQty and K reach zero

Handle hyh Vulnerability details Impact Exchange will become stuck once quoteTokenReserveQty and K reach zero, which is possible as a part of liquidity removal logic Exchange.removeLiquidity. Some additional mechanics looks to be needed to handle a situation when quote token amount marked for...

6.9AI score
Exploits0
Code423n4
Code423n4
•added 2022/01/26 12:0 a.m.•5 views

SherlockClaimManager: Incorrect amounts needed and paid for escalated claims

Handle GreyArt Vulnerability details Impact When escalating claims, the documentation states that the protocol agent is required to pay and stake a certain amount for the process. If the covered protocol is proven correct, then the amount specified by the claim will be paid out. They will also...

7AI score
Exploits0
Code423n4
Code423n4
•added 2022/01/25 12:0 a.m.•6 views

LP inflation attack is possible as pools can be created with zero liquidity

Handle hyh Vulnerability details Impact A griefing by LP inflation attack is possible: an attacker can create pools for popular token pairs, provide a tiny amount of initial liquidity with addLiquidity, then send big enough amounts of base and quote tokens to the pool contract Exchange just...

6.9AI score
Exploits0
Code423n4
Code423n4
•added 2022/01/25 12:0 a.m.•9 views

Owner can set arbitrary premium which allow nonStakers drain funds

Handle wuwe1 Vulnerability details Impact Owner can set arbitrary premium, this will cause protocol lose all the activeBalance, stakers lose all the claimable premium and nonStakers can drain all the usdc. Proof of Concept setProtocolPremium does not check the value of premium. premium can be...

7.1AI score
Exploits0
Code423n4
Code423n4
•added 2022/01/25 12:0 a.m.•7 views

SherDistributionManager.sol:calcReward() wrong conditional statement

Handle Dravee Vulnerability details Impact There's a risk of DOS if maxRewardsEndTVL tvl and zeroRewardsStartTVL tvl 110: ? zeroRewardsStartTVL - Math.maxmaxRewardsEndTVL, tvl 111: : 0; However, just above, we can see this condition: uint256 maxRewardsAvailable = maxRewardsEndTVL tvl ?...

6.7AI score
Exploits0
Code423n4
Code423n4
•added 2022/01/24 12:0 a.m.•7 views

tokenBalanceOfAddress of nftOwner becomes permanently incorrect after arbRestake

Handle hyh Vulnerability details Impact Sucessfull arbRestake performs redeemShares for arbRewardShares amount to extract the arbitrager reward. This effectively reduces shares accounted for an NFT, but leaves untouched the addressShares of an nftOwner. As a result the tokenBalanceOfAddress...

6.6AI score
Exploits0
Code423n4
Code423n4
•added 2022/01/24 12:0 a.m.•9 views

calculateQuoteTokenQty() Does Not Check Rebase Event May Cause MisPricing

Handle Meta0xNull Vulnerability details Impact // xy=k - we track these internally to compare to actual balances of the ERC20's When Rebase Event Happen, the curve change and affect Pricing for Both Buy & Sell. calculateBaseTokenQty Do Check if Experience Quote Token Decay / a Rebase Down event a...

6.9AI score
Exploits0
Code423n4
Code423n4
•added 2022/01/24 12:0 a.m.•10 views

DoS and stealing users' USDC

Handle OriDabush Vulnerability details Sherlock.sol An attacker can DoS the system and steal user's USDC if he manages to stake his USDC first i.e. minting token ID 1. It can be done by calling the initialStake with every amount let's say amount = 1 for example. Let's assume the lock period is...

6.8AI score
Exploits0
Code423n4
Code423n4
•added 2022/01/24 12:0 a.m.•5 views

startClaim() allows higher than covered amounts to submit claims

Handle GeekyLumberjack Vulnerability details Impact Allows claims that are higher than covered amounts. May cause unwanted results and confusion. Proof of Concept 1. Alice gets $100,000 in coverage 2. Alice changes coverage to $50,000 3. Alice call startClaim with amount set to $100,000 4. maxCla...

6.9AI score
Exploits0
Code423n4
Code423n4
•added 2022/01/23 12:0 a.m.•8 views

updateYieldStrategy will freeze some funds with the old Strategy if yieldStrategy fails to withdraw all the funds because of liquidity issues

Handle hyh Vulnerability details Impact Part of the funds held with the strategy can be frozen if the current strategy has tight liquidity when updateYieldStrategy is run as this function makes an attempt to withdraw all the funds and then unconditionally removes the strategy. The Sherlock to...

6.6AI score
Exploits0
Code423n4
Code423n4
•added 2022/01/23 12:0 a.m.•8 views

Arbitrager can take more arbReward than expected.

Handle wuwe1 Vulnerability details Proof of Concept Arbitrager can reentry arbRestake This line will not revert because stakeShares ≤ stakeSharesid 0.2 Recommended Mitigation Steps Use ReentrancyGuard to guard arbRestake --- The text was updated successfully, but these errors were encountered: Al...

7AI score
Exploits0
Code423n4
Code423n4
•added 2022/01/23 12:0 a.m.•7 views

isActive doesn't prevent owner from sweeping token from AaveV2Strategy, SDM and SPM

Handle wuwe1 Vulnerability details Proof of Concept isActive appear in these places: owner can bypass isActive check by setting a different address in sherlockCore Recommended Mitigation Steps Add Timelock on setting sherlockCore. --- The text was updated successfully, but these errors were...

7AI score
Exploits0
Code423n4
Code423n4
•added 2022/01/23 12:0 a.m.•7 views

DEPLOYER can drain underlying asset deposited by AaveV2Strategy and drain SHER token in SherDistributionManager

Handle wuwe1 Vulnerability details Proof of Concept For sdm. DEPOLYER can call pullReward and send arbitrary amount of sher in sdm to the DEPOLYER. For AaveV2Strategy.sol , attacker can call withdrawAll and drain the underlying asset if there is any. Recommended Mitigation Steps Add Timelock on...

7AI score
Exploits0
Code423n4
Code423n4
•added 2022/01/23 12:0 a.m.•9 views

Reenterancy in _sendSherRewardsToOwner()

Handle kirk-baird Vulnerability details Impact This is a reentrancy vulnerability that would allow the attacker to drain the entire SHER balance of the contract. Note: this attack requires gaining control of execution sher.transfer which will depend on the implementation of the SHER token. Contro...

7.1AI score
Exploits0
Code423n4
Code423n4
•added 2022/01/23 12:0 a.m.•6 views

first liquidity provider can drain others

Handle danb Vulnerability details Impact first liquidity provider can drain others Proof of Concept consider the following scenario: a malicious user creates the usdc-usdt pool, they provided 1 basic unit of usdt and 1 basic unit of usdc 1/106 each the amount of liquidity token that will be minte...

6.8AI score
Exploits0
Code423n4
Code423n4
•added 2022/01/23 12:0 a.m.•11 views

setSherlockCoreAddress can be frontruned.

Handle wuwe1 Vulnerability details Proof of Concept SherDistributionManager.sol and AaveV2Strategy.sol are affected by this. For sdm, attacker can monitor mempool and frontrun the setSherlockCoreAddress . By setting the sherlockCore as a address controlled by attacker. Attacker can call pullRewar...

6.9AI score
Exploits0
Code423n4
Code423n4
•added 2022/01/21 12:0 a.m.•8 views

Zero value shown for stake & price in SherBuy.viewCapitalRequirements() when SherAmount between 1~1000 SherTokens.

Handle 0xwags Vulnerability details Impact stakeusdc staked and priceusdc to be paid will display zerowhen SherAmt is between one - four digit for eg, 1-1000if SHERDECIMALS is used as the divisor. I'm sure there is no limitation on the amount of Sher that one can buy or is it that there should be...

7.1AI score
Exploits0
Code423n4
Code423n4
•added 2022/01/21 12:0 a.m.•4 views

transferTokenOut does not restrict withdraw to requested amount of token

Handle samruna Vulnerability details function transferTokensOutaddress receiver, uint256 amount internal // Transfers any premiums owed to stakers from the protocol manager to this contract sherlockProtocolManager.claimPremiumsForStakers; // The amount of tokens in this contract uint256 mainBalan...

7AI score
Exploits0
Code423n4
Code423n4
•added 2022/01/21 12:0 a.m.•11 views

Add a timelock to ExchangeFactory.sol:setFeeAddress() (function that sets a key variable)

Handle Dravee Vulnerability details Impact To give more trust to users: functions that set key/critical variables should be put behind a timelock. Proof of Concept Here, a malicious owner could set the feeAddress to his own and the fee from liquidity tokens that get minted would get stolen: . As...

6.9AI score
Exploits0
Code423n4
Code423n4
•added 2022/01/21 12:0 a.m.•9 views

Hardcoded seed phrase in sherlock-v2-core repo

Handle cryptphi Vulnerability details Impact The hardcoded mnemonic can lead to account compromise. Proof of Concept There exists hardcoded credentials in line This credentials can be used to takeover the wallet address used. Tools Used Github Recommended Mitigation Steps Avoid hardcoding...

7AI score
Exploits0
Code423n4
Code423n4
•added 2022/01/20 12:0 a.m.•10 views

No check that _baseToken or _quoteToken address is not address(this)

Handle jayjonah8 Vulnerability details Impact In ExchangeFactory.sol the createnewExchange function takes in the addresses baseToken and quoteToken. There are require checks to make sure that these are not zero addresses but no require checks to ensure that either of these addresses are not...

7.1AI score
Exploits0
Code423n4
Code423n4
•added 2022/01/20 12:0 a.m.•14 views

Unbounded loop on array that can only grow can lead to DoS

Handle robee Vulnerability details A malicious attacker that is also a protocol owner can push unlimitedly to an array, that some function loop over this array. If increasing the array size enough, calling the function that does a loop over the array will always revert since there is a gas limit...

6.7AI score
Exploits0
Code423n4
Code423n4
•added 2022/01/20 12:0 a.m.•8 views

Possible Re-entrancy in _sendSherRewardsToOwner

Handle static Vulnerability details Vulnerability details Impact If the SHER token performs a callback, such as in ERC-777 tokens, when performing transfers, the sendSherRewardsToOwner function can be run multiple times to extract more rewards than should be available for a single NFT. Proof of...

6.9AI score
Exploits0
Code423n4
Code423n4
•added 2022/01/20 12:0 a.m.•7 views

Local variables are not initialized

Handle SolidityScan Vulnerability details Description The contract was found to be using local variables which were not initialized. This may introduce errors in the code if these variables are used anywhere without initialization as the default value for the variable type will be taken. Impact...

7.1AI score
Exploits0
Code423n4
Code423n4
•added 2022/01/20 12:0 a.m.•11 views

Fee always is zero in the first addLiquidity call

Handle 0x1f8b Vulnerability details Impact Fee always is zero during the first addLiquidity call. Proof of Concept The method MathLib.calculateLiquidityTokenFees is on charge to compute the liquidityToken fee, one of the arguments it's the totalSupply, and during the first call of addLiquidity...

7AI score
Exploits0
Code423n4
Code423n4
•added 2022/01/20 12:0 a.m.•7 views

first user can steal everyone else's tokens

Handle egjlmn1 Vulnerability details Impact A user who joins the systems first stakes first can steal everybody's tokens by sending tokens to the system externally. This attack is possible because you enable staking a small amount of tokens. Proof of Concept See the following attack: 1. the first...

6.8AI score
Exploits0
Code423n4
Code423n4
•added 2022/01/20 12:0 a.m.•8 views

approve return value is ignored

Handle robee Vulnerability details Some tokens don't correctly implement the EIP20 standard and their approve function returns void instead of a success boolean. Calling these functions with the correct EIP20 function signatures will always revert. Tokens that don't correctly implement the latest...

6.9AI score
Exploits0
Code423n4
Code423n4
•added 2022/01/19 12:0 a.m.•14 views

Incorrect erc20 interface

Handle 0v3rf10w Vulnerability details Impact Incorrect return values for ERC20 functions results in failure when interacting with other contract , as the return value is missing. Proof of Concept ApproveLike contracts/L1/gateway/L1Migrator.sol67-69 has incorrect ERC20 function...

7AI score
Exploits0
Code423n4
Code423n4
•added 2022/01/19 12:0 a.m.•11 views

Admin can rug L2 Escrow tokens leading to reputation risk

Handle harleythedog Vulnerability details Impact The L1Escrow contract has the function approve that is callable by the admin to approve an arbitrary spender with an arbitrary amount so they can steal all of the escrow's holdings if they want. Even if the admin is well intended, the contract can...

7AI score
Exploits0
Code423n4
Code423n4
•added 2022/01/19 12:0 a.m.•7 views

L1Migrator have no payable receive function to receive ETH from BridgeMinter

Handle gzeon Vulnerability details Impact L1Migrator can call withdrawETHToL1Migrator to withdraw ETH from BridgeMinter, but L1Migrator does not have a payable receive function so the call will revert. Proof of Concept function withdrawETHToL1Migrator external onlyL1Migrator returns uint256 uint2...

6.9AI score
Exploits0
Code423n4
Code423n4
•added 2022/01/19 12:0 a.m.•10 views

Griefing attack on migrateLPT can prevent token transfer to L2

Handle harleythedog Vulnerability details Impact In L1Migrator.sol the function migrateLPT can be called by anyone. A malicious user can call migrateLPT with a small maxSubmissionCost argument to intentionally make the retryable ticket creation fail. This will lock the LPT in the L1 escrow. Now,...

6.8AI score
Exploits0
Code423n4
Code423n4
•added 2022/01/19 12:0 a.m.•12 views

l1CirculatingSupply may not give correct value after a mass withdrawal from L2

Handle hubble Vulnerability details Impact In the event of a mass withdrawal from L2, the l2SupplyFromL1 is set to 0 in the function decreaseL2SupplyFromL1. Now if LPT is moved again from L1 to L2, some of them may be the excess LPT withdrawn from above case. So the value of l1CirculatingSupply...

6.8AI score
Exploits0
Code423n4
Code423n4
•added 2022/01/19 12:0 a.m.•8 views

Incorrect params in migrateETH leads to function not working

Handle harleythedog Vulnerability details Impact In L1Migrator.sol, the function migrateETH first withdraws eth from the BridgeMinter, and then intends to send all of this eth from L1 to L2. However, the parameters are incorrectly passed to the sendTxToL2 function, so none of this withdrawn eth...

6.9AI score
Exploits0
Total number of security vulnerabilities10190