Lucene search
+L
Code423n4Most viewed

10190 matches found

Code423n4
Code423n4
added 2023/04/25 12:0 a.m.15 views

From integer Overflow to DoS attack that leads to financial losses in ModexpPrecompile.modexp function and RSAVerify library.

Lines of code Vulnerability details Impact This vulnerability to cause unexpected behavior or even a denial-of-service attack on a contract that uses the RSAVerify library on . The vulnerable code is at: Integer overflow in modexp function in ModexpPrecompile does not perform any input validation...

7AI score
SaveExploits0
Code423n4
Code423n4
added 2023/04/19 12:0 a.m.15 views

Position.sol: usage of an incorrect version of Ownable library can potentially malfunction all onlyOwner functions

Lines of code Vulnerability details Impact // From https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/access/Ownable.sol The current implementaion is using a non-upgradeable version of the Ownable library isnstead of the upgradeable version:...

6.8AI score
SaveExploits0
Code423n4
Code423n4
added 2023/04/19 12:0 a.m.15 views

A MINTER CAN STOP A QUALIFIED POOL SHARE HOLDER FROM DENYING THE MINTER DURING THE APPLICATION PERIOD BY FRONT-RUNNING THE TRANSACTION

Lines of code Vulnerability details Impact A minter can stop a Qualified pool share holder from denying the minter during the application period by front-running the transaction Consider the following scenario: 1 . Assume minter is User A and Qualified pool share holder is User B. 2 . User A call...

6.7AI score
SaveExploits0
Code423n4
Code423n4
added 2023/04/19 12:0 a.m.15 views

Lack of slippage in redeem can result in loss of shares for redeemer

Lines of code Vulnerability details FPS holders can redeem their shares against zchf using redeem File: Equity.sol 276: function redeemaddress target, uint256 shares public returns uint256 //@audit no slippage, calculateProceeds can return 0 277: requirecanRedeemmsg.sender; 278: uint256 proceeds ...

6.6AI score
SaveExploits0
Code423n4
Code423n4
added 2023/04/19 12:0 a.m.15 views

Attacker can extract unlimited ZCHF by setting a high price for a position and challenging it

Lines of code Vulnerability details An attacker can act as both minter and challenger, and profit by setting an arbitrarily high price for a position way higher than what the collateral really is worth, and then immediately challenging the position. After the challenge succeeds, the attacker will...

6.3AI score
SaveExploits0
Code423n4
Code423n4
added 2023/04/13 12:0 a.m.15 views

Tokens with Fee on Transfer can break the PrivatePool invariant

Lines of code Vulnerability details Impact Some tokens take a transfer fee e.g. STA, PAXG, some do not currently charge a fee but may do so in the future e.g. USDT, USDC. Fees lead to the fact that the pool actually receives less funds than expected in the contract, and the reserve configuration ...

6.8AI score
SaveExploits0
Code423n4
Code423n4
added 2023/04/13 12:0 a.m.15 views

Dangerous use of setVirtualReserves(), withdraw(), and execute() leads to incorrect configuration of PrivatePool

Lines of code Vulnerability details Impact The function setVirtualReserves allows arbitrary changes to the values of virtualBaseTokenReserves and virtualNftReserves, which determine the price of the NFT trade in the pool. However, the real balance of tokens or ether in the pool is not checked, so...

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

ReraiseETHCrowdfund.sol: party card transfer can be front-run by claiming pending voting power which results in a loss of the voting power

Lines of code Vulnerability details Impact In this report I show how an attacker can abuse the fact that anyone can call ReraiseETHCrowdfund.claim for any user and add voting power to an existing party card. The result can be a griefing attack whereby the victim loses voting power. In some cases...

6.7AI score
SaveExploits0
Code423n4
Code423n4
added 2023/04/09 12:0 a.m.15 views

ETHCrowdfundBase.sol: all funds are lost when fee recipient cannot receive ETH

Lines of code Vulnerability details Impact In the ETHCrowdfundBase contract a fundingSplitRecipient address is configured which receives a percentage of the funds in case the crowdfund is won. Neither the fundingSplitRecipient address nor the fundingSplitBps percentage can be changed. The issue i...

6.5AI score
SaveExploits0
Code423n4
Code423n4
added 2023/04/04 12:0 a.m.15 views

Upgraded Q -> 2 from #17 [1680620718364]

