Lucene search
+L
Code423n4Recent

10190 matches found

Code423n4
Code423n4
•added 2023/08/07 12:00 a.m.•17 views

Owner of _liquidationPair can add malicious liquidation source and insufficient input parameter validations

Lines of code Vulnerability details Impact Malicious liquidationPair owner can deploy liquidationPair using malicious sourceliquidation source that the pair will use and other insufficient input validations that can put users' funds at risk. File: src/LiquidationPairFactory.sol function createPai...

6.8AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/08/07 12:00 a.m.•17 views

An attacker could manipulate the _rngAuctionResult to unfairly distribute more rewards to themselves

Lines of code Vulnerability details Impact When the rewards are calculated using computeRewards, the attacker's inflated rewardFraction will be used, giving them a bigger share Proof of Concept The rngAuctionResult passed to rngComplete is stored directly into the auctionResults array without any...

6.6AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/08/07 12:00 a.m.•12 views

Protocol won't work with tokens that can prevent transfers

Lines of code Vulnerability details Impact There are various tokens and token standards that can result in transfers being stopped, blocked, blacklisted, paused or disallowed. This entails protocols may function well with these tokens up until a time when any of above measures activated leading t...

6.9AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/08/07 12:00 a.m.•19 views

Assets from the old step are not properly transferred to a new TR position

Lines of code Vulnerability details Impact The transferAssetsIntoStep function's intent is to serve two purposes: transferring aAssets to a target TR position and moving assets from an old step to a target TR position. However, in practice, assets removed from the old step are not integrated into...

6.8AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/08/07 12:00 a.m.•14 views

Potential Precision Loss in claimFee() due to Division Before Multiplication

Lines of code Vulnerability details Impact The function claimFee may result in precision loss when calculating the addedValue variable. This issue arises due to division being performed before multiplication, leading to the possibility of truncated values and incorrect results. Proof of Concept T...

6.9AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/08/07 12:00 a.m.•13 views

VaultBoosterFactory allows deployment of VaultBooster with phoney PrizePool

Lines of code Vulnerability details Impact A malicious VaultBooster can be deployed via VaultBoosterFactory contract. Users may lose funds while interacting with such VaultBooster. File: src/VaultBoosterFactory.sol function createVaultBoosterPrizePool prizePool, address vault, address owner...

6.8AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/08/07 12:00 a.m.•11 views

RngRelayAuction.rngComplete() DOS attack

Lines of code Vulnerability details Impact If the recipient maliciously enters the blacklist of priceToken, it may cause rngComplete to fail to execute successfully Proof of Concept The current implementation of RngRelayAuction.rngComplete immediately transfers the prizeToken to the recipient...

7AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/08/07 12:00 a.m.•14 views

initiator in OptionsPositionManager.executeOperation is not checked

Lines of code Vulnerability details Impact An attacker can execute flashloan pretending to be other user. Proof of Concept LendigPool.flashloan sends which user called in the parameter initiator, but it is not used in executeOperation. Tools Used Manual review. Recommended Mitigation Steps Check ...

7.1AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/08/07 12:00 a.m.•11 views

GetVault poolMatchesOracle calculation may overflow

Lines of code Vulnerability details Impact Overflow. Proof of Concept The GetVault derivative contract implements the poolMatchesOracle function, which is used by deposit, withdraw and rebalance functions. The poolMatchesOracle function checks that the pool price isn't manipulated using a Uniswap...

6.9AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/08/07 12:00 a.m.•22 views

swapExactTokensForTokens and swapTokensForExactTokens in OptionsPositionManager.sol uses UniswapV2Router01 which doesn't exist on Arbitrum

Lines of code Vulnerability details Impact The functions swapExactTokensForTokens and swapTokensForExactTokens are using UniswapV2Router01 to make swaps in different functions like closeDebt, withdrawOptionAssets or swapTokens, but that would not be possible and those function would revert. Proof...

6.9AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/08/07 12:00 a.m.•14 views

Missing access control in RngRelayAuction::rngComplete()

Lines of code Vulnerability details For a draw auction to complete, a bot must relay a completed RNG result to the Prize Pool. This is done by calling rngComplete and the data must originate from the relayer. However the rngComplete function is missing a check that the msg.sender is the relayer s...

6.9AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/08/07 12:00 a.m.•20 views

Missing flash loan initiator check allows attacker to open trades, close trades and steal funds

Lines of code Vulnerability details Impact The attacker can close trades, partially close trades and even steal funds. Proof of Concept The OptionsPositionManager.executeOperation function is called when a flash loan is made and it can only be called by the lendingPool. The wrong assumption by th...

7AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/08/07 12:00 a.m.•16 views

UNCHECKED TRANSFER

