Lucene search
+L
Code423n4Most viewed

10190 matches found

Code423n4
Code423n4
added 2023/01/27 12:00 a.m.16 views

reentrancy in TimeswapV2Option.collect()

Lines of code Vulnerability details Impact collect function doesn't respect the check-effect-interaction pattern, where in the case if a param.data is provided it makes an external call to the caller, right after that, it updates option short amount state. in the case if the caller calls back int...

7.1AI score
SaveExploits0
Code423n4
Code423n4
added 2023/01/27 12:00 a.m.16 views

A malicious rebalancer can imbalance the constant sum nature of long token pool by depositing a larger number of input tokens for a smaller number of output tokens. This also imbalances the constant product nature of 3 token pool

Lines of code Vulnerability details Impact Token0 and Token1 follow the properties of a constant sum pool. deltax token0 change is balanced proportionately by deltay token1 change adjusted for strike. Arbitrageurs can use the constant sum property to rebalance the pool based on the level of strik...

6.7AI score
SaveExploits0
Code423n4
Code423n4
added 2023/01/27 12:00 a.m.16 views

reentrancy in TimeswapV2Option.collect()

Lines of code Vulnerability details Impact collect function doesn't respect the check-effect-interaction pattern, where in the case if a param.data is provided it makes an external call to the caller, right after that, it updates option short amount state. in the case if the caller calls back int...

7.1AI score
SaveExploits0
Code423n4
Code423n4
added 2023/01/27 12:00 a.m.16 views

Burning a ERC1155Enumerable token doesn't remove it from the enumeration

Lines of code Vulnerability details The ERC1155Enumerable base contract used in the TimeswapV2Token and TimeswapV2LiquidityToken tokens provides a functionality to enumerate all token ids that have been minted in the contract. The logic to remove the token from the enumeration if the last token i...

6.9AI score
SaveExploits0
Code423n4
Code423n4
added 2023/01/27 12:00 a.m.16 views

Loss of Long tokens when users send excess tokens to pool while minting LP tokens

Lines of code Vulnerability details Impact Protocol currently uses 2 levels of callbacks for minting: Inner Level callback: timeswapV2PoolMintChoiceCallback function in Line 349 of Pool.sol that allows users to choose Long0 and Long1 amounts such that long0 + long1converted based on strike = long...

6.9AI score
SaveExploits0
Code423n4
Code423n4
added 2023/01/25 12:00 a.m.16 views

Pool.sol: The collectProtocolFees() function can be called by anyone

Lines of code Vulnerability details Impact As specified in the documentation, the collectProtocolFees should be called only by the protocol owner. However, as this is an external function, an attacker is able to call it and to perform the actions inside the function. Proof of Concept The...

6.8AI score
SaveExploits0
Code423n4
Code423n4
added 2023/01/22 12:00 a.m.16 views

Upgraded Q -> M from #445 [1674423223201]

Judge has assessed an item in Issue 445 as M risk. The relevant finding follows: 5 Function crossChain in GovNFT should have limit for maximum tokens allowed to be transferred, because of gas limit in the dest chain. if a user transferred a lot of tokens because there was two loop inside each oth...

7AI score
SaveExploits0
Code423n4
Code423n4
added 2023/01/21 12:00 a.m.16 views

SWC-109 Uninitialized Storage Pointer

Lines of code Vulnerability details Impact Uninitialized local storage variables can point to unexpected storage locations in the contract, which can lead to intentional or unintentional vulnerabilities. Proof of Concept OrderStatus storage orderStatus; Tools Used github Recommended Mitigation...

6.6AI score
SaveExploits0
Code423n4
Code423n4
added 2023/01/21 12:00 a.m.16 views

Reentrancy

Lines of code Vulnerability details Impact An attacker can be the owner of conduitcontroller contract Proof of Concept function acceptOwnership has re-entrancy vulnerability Look at this : function acceptOwnership Executes twice to make the caller as owner. Look at this = emit OwnershipTransferre...