Judge has assessed an item in Issue 17 as 2 risk. The relevant finding follows: L-05 Check that staking cannot occur when endTime is reached The MuteAmplifier.stake function should require that the current timestamp is smaller than endTime even when the call to stake is the first that ever...

6.7AI score
SaveExploits0
Code423n4
Code423n4
added 2023/04/03 12:0 a.m.15 views

An edge case in amplifier allows user to stake after end time, causing reward to be locked in the contract

Lines of code Vulnerability details Proof of Concept Observe that if nobody has staked after the period has ended, it's still possible for a single user to stake even though the period has ended. if firstStakeTime == 0 firstStakeTime = block.timestamp; else requireblock.timestamp if...

6.7AI score
SaveExploits0
Code423n4
Code423n4
added 2023/03/30 12:0 a.m.15 views

Hardcoded poolFee in deposit() Function Cause Liquidity Depth Issue for Swap

Lines of code Vulnerability details Impact In deposit function we are using the hardcoded value of poolFee as 500 which limits the ability of liquidity providers to select the appropriate fee tier, potentially reducing the returns for liquidity providers. IWETHWETHADDRESS.depositvalue: msg.value;...

6.9AI score
SaveExploits0
Code423n4
Code423n4
added 2023/03/30 12:0 a.m.15 views

poolPrice in Reth.sol can overflow and revert

Lines of code Vulnerability details Impact To determine the value of sqrtPriceX96 that will cause an overflow, we need to analyze the calculation in the function: sqrtPriceX96 uintsqrtPriceX96 1e18 96 2 The maximum value for a uint256 is 2^256 - 1. An overflow occurs when the result of the...

7AI score
SaveExploits0
Code423n4
Code423n4
added 2023/03/30 12:0 a.m.15 views

Zero value used for sqrtPriceLimitX96

Lines of code Vulnerability details Impact In swapExactInputSingleHop in Reth.sol the sqrtPriceLimitX96 parameter is set to 0 which is useful for testing but can lead to price manipulation attacks. From the uniswap docs: In production, this value can be used to set the limit for the price the swa...

6.9AI score
SaveExploits0
Code423n4
Code423n4
added 2023/03/26 12:0 a.m.15 views

Upgraded Q -> 2 from #88 [1679874611177]

Judge has assessed an item in Issue 88 as 2 risk. The relevant finding follows: L-1 Vault assignment in VaultToken can be frontrunned --- The text was updated successfully, but these errors were encountered: All reactions...

7AI score
SaveExploits0
Code423n4
Code423n4
added 2023/03/20 12:0 a.m.15 views

usedFunds is wrong after Liquidity.closeLong, openShort and closeShort

Lines of code Vulnerability details Impact usedFunds is wrong in LiquidityPool, and usedFunds tracks spent quote tokens. usedFunds is an important state in LiquidityPool, so the impact will be high. Proof of Concept Liquidity.closeLong and openShort don't update the state usedFunds correctly. In...

6.9AI score
SaveExploits0
Code423n4
Code423n4
added 2023/03/20 12:0 a.m.15 views

Incorrect calculation of usedFunds in LiquidityPool leads to lower than expected token price

Lines of code Vulnerability details In LiquidityPool.sol, the functions openLong, closeLong, openShort and closeShort do not deduct hedgingFees from usedFunds to offset the hedgingFees that was added due to hedge. Impact The missing deduction of hedgingFees will increase the usedFunds in...

6.7AI score
SaveExploits0
Code423n4
Code423n4
added 2023/03/20 12:0 a.m.15 views

LiquidityPool.sol#L657 : setFees() could be abused to steal the funds when there is huge transacion is happening.

Lines of code Vulnerability details Impact Set fee functions can be set to any arbitrary value when the transaction is happening. There are more possibility that user could lose most of all of their hard earned funds. Proof of Concept Below functions can be called by autheraised person to fix the...

6.9AI score
SaveExploits0
Code423n4
Code423n4
added 2023/03/19 12:0 a.m.15 views

Default accounts cannot pay transaction fees due to DefaultAccount not calling MsgValueSimulator

Lines of code Vulnerability details Impact Default accounts cannot pay the transaction fees to the bootloader. It's not clear whether the attempts to do so will silently succeed or revert because the behaviour of the CALL opcode in the zkSync Era virtual machine isn't explained in the description...

6.7AI score
SaveExploits0
Code423n4
Code423n4
added 2023/03/19 12:0 a.m.15 views

