Lucene search
+L
Code423n4Most viewed

10190 matches found

Code423n4
Code423n4
•added 2022/12/21 12:00 a.m.•22 views

code doesn't check that the Uniswap pool is not exist and if attacker creates the uniswap pool before hand with calculatable papr address and underlying address and exact fee amount, then the deployment transaction would fail always

Lines of code Vulnerability details Impact attacker can perform DOS and prevent contract from getting deployed. the address of papr can be calculate by attacker before its deployment and the address of the underlyingUSDC and the fee is known, attacker can create uniswap pool before-hand and cause...

7.1AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/12/21 12:00 a.m.•22 views

Some NFTs could be possibly stuck and can not be withdrawn when removing the collateral

Lines of code Vulnerability details Impact When adding a collateral, the protocol transfers the NFT from the user to the contract by calling ERC721's transferFrom, and when removing the collateral, safeTransferFrom is called to allow for onReceive hook to be triggered as intended by the protocol...

6.8AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/12/20 12:00 a.m.•22 views

Insufficient Timestamp Validation for Signed Messages

Lines of code Vulnerability details Impact A message can be signed by the oracle for any future point in time, and it will be valid for 20 minutes. If messages with invalid timestamps pointing to the future get signed, there is no way of invalidating them. A compromised or malfunctioning oracle...

6.7AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/12/19 12:00 a.m.•22 views

Bids are wrongly ordered when prices and quantities are equal.

Lines of code Vulnerability details Description In GroupBuy, when total amount of Raes is filled up with purchases, users start competing with higher price offers. Their bids are laid out in a min priority queue structure implemented in MinPriorityQueue.sol. The docs clearly state that when two...

7AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/12/19 12:00 a.m.•22 views

Reentrancy issue #1: Functions buy() and add() are vulnerable to reentrancy attack through tokensToSend() hook of ERC777

Lines of code Vulnerability details It is important to be aware that I have reported two reentrancy bugs. Each of these have different ways of being activated and can be found in separate functions. Impact All calculations done in Caviar Pair are using token balance directly. For example, when...

6.7AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/12/19 12:00 a.m.•22 views

LP token is vulnerable to flashloan manipulation

Lines of code Vulnerability details Impact Detailed description of the impact of this finding. The addQuote function in the pair.sol smart contract utilizes a pricing formula for liquidity pools that is susceptible to exploitation through flashloan manipulation. By introducing a large quantity of...

7AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/12/16 12:00 a.m.•22 views

Wrong calculation of MONTH_IN_SECONDS

Lines of code Vulnerability details Wrong calculation of MONTHINSECONDS : line 33 on VRFNFTRandomDraw.sol is calculating 30 weeks of 7 days instead of 30 days. 30 weeks of 7 days = 3600 24 7 30. 30 days = 3600 24 30. so and wont work properly --- The text was updated successfully, but these error...

7AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/12/16 12:00 a.m.•22 views

Draw admin/owner can rug the winner after recoverTimelock expires.

Lines of code Vulnerability details Impact The admin/owner of VRFNFTRandomDraw can wait for recoverTimelock to expire before making the draw. This way he can use lastResortTimelockOwnerClaimNFT to take back the reward NFT from the contract without any time to allow for the winner to claim. He cou...

6.7AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/12/16 12:00 a.m.•22 views

ERC20 approvals may need to be set to 0 beforehand

Lines of code Vulnerability details Impact There are some instances where there is an ERC20 approval for a max uint256 amount. ERC20 tokens such as USDT require the address allowance to be set to 0 beforehand, so this would cause reverts for those tokens. Proof of Concept -Token such as USDT gets...

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

depositAndTrade::exactInputSingleParams the possible return values not checked

Lines of code Vulnerability details Impact The return values ​​from collateral.deposit and collateral.transferFrom are not used. This means that the values ​​returned by those functions will not be stored or used in the code. The swapRouter.exactInputSingle function also likely returns no value, ...

6.6AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/12/12 12:00 a.m.•22 views

Misconfigured or malicious MANAGER Can drain, lose or steal ALL of the collateral.

Lines of code Vulnerability details Impact Collateral.sol allows withdrawal of funds to an arbitrary manager account. There are no inherent limitation to: 1. identity of manager address 2. withdrawable amount Details of 1. : manager setter is access controlled still may be misconfigured or a...

7AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/12/12 12:00 a.m.•22 views

Unlimited Global & User Withdrawal right after previous period ends and new period begins

Lines of code Vulnerability details Impact Checks for Global and User Withdraw Limit Per Period are missing for the first withdrawal request right AFTER period length expires and a new period begins. First withdrawal request amount after period length expires can be way higher than...

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