6.8AI score
SaveExploits0
Code423n4
Code423n4
added 2023/01/20 12:00 a.m.16 views

Compilation Error: Undefined function 'shiftl_toFix' in CTokenFiatCollateral Contract

Lines of code Vulnerability details Impact return shiftltoFixrate, shiftLeft; It should be noted that the function "shiftltoFix" is not defined in the contract and not imported from any library, this means that the compiler will throw an error when trying to deploy the contract and this function...

6.8AI score
SaveExploits0
Code423n4
Code423n4
added 2023/01/20 12:00 a.m.16 views

A transfer-on-fee token or a deflationary/rebasing token, causing the received amount to be less than the accounted amount. For instance, a deflationary tokens might charge a certain fee for every safetransfer() or safetransferFrom().

Lines of code Vulnerability details Impact ALice calls stakeamount = 100 deflationary Tokens. Because the token has a fee upon transfer, StRSR receives only 99 tokens and staked that amount to mint but user thought that receives 100 tokens . But reality token received for stRSR only 99 . Proof of...

6.9AI score
SaveExploits0
Code423n4
Code423n4
added 2023/01/19 12:00 a.m.16 views

[M-02] Strategist has full control over Public Vault it can be risky for depositors

Lines of code Vulnerability details Impact The strategist has full control over all key functions. If the strategist is compromised or hacked he will be able to manipulate the vault. For example, increase the depositCap modifyDepositCapuint256 newCap, add a depositor to the whitelist...

6.8AI score
SaveExploits0
Code423n4
Code423n4
added 2023/01/17 12:00 a.m.16 views

Deny of service in CCash.sol with "transfer" which can be unusable for smart contract calls

Lines of code Vulnerability details Impact The CCash.doTransferOut method is susceptible to denial of service. Proof of Concept The logic of the doTransferOut method in CCash is as follows: The whole user withdraw is being handled with a token.transfer call. This is unsafe as transfer has hard...

6.7AI score
SaveExploits0
Code423n4
Code423n4
added 2023/01/17 12:00 a.m.16 views

Unbounded Chainlink oracle time delay vulnerability

Lines of code Vulnerability details Summary The contract OndoPriceOracleV2 allows for the owner to set an association between an fToken and a Chainlink oracle for price retrieval. The contract also allows the owner to set a maxmum amount of time delay that it will tolerate from all Chainlink...

6.7AI score
SaveExploits0
Code423n4
Code423n4
added 2023/01/17 12:00 a.m.16 views

Potential DOS in utilizationRate() function

Lines of code Vulnerability details Potential DOS IN UTILIZATIONRATE utilizationrate = borrows / cash + borrows - reserves. if cash+ borrows = reserves this goes to infinity so that utilizationrate reverts. Also if cash + borrows Tools Used Vs code Recommended Mitigation Steps Define...

6.8AI score
SaveExploits0
Code423n4
Code423n4
added 2023/01/17 12:00 a.m.16 views

Values in redemptions do not match, and fees are being overcharged

Lines of code Vulnerability details Impact The amount of collateral to distribute collateralAmountToDist does not need to match the sum of fees actually distributed the sum of collateralAmountDue in the events of processRedemption. The real distributed amount can be smaller. However, the fees are...

6.9AI score
SaveExploits0
Code423n4
Code423n4
added 2023/01/17 12:00 a.m.16 views

Anyone can be refunded; no input validation

Lines of code Vulnerability details Impact The method for processing refunds has no input validation. If Bob burns 100 CASH and Alice burns 1 CASH, and the manager wants to refund Alice and pay out Bob, they are able to swap the refund parameters. This would result in Alice getting the entire...

6.8AI score
SaveExploits0
Code423n4
Code423n4
added 2023/01/09 12:00 a.m.16 views

SmartAccount wallet creation can be backdoored