Lines of code Vulnerability details Impact Some tokens do not revert the transaction when transferFrom fails and returns False. Hence we must check the return value after calling the transfer or transferFrom function. Proof of Concept Check the last answer here: In short: Using...

6.9AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/08/07 12:00 a.m.•10 views

Calculations like valueX8 and liquidity do not account for potential rounding errors

Lines of code Vulnerability details Impact These small inaccuracies could accumulate and cause the total supply of liquidity tokens to not exactly match the vault holdings. This could allow an attacker to potentially deposit tokens, get liquidity that is slightly higher than what they should base...

6.7AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/08/07 12:00 a.m.•13 views

Functions Not Considering ERC20 Transaction Fees

Lines of code Vulnerability details Impact Some ERC20 tokens charge a transaction fee for every transfer used to encourage staking, add to liquidity pool, pay a fee to contract owner, etc.. Sometimes this is not a problem but in the cases where the same value is passed to a state variable and to...

6.8AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/08/07 12:00 a.m.•60 views

SETTING block.timestamp AS THE DEADLINE COULD LEAD TO HIGHER RATE OF FAILED TRANSACTIONS

Lines of code Vulnerability details Impact The OptionsPositionManager.swapExactTokensForTokens function is used to swap assets for exact assets. Here the exact amount of source token is swapped for an amount of target token. The function uses the IUniswapV2Router01.swapExactTokensForTokens call f...

7.2AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/08/07 12:00 a.m.•19 views

Incorrect Import Path Directories

Lines of code Vulnerability details Impact Wrong Import Path Directories of LiquidationPair.sol contract would affect the functionality of the contract as this contract relies of the implementation of this imports Proof of Concept 4. import ILiquidationSource from...

7AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/08/07 12:00 a.m.•30 views

Integer underflow/overflow is possible in some of the timestamp calculations if sequenceOffset or auctionDuration are set maliciously

Lines of code Vulnerability details Impact An attacker could exploit this to make auctionElapsedTime return a low value when it should be high, thereby manipulating the reward calculation. Proof of Concept The vulnerability comes from the subtraction currentTime - sequenceOffset which could...

6.7AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/08/07 12:00 a.m.•13 views

It is possible that function rngComplete() does not iterate through all rewards

Lines of code Vulnerability details Impact In RngRelayAuction.sol we have rngComplete: function rngComplete uint256 randomNumber, uint256 rngCompletedAt, address rewardRecipient, uint32 sequenceId, AuctionResult calldata rngAuctionResult external returns bytes32 if...

6.7AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/08/07 12:00 a.m.•17 views

removeFromAllTicks() withdraws all tick assets before deposit and withdraw re-deposit them creates a reentrancy attacks.

Lines of code Vulnerability details Impact reentrancy attacks can result to stolen funds Proof of Concept The key issue is that removeFromAllTicks calls removeFromTickindex in a loop, which calls lendingPool.withdraw and tr.withdraw. These external calls could trigger a reentrant call back into t...

6.5AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/08/07 12:00 a.m.•35 views

The treasury address can be updated by the contract owner to point to a malicious address after deployment

Lines of code Vulnerability details Impact Any fees or funds sent to the treasury could potentially be stolen or manipulated Proof of Concept The treasury address can be updated by the contract owner to point to a malicious address after deployment. This presents a risk as the treasury receives a...

6.8AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/08/07 12:00 a.m.•13 views

The system is subjected to Cross-Contract Reentrancy due to Insufficient validation for tokens, source and liquidity Pairs

Lines of code Vulnerability details Impact A malicious actor can gain control of the liquidation process which can manipulate the POOL token price Proof of Concept Almost all the pieces of the protocol are open to everyone with no guard, and that can cause a serious problem. consider the followin...

7.1AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/08/07 12:00 a.m.•13 views

Calculations like valueX8 and liquidity do not account for potential rounding errors

Lines of code Vulnerability details Impact These small inaccuracies could accumulate and cause the total supply of liquidity tokens to not exactly match the vault holdings. This could allow an attacker to potentially deposit tokens, get liquidity that is slightly higher than what they should base...

6.7AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/08/07 12:00 a.m.•19 views

[M-02] Denial of Service on failed call Dos

Lines of code Vulnerability details Impact Detailed description of the impact of this finding. External calls can fail accidentally or deliberately, which can cause a DoS condition in the contract. To minimize the damage caused by such failures, it is better to isolate each external call into its...

7AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/08/07 12:00 a.m.•29 views

The protocol uses IRouter01 from Uniswap, which should not be used anymore because of a bug found in the code

Lines of code Vulnerability details Impact The protocol implements Router01 from UniswapV2 to do any swaps of tokens in OptionsPositionManager.sol, but Router01 is deprecated and bugged and should not be used anymore. Proof of Concept As can be seen in the UniswapV2 documentation Router01 should...

6.8AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/08/07 12:00 a.m.•22 views