External calls can be manipulated

Lines of code Vulnerability details Impact By making external calls to untrusted contracts, the sender might manipulate the contract's state and cause unintended behavior. Proof of Concept In the tokenURI and mint functions, the contract makes external calls to ERC721nftContract.tokenURInftID and...

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

Adding Multiple Blocks with the Same Timestamp Can Create Ambiguity in the Order of Blocks in the Blockchain Network

Lines of code Vulnerability details Impact Multiple blocks at the same timestamp creates ambiguity about the order in which these blocks should be added to the chain. This can cause inconsistencies in the state of the network and make it vulnerable to attacks such as double-spending. Proof of...

6.9AI score
SaveExploits0
Code423n4
Code423n4
added 2023/03/15 12:0 a.m.15 views

Unvalidated input in setManagerRight function

Lines of code Vulnerability details Impact The setManagerRight function takes managedRight and managerRight as inputs without validating them This could potentially lead to unexpected results if the input values are not what the function expects. Tools Used Recommended Mitigation Steps Provide...

6.9AI score
SaveExploits0
Code423n4
Code423n4
added 2023/03/15 12:0 a.m.15 views

Lack of a contract existence check may lead to undesired behavior

Lines of code Vulnerability details Impact The functions NeoTokyoStaker.assetTransferFrom and NeoTokyoStaker.assetTransfer are both used as helper functions to perform low level calls, both functions revert if the low-level call fails, but no checks are made if the contract that's being called...

6.7AI score
SaveExploits0
Code423n4
Code423n4
added 2023/03/09 12:0 a.m.15 views

Wrong calculation in calculateNewProfit

Lines of code Vulnerability details Impact There is a wrong calculation of the cumulative net profit of the lottery, which affects the calculation of the excess pot and rewards per winning ticket including the jackpot in each draw. This vulnerability also leads to a Denial of Service of the Lotte...

6.9AI score
SaveExploits0
Code423n4
Code423n4
added 2023/03/09 12:0 a.m.15 views

Lottery owner can manipulate the RNG to favour themselves, or other certain participants

Lines of code Vulnerability details The docs state that Chainlink VRF will be used as the source of randomness, whose subscription model is described here. A call is made to Chainlink's VRFCoordinatorV2 requestRandomWords function, after which a response is sent back in the form of a call to...

6.9AI score
SaveExploits0
Code423n4
Code423n4
added 2023/03/09 12:0 a.m.15 views

Rewards for the Staking.sol contract may be stolen via the first staker

Lines of code Vulnerability details Impact The return amount of the function rewardPerToken may be inflated for the first in the Staking.sol contract. Proof of Concept The Staking.sol contract is designed for the LOT token holders to be able to stake their native tokens. Thus, the token holders...

6.7AI score
SaveExploits0
Code423n4
Code423n4
added 2023/03/09 12:0 a.m.15 views

Multiplier must be capped to prevent expected payout exceeding ticket price

Lines of code Vulnerability details Impact Expected payout may be greater than ticket price, bankrupting the lottery. Proof of Concept ticketsSold determines the multiplier to be used when calculating non jackpot rewards LotteryMath.solL84: bonusMulti += excessPot EXCESSBONUSALLOCATION /...

6.8AI score
SaveExploits0
Code423n4
Code423n4
added 2023/03/07 12:0 a.m.15 views

Attacker contract can avoid being blocked

Lines of code Vulnerability details Impact A Malicious attacker can interact with the system and selfdestruct his own contract then use CREATE2 to recreate it at same address when he needs to interact with the system again. Proof of Concept Tools Used Manual Review Recommended Mitigation Steps...

6.9AI score
SaveExploits0
Code423n4
Code423n4
added 2023/03/07 12:0 a.m.15 views

ReaperVaultERC4626.sol is not EIP-4626 compliant

Lines of code Vulnerability details Impact Other protocols integrated with Ethos Reserve may mistakenly assume that its function complies with EIP-4626. Therefore, this may lead to integration issues in the future, which could result in various problems for both parties. Proof of Concept All...

6.8AI score
SaveExploits0
Code423n4
Code423n4
added 2023/03/07 12:0 a.m.15 views

Losses are double counted if there currently locked profits

Lines of code Vulnerability details Impact Losses are double counted and vault participants lose funds Proof of Concept if roi 0 vars.gain = uint256roi; vars.fees = chargeFeesvars.stratAddr, vars.gain; strategy.gains += vars.gain; ... // Profit is locked and gradually released per block // NOTE:...