Lines of code Vulnerability details At wallet creation time, an attacker can temporarily swap the address of the entrypoint to install a backdoor in the form of a registered module in the wallet. Since wallets don't necessarily need to be created by their owners, an attacker can frontrun the wall...

7.7AI score
SaveExploits0
Code423n4
Code423n4
added 2023/01/09 12:00 a.m.16 views

Frontrunning of smart wallet deployment

Lines of code Vulnerability details Impact Detailed description of the impact of this finding. An attacker could obtain information about the owner and 'index' parameters to front-run the deployment of a smart wallet. Proof of Concept Provide direct links to all referenced code in GitHub. Add...

6.7AI score
SaveExploits0
Code423n4
Code423n4
added 2023/01/08 12:00 a.m.16 views

Upgraded Q -> M from #216 [1673172689834]

Judge has assessed an item in Issue 216 as M risk. The relevant finding follows: Last collateral check is not safe --- The text was updated successfully, but these errors were encountered: All reactions...

7AI score
SaveExploits0
Code423n4
Code423n4
added 2023/01/03 12:00 a.m.16 views

Increase in ERC4626 shares due to inflation

Lines of code Vulnerability details Impact Detailed description of the impact of this finding. A bad actor can exploit the Vault by depositing a small amount of asset tokens 1 wei and receiving 1 wei of shares tokens. The attacker can then send a large amount of asset tokens 10000e18 - 1 to infla...

7AI score
SaveExploits0
Code423n4
Code423n4
added 2023/01/03 12:00 a.m.16 views

getStakers() and getMinipools() could return wrong values (Access Control)

Lines of code Vulnerability details Impact Staking.sol and MinipoolManager.sol contracts use the eternal storage pattern. The contracts are a key-value store that all protocol contracts can write to and read. more info: Functions getStakers.staking and getMinipools.MinipoolManager are implemented...

7.3AI score
SaveExploits0
Code423n4
Code423n4
added 2023/01/03 12:00 a.m.16 views

Funds of Node Operators can be nullified by any attacker

Lines of code Vulnerability details Impact The MinipoolManager.createMinipool function do not validate the caller's address due to which any address can invoke the createMinipool function with any nodeID existing or new as input. For any existing nodeID the function can be invoked as long as the...

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

Grief on transfers due to vestingStart during vesting

Lines of code Vulnerability details Impact Past similar finding with the same severity: code-423n4/2022-05-runes-findings30 While centralization risk is acknowledged by the team & the C4udit tool: this may lead to loss of functionality grief. Proof of concept There is no requirement for the start...

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

PaprController.removeCollateral() only takes the price of the first collateral to determine whether the NFTs can be withdrawn

Lines of code Vulnerability details Impact Unintended leniency of protocol will be taken advantage by users. Users can withdraw NFTs even if their debt of a particular NFT is higher than intended. Proof of Concept When a user wants to removeCollateral, he calls removeCollateral which loops each...

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

Contract owner can drain all NFT collateral

Lines of code Vulnerability details Impact To add NFTs as collateral to the protocol and it to create debt, the owner has to approve each NFT contract address first. As anyone can create their own papr vaults with arbitrary allowed NFTs by design, this opens the possibility for malicious actors t...

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

Signature mallebaility in underwritePriceForCollateral

Lines of code Vulnerability details Impact underwritePriceForCollateral has signature malleability as it doesn't check for a returned address of not 0. Value can be set to 0 oracleSigner Proof of Concept function underwritePriceForCollateralERC721 asset, PriceKind priceKind, OracleInfo memory...

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

Early NFT collections such as CryptoPunks and MoonCats can not be used as a collateral

Lines of code Vulnerability details Impact Early NFT collections such as CryptoPunks, EtherRocks and MoonCats are not compliant with ERC721 standard. therefore, they can not be used as a collateral since transferring will fail. I beleive it would be a huge advantage for the protocol to support su...

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

Borrowers may earn auction proceeds without filling the debt shortfall