Permanent freeze of yield when TokenSender rewards bank is depleted and deposit or withdraw is called.

Lines of code Vulnerability details Description In collateral deposit and withdraw flow, a fee is calculated as a percentage of user's requested amount. It is passed to the DepositHook and WithdrawHook, for example in deposit: uint256 amountAfterFee = amount - fee; if addressdepositHook != addres...

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

Pool with any fee tier can be created

Lines of code Vulnerability details Impact Pool with any fee tier can be created Proof of Concept There is a section in this medium: In Fee Structure: Maverick AMM supports initializing pools with arbitrary fee rates, but it is expected that LPs will choose from one of the following “standard” fe...

7AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/12/12 12:00 a.m.•22 views

Owner can rug PrePOMarket using re-initialized finalLongPayout.

Lines of code Vulnerability details Description In PrePOMarket.sol, the finalLongPayout represents the finalized value of a single long token in the market. It is settled post ICO / IPO according to predetermined rules. The issue is that this value may be re-initialized as many times as owner...

6.5AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/12/09 12:00 a.m.•22 views

transfer is used on address payable

Lines of code Vulnerability details Proof of Concept The codebase makes heavy use of the deprecated transfer function of address payable. Its will inevitably make the transaction fail when: 1. The receiver smart contract does not implement a payable function. 2. The receiver smart contract does...

6.8AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/12/09 12:00 a.m.•22 views

Artist will never get their payout for their NFT in FixedPrice and OpenEdition

Lines of code Vulnerability details Impact There is no logic for transferring Ether that artist gain from their NFT sales in both FixedPrice and OpenEdition contracts. For these 2 contracts there is only logic for transferring 5% fee to the protocol. Therefore, artist will gain nothing from selli...

6.9AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/12/09 12:00 a.m.•22 views

Asset removal leaks previous asset prices which will be used again when asset is re-added.

Lines of code Vulnerability details Description NFTFloorOracle retrieves ERC721 prices for ParaSpace. Recordings of prices are managed in assetFeederMap, mapping between address and FeederRegistrar: struct FeederRegistrar // if asset registered or not bool registered; // index in asset list uint8...

6.7AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/12/09 12:00 a.m.•22 views

Anyone can remove feeders from NFTFloorOracle.

Lines of code Vulnerability details Impact There is no onlyRole modifier in removeFeeder, so anyone can remove feeders from NFTFloorOracle, and it will cause a DOS attack. Proof of Concept function removeFeederaddress feeder external onlyWhenFeederExistedfeeder //@audit no modifier...

6.8AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/12/09 12:00 a.m.•22 views

Malicious feeReceiver or saleReceiver can steal the user's refund ETH by calling the buy function multiple times in LPDA

Lines of code Vulnerability details Impact In the LPDA contract, the fee is transfered to feeReceiver and the totalSale to saleReceiver when newId == temp.finalId, meaning that the amount of tokens that were minted has been reached. However, the call to the internal end function only emits an eve...

7.1AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/12/09 12:00 a.m.•22 views

Fallback oracle is unusable when primary oracle is not updated

Lines of code Vulnerability details Description Paraspace implemented their own Oracle wrapper in ParaSpaceOracle.sol. The important function getAssetPrice is used by many logic functions like health check. function getAssetPriceaddress asset public view override returns uint256 if asset ==...

6.6AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/12/09 12:00 a.m.•22 views

Oracle does not treat upward and downward price movement the same in validity checks, causing safety issues in oracle usage.

Lines of code Vulnerability details Description NFTFloorOracle retrieves ERC721 prices for ParaSpace. maxPriceDeviation is a configurable parameter, which limits the change percentage from current price to a new feed update. We can see how priceDeviation is calculated and compared to...

7AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/12/05 12:00 a.m.•22 views

Upgraded Q -> M from #316 [1670230229509]

Judge has assessed an item in Issue 316 as M risk. The relevant finding follows: compound in AutoPxGmx can be called by anyone and can be sandwiched if a poorly chosen amountOutMinimum is used. The idea is to call the function often by adding an incentive to the caller. There is a problematic...

6.7AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/11/28 12:00 a.m.•22 views

incorrect commend and/or rounding issues in AutoPxGmx and AutoPxGlp

Lines of code Vulnerability details Impact The comments on the affected lines state previewWithdraw will round up. However, the implementation, an inner call to convertToShares is made, which actually calls mulDivDown. From further inspection, this pair of functions withdraw, previewWithdraw as...

6.9AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/11/28 12:00 a.m.•22 views