6.7AI score
SaveExploits0
Code423n4
Code423n4
added 2023/03/07 12:0 a.m.15 views

Re-entrancy inside BorrowOperations if collateral is ERC777

Lines of code Vulnerability details Impact Invariant violations through re-entrancy if the collateral token is ERC777 Proof of Concept If the collateral token will be an ERC777 token, a malicious user could use the safeTransfer from L231 to re-enter the BorrowOperations contract context and call...

6.9AI score
SaveExploits0
Code423n4
Code423n4
added 2023/03/07 12:0 a.m.15 views

Depositors might not be able to withdraw from StabilityPool if any collateral's price drops significantly

Lines of code Vulnerability details In the TroveManager contract, the closeTrove function contains a check to ensure there is more than one trove, as shown below. TroveManager.solL1278-L1282: function closeTroveaddress borrower, address collateral, Status closedStatus internal assertclosedStatus ...

6.6AI score
SaveExploits0
Code423n4
Code423n4
added 2023/03/07 12:0 a.m.15 views

LQTYStaking.sol – Reentrancy risk in stake() unstake() functions

Lines of code Vulnerability details In the LQTY smart contract, the stake and unstake functions are used to add or remove a certain amount of LQTY tokens from a user's stake, respectively. Both functions are designed to update the user's stake and the total amount of LQTY staked while allowing...

6.7AI score
SaveExploits0
Code423n4
Code423n4
added 2023/03/03 12:0 a.m.15 views

Upgraded Q -> 2 from #633 [1677880427560]

Judge has assessed an item in Issue 633 as 2 risk. The relevant finding follows: Vault contract implementation does not disable initializers The Vault.sol contract should implement disableInitializers in its constructure to prevent implementation contracts from being initialized. As this contract...

6.7AI score
SaveExploits0
Code423n4
Code423n4
added 2023/02/20 12:0 a.m.15 views

The latest malt price can be less than the actual price target and StabilizerNode.stabilize will revert

Lines of code Vulnerability details Impact StabilizerNode.stabilize will revert when latestSample priceTarget and msgSender is not an admin and not whitelisted, it asserts livePrice minThreshold. And minThreshold is calculated as follows: uint256 priceTarget = maltDataLab.getActualPriceTarget;...

7AI score
SaveExploits0
Code423n4
Code423n4
added 2023/02/12 12:0 a.m.15 views

Upgraded Q -> 2 from #533 [1676218902616]

Judge has assessed an item in Issue 533 as 2 risk. The relevant finding follows: Upgradeable contract is missing a gap50 storage variable to allow for new storage variables in later versions --- The text was updated successfully, but these errors were encountered: All reactions...

6.9AI score
SaveExploits0
Code423n4
Code423n4
added 2023/02/06 12:0 a.m.15 views

Upgraded Q -> 3 from #664 [1675726078144]

Judge has assessed an item in Issue 664 as 3 risk. The relevant finding follows: L-1 ERC20 Quest: withdrawFee function should only be able to be called once instead of multiple times Issue: The withdrawFee function can be called multiple times by admin after a quest ends, resulting in more than t...

6.9AI score
SaveExploits0
Code423n4
Code423n4
added 2023/02/03 12:0 a.m.15 views

Squeezing drips from a sender can be front-run and prevented by the sender

Lines of code Vulnerability details Squeezing drips from a sender requires providing the sequence of drips configurations see NatSpec description in L337-L338: /// It can start at an arbitrary past configuration, but must describe all the configurations /// which have been used since then includi...

6.9AI score
SaveExploits0
Code423n4
Code423n4
added 2023/02/03 12:0 a.m.15 views

MinipoolManager: node operator can avoid being slashed

Lines of code Vulnerability details Impact When staking is done, a Rialto multisig calls MinipoolManager.recordStakingEnd . If the avaxTotalRewardAmt has the value zero, the MinipoolManager will slash the node operator's GGP. The issue is that the amount to slash can be greater than the GGP balan...

6.7AI score
SaveExploits0
Code423n4
Code423n4
added 2023/02/03 12:0 a.m.15 views

setDrips may distribute the drip too fast if the time hints are not good enough

Lines of code Vulnerability details Impact The setDrips function is used to configure a drip. It can either be withdrawing it, adding a new one, or even managing an existing one by updating the configuration. Internally, it account for the drips that are yet to be distributed to refund them to th...