Lines of code Vulnerability details Impact The proceeds from the collateral auctions will not be used to fill the debt shortfall, but be transferred directly to the borrower. Proof of Concept Assume N is an allowed NFT, B is a borrower, the vault V is vaultInfoBN: 1. B add two NFTsN-1 and N-2 as...

6.9AI score
SaveExploits0
Code423n4
Code423n4
added 2022/12/19 12:00 a.m.16 views

[M-0] Unhandled return values of transfer

Lines of code Vulnerability details c4udit Report Issues found M-0 Unhandled return values of transfer Impact Some implementations of transfer could return ‘false’ on failure instead of reverting. Findings: src\Pair.sol::85 = transferFrommsg.sender, addressthis, fractionalTokenAmount;...

6.8AI score
SaveExploits0
Code423n4
Code423n4
added 2022/12/19 12:00 a.m.16 views

PRICES CAN BE MANIPULATED WHEN LIQUIDITY IS VERY LOW

Lines of code Vulnerability details Impact Base and fractional token prices in the pool can be manipulated and set to values severely deviating from the originally intended price ratio right after the pool has been created. At this point, liquidity in the pool is deemed zero or exceptionally thin...

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

Unlimited minting of fractional tokens by calling Pair.wrap() multiple times

Lines of code Vulnerability details Impact User can mint an unlimited amount of fractional tokens and break the protocol by selling the tokens. Proof of Concept NFTs can be traded for 1e18 fractional tokens by calling the function wrap. Wrap calls validateTokenIdstokenIds, proofs which in turn ru...

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

Users that send funds at a price lower than the current low bid have the funds locked

Lines of code Vulnerability details If a user contributes funds after there is no more supply left, and they don't provide a price higher than the current minimum bid, they will be unable to withdraw their funds while the NFT remains unbought. Impact Ether becomes stuck until and unless the NFT i...

6.5AI score
SaveExploits0
Code423n4
Code423n4
added 2022/12/18 12:00 a.m.16 views

OptimisticListingSeaport.propose sets pendingBalances of newly added proposer instead of previous one

Lines of code Vulnerability details Impact In OptimisticListingSeaport.propose, pendingBalances is set to the collateral. The purpose of this is that the proposer of a previous proposal can withdraw his collateral afterwards. However, this is done on the storage variable proposedListing after the...

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

After the redrawing the winner can lose his NFT for the Admin

Lines of code Vulnerability details Impact The owner can manipulate the raffle by deprivation of a specific address winner Proof of Concept Please copy the following POC on VRFNFTRandomDraw.t.sol function testadminRedrawingandReclaimnft public address winner = address0x1337; address winner2 =...

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

Malicious ChainLink's VRF manager can decide to not whitelist VRFNFTRandomDraw or brick ongoing raffles

Lines of code Vulnerability details Impact ChainLinks VRF manager has priviledged position, as all VRFNFTRandomDraw instances share the same VRFCoordinatorV2 address, and have to be whitelisted in order to be able to send requestRandomWords function. There is centralization risk in this case, tha...

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

Governance NFT holder, whose NFT was minted before Trading._handleOpenFees function is called, can lose deserved rewards after Trading._handleOpenFees function is called

Lines of code Vulnerability details Impact Calling the following Trading.handleOpenFees function does not approve the GovNFT contract for spending any of the Trading contract's tigAsset balance, which is unlike calling the Trading.handleCloseFees function below that executes...

7.1AI score
SaveExploits0
Code423n4
Code423n4
added 2022/12/16 12:00 a.m.16 views

Wrong update of stoploss in TradingExtension._limitClose()

Lines of code Vulnerability details Impact TradingExtension.limitClose returns a wrong stoploss which is favorable for users and it would be a significant loss for the protocol. Proof of Concept TradingExtension.limitClose is used to set takeprofit/stoploss prices for the pending order and execut...

6.9AI score
SaveExploits0
Code423n4
Code423n4
added 2022/12/16 12:00 a.m.16 views