A registered contract won't earn fees if _recipient is a fresh address

Lines of code Vulnerability details Impact Users might fall victims of a false positive: if they use a fresh account as an NFT recipient during contract registration, the transaction won't revert, but the registered contract will never earn fees for the token holder. And since a contract can be...

6.8AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/11/28 12:00 a.m.•22 views

NameWrapper: one can renew to DoS a Name

Lines of code Vulnerability details Impact Anyone with enough eth can make a name impossible to be used anymore Proof of Concept Below is a snippet of the proof of concept. The whole code can be found in this gist. And how to run test is in the comment in the gist. This proof of concept...

6.9AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/11/28 12:00 a.m.•22 views

Wrong comparison

Lines of code Vulnerability details Impact I think the following check is unnecessary but furthermore, there should be a comparison if the allowance amount allowed is equal or greater than shares amount. Otherwise, we would end up with underflow of the uint value Proof of Concept Tools Used Manua...

6.8AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/11/27 12:00 a.m.•22 views

Possible lost msg.value in function distributeFees

Lines of code Vulnerability details Author: rotcivegaf Impact The function distributeFees don't checks if the tokenId exists and if the owner send value to the an non-exists tokenId, this one will stuck in the contract until the tokenId will minted, and take by the owner of the minted token that...

6.6AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/11/13 12:00 a.m.•22 views

Native funds on the aggregator contract balance is a free grab

Lines of code Vulnerability details Native funds on the aggregator contract balance is a free grabLooksRareAggregator's execute returns the native balance of the contract to the caller even when nothing was provided with the call. This happens when LooksRareAggregator's execute is called directly...

6.8AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/11/10 12:00 a.m.•22 views

Chainlink USD price feeds can have more than 8 decimals

Lines of code Vulnerability details Impact Collateral value is overestimated by orders of magnitude if asset that has a chainlink oracle USD price feed with more than 8 decimals is added. A borrower can borrow much more than allowed in an EscrowedLine Proof of Concept In Oracle.sol the USD price...

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

Attacker can drain the SizeSealed.sol contract.

Lines of code Vulnerability details Impact An attacker can drain the SizeSealed.sol contract buy creating fake auction and manipulating some contract logic. POC Assuming that the SizeSealed.sol initially contains 10000 DAI tokens, I’ll demonstrate how an attacker can steal these tokens. The bug i...

6.6AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/11/08 12:00 a.m.•22 views

SizeSealed.withdraw will revert on mulDivDown if a.data.lowest is the value zero, which can prevent withdraws for an auction

Lines of code Vulnerability details Proof of Concept The call to mulDivDown on L377 will revert if the third argument denominador is the value zero. See Solmate implementation. It's possible for a.data.lowestBase to receive the value zero, which will prevent the transfers from L381 and L384. Impa...

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

Auction can be DoS-ed with too many bids

Lines of code Vulnerability details Proof of Concept The bid functionality pushes every new bid to the a.bids array. On finalize this array is looped over. Now, if there are too many bids in it, the for loop gas consumption will go over the block gas limit, which is 30M gas units currently. The...

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

Seller can stole users assets by create and then cancel the auction

Lines of code Vulnerability details Impact Seller can stole users assets by create and cancel auction Proof of Concept Seller can create an auction, then wait for people to participate in auction bidding, finally the seller cancel the auction and get the users assets. This scenario can happen wit...

6.8AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/11/03 12:00 a.m.•22 views

reentrancyGuardInitializer modifier used on constructor and Initialize functions

Lines of code Vulnerability details Impact Detailed description of the impact of this finding. In L1EthBridge.sol there are two places where the reentrancyGuardInitializer modifier is used. It's found on both the constructor function and also on the initialize function. This is a problem because...

6.9AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/11/03 12:00 a.m.•22 views

reentrancyGuardInitializer modifier used on constructor and Initialize functions

Lines of code Vulnerability details Impact Detailed description of the impact of this finding. In L1ERC20Bridge.sol there are two places where the reentrancyGuardInitializer modifier is used. It's found on both the constructor function and also on the initialize function. This is a problem becaus...

6.8AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/10/25 12:00 a.m.•22 views

Incorrect usage of try/catch block

Lines of code Vulnerability details Vulnerability details Description There is a function getBridgeOutRequestPayload in HolographBridge contract. It has the following: / @dev the revertedBridgeOutRequest function is wrapped into a try/catch function / try this.revertedBridgeOutRequestmsg.sender,...

7AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/10/25 12:00 a.m.•22 views

_payoutToken[s]() is not compatible with tokens with missing return value