cleanup() does not properly handle debt repayment

Lines of code Vulnerability details Impact The cleanup... function in the PositionManager.sol contract is used to deposit remaining users assets back to ROE, repaying debt if any. However the users debt will not be repaid if the user has debt leading to loss of funds for the lenders and the proje...

6.7AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/08/07 12:00 a.m.•13 views

PRBMATH SD59x18.exp() reverts on hugely negative numbers.

Lines of code Vulnerability details Impact ContinuousGDA.sol inherits a version of PRB Math that contains a vulnerability in the SD59x18.exp function, which can be reverted on hugely negative numbers. SD59x18.exp is used for calculations in ContinuousGDA.solpurchasePrice ,...

6.7AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/08/06 12:00 a.m.•19 views

Upgraded Q -> 3 from #16 [1691315821722]

Judge has assessed an item in Issue 16 as 3 risk. The relevant finding follows: L-04: MorphoTokenisedDeposit override decimalsOffset ==0 increase ERC4626 inflation attack risk --- The text was updated successfully, but these errors were encountered: All reactions...

7AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/08/05 12:00 a.m.•20 views

Upgraded Q -> 2 from #180 [1691271324742]

Judge has assessed an item in Issue 180 as 2 risk. The relevant finding follows: L-04 Some slot data is incorrectly overwritten during storage --- The text was updated successfully, but these errors were encountered: All reactions...

7AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/08/05 12:00 a.m.•15 views

Upgraded Q -> 2 from #116 [1691272104948]

Judge has assessed an item in Issue 116 as 2 risk. The relevant finding follows: L-02 Misuse of shl function leads to unnecessary over-estimation of size in calldatacopy within getArgBytes function --- The text was updated successfully, but these errors were encountered: All reactions...

6.9AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/08/04 12:00 a.m.•18 views

Lack of slippage checks on public withdraw fees function

Lines of code Vulnerability details Impact function withdrawAllMarketFees IMarket calldata markets, ISwapper calldata swappers, IPenrose.SwapData calldata swapData public notPaused require markets.length == swappers.length && swappers.length == swapData.length, "Penrose: length mismatch" ;...

7AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/08/04 12:00 a.m.•17 views

Calc token amount can be manipulated

Lines of code Vulnerability details Impact function calcDepositInOneCoin uint2563 memory arr private view returns uint256 return liquidityPool.calctokenamountarr, true; This function is being used to calculate slippage, return value calctokenamount can be manipulated as described in POC section,...

7AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/08/04 12:00 a.m.•17 views

Reentrancy vulnerability in SGLLendingCommon._removeCollateral

Lines of code Vulnerability details Impact This vulnerability could allow an attacker to withdraw collateral from the SGLLendingCommon contract without actually removing it. This could result in a loss of funds for the lender. Proof of Concept The SGLLendingCommon.removeCollateral function is...

6.8AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/08/04 12:00 a.m.•12 views

Missing access control override in BoringFactory

Lines of code Vulnerability details Impact function addBigBang address mc, address contract external onlyOwner registeredBigBangMasterContractmc isMarketRegisteredcontract = true; clonesOfmc.pushcontract; emit RegisterBigBangcontract, mc; allows only onlyOwner to call this function, while deploy ...

6.9AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/08/04 12:00 a.m.•19 views

Malicious user can drain the Singularity contract of it's liquidity

Lines of code Vulnerability details Impact The SGLCollateral contract has functionality to allow users to remove and add collateral for the Singularity market. The addCollateral function accepts a skim parameter that, if defined as true, will cause the internal addTokens function to assert that t...

6.8AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/08/04 12:00 a.m.•14 views

Controlled Delegatecall Vulnerability in Singularity, BaseUSDO, USDOLeverageModule, USDOMarketModule, and USDOOptionsModule

Lines of code Vulnerability details Impact The Singularity, BaseUSDO, USDOLeverageModule, USDOMarketModule, and USDOOptionsModule contracts all use the delegatecall function to call a function in another contract. However, the function id of the function to be called is controlled by the caller...

7.8AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/08/04 12:00 a.m.•14 views

addCollateral allows anyone to addCollateral on behalf of others

Lines of code Vulnerability details Impact addCollateral allows anyone to addCollateral on behalf of others. In other words, bypassing the borrow allowance check. Proof of Concept allowedBorrow modifier will not revert if passed share == 0. addCollateral method uses allowedBorrow modifier functio...

6.9AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/08/04 12:00 a.m.•20 views

Direct claim of convex rewards causes rewards to get stuck

Lines of code Vulnerability details Impact ConvexTriCryptoStrategy does not take into account that rewards from Convex can be claimed directly on behalf of any address. All rewards that get into the strategy contract this way will get stuck and compounding of yield will be denied. Proof of Concep...