Chainlink price feed is not sufficiently validated and can return stale price

Lines of code Vulnerability details Impact As mentioned by , "Prices provided by the oracle network are also compared to Chainlink's public price feeds for additional security. If prices have more than a 2% difference the transaction is reverted." The Chainlink price verification logic in the...

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

Distribute is open to rewards manipulation

Lines of code Vulnerability details Impact The distribute function is prone to manipulation by the first depositor if the totalShares is low, since the result of transferFrom in distribute is not checked. This can happen if a malicious user calls createLock whereby shares = 1 then calls distribut...

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

Attacker can make any function that relies on _satisfiesScoreRequirement reverts

Lines of code Vulnerability details Impact The NFTScoreRequirement contract have a function that checks the user score which diff it with the requiredScore variable, if it's higher then the function will continues, however the function that sets the requiredScore variable is made public with no...

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

A finding that cannot be disclosed at the moment

Lines of code Vulnerability details This finding couldn't be disclosed at the time when the contest was running. After consulting with CloudEllie, it was decided to create a stub report so the finding could be submitted after the contest is over. A checksum of the report:...

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

In WithdrawHook.hook(), withdraw limits can be bypassed.

Lines of code Vulnerability details Impact In WithdrawHook.hook, withdraw limits can be bypassed. As a result, users might withdraw more amount of the base token at a time than they should. Proof of Concept WithdrawHook.hook checks the withdraw limits like below. if lastGlobalPeriodReset +...

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

Value can be extracted from LPs

Lines of code Vulnerability details Impact Maverick allow liquidity to be moved based on TWAP to increase capital efficiency. However, the increased capital efficiency is not free. Consider a "right" move, the LP sell at lower price and move their liquidity to higher price, thus buying at higher...

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

Users can lose funds if they call buy with _amount larger than type(uint48).max.

Lines of code Vulnerability details Impact The function buy take amount of type uint256 as input. amount is used to check if msg.value is correct depending on the sale price as follows: requireamount sale.price == msg.value, "WRONG PRICE"; but is not casted to uint48 as done to calculate the newI...

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

NFTs mintable after Auction deadline expires

Lines of code Vulnerability details Impact The buy function on the LPDA.sol contract is not validating if the auction is still running, allowing a purchase to be made after the stipulated time. The endtime variable used to store the end date of the auction is not used at any point to validate...

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

Deposits and compounds will be frozen after a PirexGmx migration

Lines of code Vulnerability details Impact After a migration of the platform PirexGmx contract, the approval of the AutoPxGlp from the new PirexGmx contract will be zero. The same issue is here for the AutoPxGmx contract. Proof of Concept Even though the approval of gmxBaseReward formerly WETH fo...

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

NameWrapper: Wrapped to Unregistered to ignore PARENT_CANNOT_CONTROL

Lines of code Vulnerability details Impact owner of a wrapped node without CANNOTUNWRAP fuse can unwrap and set the ens.ownernode to zero to be an unregistered state if it happens, even if the node has PARENTCANNOTCONTROL fuse, the parent of the node can change the NameWrappwer.owner of the node...

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

Need to check the _mint() status before increment the token count .

Lines of code Vulnerability details Impact Its possible to increase the tokenIdTracker even mint function failed. The mint status must be checked before increment tokenIdTracker value . Proof of Concept function registeraddress recipient public onlyUnregistered returns uint256 tokenId address...

6.9AI score
SaveExploits0
Code423n4
Code423n4
added 2022/11/26 12:00 a.m.16 views

The check for msg.value in distributeFees is unnecessary and may cause error

Lines of code Vulnerability details Impact Transactions may fail because of this redundant check. Proof of Concept The function distributeFees will revert if msg.value == 0: function distributeFeesuint256 tokenId public onlyOwner payable if msg.value == 0 revert NothingToDistribute; balancestoken...

6.8AI score
SaveExploits0
Total number of security vulnerabilities5000