6.7AI score
SaveExploits0
Code423n4
Code423n4
added 2023/02/03 12:0 a.m.15 views

Signature replay attacks possible if deployed on multiple chains

Lines of code Vulnerability details Caller.callSigned operates using an EIP-712 signature which verifies the signed data to be used in a call on behalf of the signer. The problem with this method lies in the fact that it doesn't specify the chain ID, and thus if the contract is ever deployed to...

6.8AI score
SaveExploits0
Code423n4
Code423n4
added 2023/02/01 12:0 a.m.15 views

Locked Ether

Lines of code Vulnerability details Description Contract with a payable function, but without a withdrawal capacity. Impact Every Ether sent to LendgineRouter will be lost. Proof of Concept File: src/periphery/LendgineRouter.sol 142: function mintMintParams calldata params external payable...

6.9AI score
SaveExploits0
Code423n4
Code423n4
added 2023/02/01 12:0 a.m.15 views

Fee on transfer tokens will not behave as expected

Lines of code Vulnerability details Impact In Numoen, it does not specifically restrict the type of ERC20 collateral used for borrowing. If fee on transfer tokens is/are entailed, it will specifically make mint revert in Lendgine.sol when checking if balanceAfter balanceBefore + collateral. Proof...

6.9AI score
SaveExploits0
Code423n4
Code423n4
added 2023/02/01 12:0 a.m.15 views

Loss of funds - User has control of the fallback function

Lines of code Vulnerability details Imapct: Lendengine check the balanceBefore and after of token1, after sending tokens via a mintFallback function. During this fallback the user has access to theses tokens so far as it's returned + collateral the fallback is satisfied. A attacker can take out...

6.8AI score
SaveExploits0
Code423n4
Code423n4
added 2023/02/01 12:0 a.m.15 views

A malicious early user/attacker can manipulate the share price to take an unfair share of future users' deposits

Lines of code Vulnerability details Impact A malicious early user/attacker can manipulate the share price to take an unfair share of future users' deposits. The first minter can manipulate the supply of LP tokens and baseToken-fractional ratio, hindering small liquidity providers from interacting...

6.8AI score
SaveExploits0
Code423n4
Code423n4
added 2023/01/30 12:0 a.m.15 views

Wrongly implemented modifier allow everybody to mint Rabbit Hole tickets.

Lines of code Vulnerability details Impact As specified on RabbitHole C4 contest page, RabbitHoleTickets smart contract 'is an 1155 reward contract used by the RabbitHole team.' Meaning that the assets managed by this smart contract have value. Moreover this contract implements ERC-2981: NFT...

6.9AI score
SaveExploits0
Code423n4
Code423n4
added 2023/01/30 12:0 a.m.15 views

Modifier onlyMinter() implementation is faulty

Lines of code Vulnerability details The current implementation of the modifier onlyMinter will not revert because the "require" part is missing, therefore any user will be able to access the minting functions in RabbitHoleTickets.sol and RabbitHoleReceipt.sol. Impact Any user than the allowed...

6.8AI score
SaveExploits0
Code423n4
Code423n4
added 2023/01/29 12:0 a.m.15 views

Mitigation of M-05: Issue not mitigated

Lines of code Vulnerability details Mitigation of M-05: Issue not mitigated --- The text was updated successfully, but these errors were encountered: All reactions...

7AI score
SaveExploits0
Code423n4
Code423n4
added 2023/01/29 12:0 a.m.15 views

Mitigation of H-02: See comments

Lines of code Vulnerability details The PR applies the recommended mitigation from the finding, but doesn't take into account the rounding issue identified in M-09 Impact If the price the NFT is bought for is not an exact multiple of the filledQuantities, there will be a loss of precision, and...

6.8AI score
SaveExploits0
Code423n4
Code423n4
added 2023/01/28 12:0 a.m.15 views

Overflow Vulnerability in Splits Contract Due to Maximum Splits Receivers Limitation (_MAX_SPLITS_RECEIVERS = 200)

Lines of code Vulnerability details Impact If more than 200 splits receivers are added for a single user, the constant MAXSPLITSRECEIVERS will be exceeded, causing unexpected behavior in the contract uint256 internal constant MAXSPLITSRECEIVERS = 200; Proof of Concept a. Create an array of splits...

6.8AI score
SaveExploits0
Total number of security vulnerabilities5000