6.7AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/08/04 12:00 a.m.•32 views

StargateRewardableWrapper._claimAssetRewards should use stakingContract.withdraw(poolId, 0)

Lines of code Vulnerability details Impact StargateRewardableWrapper.claimAssetRewards leverage stakingContract.depositpoolId, 0; to claim rewards from Stargate. But it could fail to claim the reward in the edge case. Proof of Concept StargateRewardableWrapper.claimAssetRewards calls...

6.9AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/08/04 12:00 a.m.•13 views

Balancer swap fee is not set and quote properly when Rebalancing

Lines of code Vulnerability details Impact Rebalance may revert Proof of Concept The rebalance functon tightly integrate with stargate and layezero however, the swap fee is not quoted and calculated the swap erc20.approveaddressrouter, amount; router.swap dstChainId, srcPoolId, dstPoolId, oft,...

7.1AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/08/04 12:00 a.m.•18 views

CurveVolatileCollateral Collateral status can be manipulated by flashloan attack

Lines of code Vulnerability details Impact Attacker can make the CurveVolatileCollateral enter the status of IFFY/DISABLED . It will cause the basket to rebalance and sell off all the CurveVolatileCollateral. Proof of Concept The CurveVolatileCollateral overrides the anyDepeggedInPool function to...

6.8AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/08/04 12:00 a.m.•15 views

Yearn Stragety tolerant 0 loss, which is too strict and can block withdraw

Lines of code Vulnerability details Impact Yearn Stragety tolerant 0 loss, which is too strict Proof of Concept When withdraw from Yearn Stragety result = vault.withdrawtoWithdraw, addressthis, 0; @param maxLoss The maximum acceptable loss to sustain on withdrawal. Defaults to 0.01%. If a loss is...

6.9AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/08/04 12:00 a.m.•18 views

Possible rounding during the reward calculation

Lines of code Vulnerability details Impact Some rewards might be locked inside the contract due to the rounding loss. Proof of Concept claimAndSyncRewards claimed the rewards from the staking contract and tracks rewardsPerShare with the current supply. function claimAndSyncRewards internal virtua...

6.9AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/08/04 12:00 a.m.•12 views

In the BaseTOFT, removeCollateral(), any marketHelper can be specified, allowing all the ETH to be stolen from a mTapiocaOFT with ETH as erc

Lines of code Vulnerability details Impact All the ETH in mTapiocaOFT can be stolen, which is relevant when the underlying asset erc is ETH. Proof of Concept mTapiocaOFT allows removing collateral from Singularity through a cross chain call, but the address of the MarketHelper is not validated. T...

7AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/08/04 12:00 a.m.•15 views

Cross-chain replay attacks are possible

Lines of code Vulnerability details Impact In MarketERC20.sol we have permit function: function permit / bool asset, // 1 = asset, 0 = collateral address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, ...

6.8AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/08/04 12:00 a.m.•15 views

ARBTriCryptoOracle is prone to manipulation

Lines of code Vulnerability details Impact ARBTriCryptoOracle is used to determine price of LP token of tricrypto USDT, WBTC, WETH on arbitrum. This pool is susceptible to re-entrancy due to bug in vyper 0.2.15. and hence getvirtualprice can be manipulated which is used for pricing LP tokens. Pro...

7AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/08/04 12:00 a.m.•23 views

Reentrancy vulnerability in Singularity.execute

Lines of code Vulnerability details Impact This vulnerability could allow an attacker to withdraw funds from the Singularity contract. This could result in a loss of funds for the user. Proof of Concept The Singularity.execute function has external calls inside a loop. This could potentially lead...

7.1AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/08/04 12:00 a.m.•12 views

Incorrect parameter for allowedBorrow when repaying

Lines of code Vulnerability details Impact Incorrect parameter for allowedBorrow check during repayment in BigBang requires an approval that is orders of magnitudes higher than the intended amount if Alice wants to allow Bob to use their funds. This can be abused by Bob to take more collateral or...

6.8AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/08/04 12:00 a.m.•14 views

ConvexTriCryptoStrategy might not compound all rewards

Lines of code Vulnerability details Impact When compounding in ConvexTriCryptoStrategy, the number of tokens that is swapped into wETH does not account for extraRewards and tokenRewards. This can cause a loss of yield and rewards to be lost. Proof of Concept In ConvexTriCryptoStrategy.executeClai...

6.7AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/08/04 12:00 a.m.•19 views

Broker Address can be Claim by a MEV Bot

Lines of code Vulnerability details Impact If the broker address is a malicious user, he can mint as many OTAP as he wants. Proof of Concept Protocol deploy the OTAP contract A Bot wait until the contract is deployed Then call the "brokerClaim" straight away with his own address. He can then call...

7AI score
SaveExploits0
Total number of security vulnerabilities10190