Lines of code Vulnerability details Impact Payout is blocked and tokens are stuck in contract. Proof of Concept PA1D.payoutToken and PA1D.payoutTokens call ERC20.transfer in a require-statement to send tokens to a list of payout recipients. Some tokens do not return a bool e.g. USDT, BNB, OMG on...

6.8AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/10/25 12:00 a.m.•22 views

Operator is not randomly selected

Lines of code Vulnerability details Impact Operator is not selected randomly, but entirely determined by the number of operators in pod. Proof of Concept The pod is selected by taking a number random modulo the number of pods Np. But then the operator is selected by taking the modulo of the same...

6.8AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/10/21 12:00 a.m.•22 views

Upgraded G -> M from 553 [1666369528441]

Judge has assessed an item in Issue 553 as Medium risk. The relevant finding follows: 01 - payEther use transfer instead of call Replace line 154 for payablepayAddress.callvalue: payAmt"" Reason --- The text was updated successfully, but these errors were encountered: All reactions...

6.9AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/10/21 12:00 a.m.•22 views

Upgraded Q -> M from 236 [1666363743332]

Judge has assessed an item in Issue 236 as Medium risk. The relevant finding follows: ERC721 token can be lost in fillAsk PROBLEM When a user fills an ask order by calling fillAsk, the ERC721.transferFrom method is used to transfer the NFT to the receiver. Should the receiver be a smart contract...

6.7AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/10/12 12:00 a.m.•22 views

No withdraw mechanism for eth sent to GraphProxy contract

Lines of code Vulnerability details Impact The GraphProxy contract implements receive and fallback functions to receive funds. However, there is no method associated with a user to withdraw his funds which might be sent accidentally to the proxy contract, thus leading to most of the eth locked in...

6.7AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/10/12 12:00 a.m.•22 views

outboundTransfer should return excess msg.value

Lines of code Vulnerability details Impact In function outboundTransfer, if users sends more msg.value than required, by accident, then the remaining msg.value is not sent back. So, if msg.value amount argument, then the excess msg.value is not sent back to msg.sender. This causes loss of funds f...

6.9AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/10/01 12:00 a.m.•22 views

The protocol doesn't support fee-on transfer tokens

Lines of code Vulnerability details Impact There are ERC20 tokens that may make certain customizations to their ERC20 contracts. One type of these tokens is deflationary tokens that charge a certain fee for every transfer functions. So if the implementing contract doesn't takes this fee into...

7AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/09/25 12:00 a.m.•22 views

syncRewards() after xERC4626's beforeWithdraw() can result in wrong reward amount

Lines of code Vulnerability details Impact The withdrawal amount will be counted as part of the surplus asset balance mistakenly if block.timestamp = rewardsCycleEnd. Proof of Concept function beforeWithdrawuint256 assets, uint256 shares internal override super.beforeWithdrawassets, shares; // ca...

6.9AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/09/25 12:00 a.m.•22 views

Low level call returns true if the address doesn't exist

Lines of code Vulnerability details Impact As written in the solidity documentation, the low-level function call returns true as its first return value if the address called is non-existent, as part of the design of the EVM. Address existence must be checked prior to calling if needed. Since the...

7.3AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/09/23 12:00 a.m.•22 views

DoS With Block Gas Limit

Lines of code Vulnerability details Impact Modifying an array of unknown size, that increases in size over time in the function createClaimUnchecked can lead to Deniel of Service. Proof of Concept When smart contracts are deployed or functions inside them are called, the execution of these action...

7AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/09/15 12:00 a.m.•22 views

ERC721Votes.sol checkpoints' timestamp is not unique, which leads to manipulation of the amount of votes

Lines of code Vulnerability details Impact getPastVotes uses the binary search algorithm, which returns the result if it encounters the same timestamp, and since timestamps are not unique in the array The number of votes can be controlled by adding checkpoints to locate any one of the same...

6.8AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/09/15 12:00 a.m.•22 views

ERC721Votes: Token owners can double voting power through self delegation

Lines of code Vulnerability details The owner of one or many ERC721Votes tokens can double their voting power once and only once by delegating to their own address as their first delegation. Scenario This exploit relies on the initial default value of the delegation mapping in ERC721Votes, which ...

7AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/09/15 12:00 a.m.•22 views

Calling Governor.execute function without sending any ETH can withdraw general ETH funds from the Treasury contract

Lines of code Vulnerability details Impact When calling the following Governor.execute function, the Treasury.execute function is executed. Because Governor.execute is payable, ETH can be sent to the Treasury contract. function execute address calldata targets, uint256 calldata values, bytes...

6.9AI score
SaveExploits0
Total number of security vulnerabilities5000