1046 matches found
Missing modifiers in the functions of several parent contracts
Lines of code Vulnerability details Impact The value can be set by everyone Proof of Concept All these functions can be overridden by the child contracts. If all these functions are called from the child contracts, there are modifiers restricting everyone to call the functions. However, all these...
Infinite approval given to DepositTradeHelper contract can be misused by malicious actors
Lines of code Vulnerability details Impact depositAndTrade function in DepositTradeHelper account has infinite approval to spend baseTokens & collateralTokens of user using offChain signatures. However, once swapRouter executes UniV3 swap transaction on line 33, the contract does not give up its...
Long and short tokens can continue to be minted even after expiry
Lines of code Vulnerability details Impact Users can mint after expiry but before the final price has been set Proof of Concept function mintuint256 amount external override nonReentrant returns uint256 requirefinalLongPayout MAXPAYOUT, "Market ended"; requirecollateral.balanceOfmsg.sender =...
Redeem should revert if the TokenSender.sol doesn’t have enough outputtoken to reimburse to users.
Lines of code https://github.com/prepo-io/prepo-monorepo/blob/49a7ed94272db013245d9364e69be713a8aef0a2/apps/smart-contracts/core/contracts/TokenSender.solL41 Vulnerability details According to the comments in the code of RedeemHook.hook function : Once a market has ended, users can directly settl...
function mint() in PrePOMarket shouldn't accept deposits after expiryTime of Market
Lines of code Vulnerability details Impact Function mint Mints Long and Short tokens in exchange for amount collateral and according to the comment in the IPrePOMarket: "Minting is not allowed after the market has ended." but there is no check or restriction in the code that to make sure minting ...
limits are not correctly enforced in withdrawHook contract
Lines of code Vulnerability details Impact withdrawHook contract checks that inside a specified length of time only certain amount of withdrawal are possible per user and globally. But on every period reset the allowed withdraw limit check is missing. And a user can withdraw more that is allowed...
Update initializer library to prevent reentrancy during initialization
Lines of code Vulnerability details Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an external initializer function, usually called initialize. It then becomes necessary to protect this initializer function so it can only be called once. The...
Sale contracts use address.transfer method
Lines of code Vulnerability details Impact The FixedPrice, LPDA & OpenEdition contracts uses payableaddress.transfer method to send ETH which is unsafe. EIP1884 increases the gas cost certain opcodes, possibly making contracts go over the 2300 gas limit by transfer, making them unable to receive...
MintableIncentivizedERC721 incorrectly implements safe transfers
Lines of code Vulnerability details Impact MintableIncentivizedERC721 incorrectly implements safeTransfer and safeTransferFrom by simply replicating the unsafe transfer/transferFrom function. Raising as medium because as a consequence of this, these ERC721 tokens may end up locked in contracts th...
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...
DoS on relayCalls when the nonce variable reach type(uint256).max
Lines of code Vulnerability details Impact Denial of service on relayCalls functions when the nonce variable reach typeuint256.max Proof of Concept When the smart contracts start to be used, the variable in storage nonce will start to increment by 1, and since the nonce variable cannot be...
There is no re-register o re-assign function
Lines of code Vulnerability details Impact There is no re-register or re-assign option for the smart contracts. Let's assume a smart contract is registered either through the register function with a new NFT minted or the assign function to an existing NFT. However, if somehow, the NFT is burned ...
PostTxProcessing can revert user transactions not interacting with Turnstile
Lines of code Vulnerability details Impact Any transaction, even those that don't interact with the Turnstile contract, can be reverted by the PostTxProcessing hook if there was a CSR specific error. Thus, the CSR module can impair the behavior of smart contracts not related to the module. Proof ...
Use of transfer() instead of call() to send eth
Lines of code Vulnerability details Use of transfer instead of call to send eth Impact Use of transfer might render ETH impossible to withdraw because after istanbul hardfork, there is increases in the gas cost of the SLOAD operation and therefore breaks some existing smart contracts. Those...
EOAs and system contracts can be blocked from some actions by continuously transferring them zero LP tokens
Lines of code Vulnerability details Impact LPToken contains the map lastInteractedTimestamp which maps addresses to timestamps and is updated for from and to addresses after a token transfer. Many operations will check the last interaction time of an address and revert if it's too recent to comba...
bringUnusedETHBackIntoGiantPool in GiantMevAndFeesPool can be used to steal LPTokens
Lines of code Vulnerability details Impact real LPTokens can be transferred out of GiantMevAndFeesPool through fake stakingFundsVaults provided by an attacker. Proof of Concept bringUnusedETHBackIntoGiantPool takes in stakingFundsVaults, oldLPTokens, newLPTokens and rotate amounts from old to new...
batchRotateLPTokens in GiantMevAndFeesPool can be used to steal LPTokens
Lines of code Vulnerability details Impact real LPTokens can be transferred out of GiantMevAndFeesPool through fake stakingFundsVaults provided by an attacker. Proof of Concept batchRotateLPTokens takes in stakingFundsVaults, oldLPTokens, newLPTokens and rotate amounts from old to new tokens. The...
We Need Smarter Smart Contracts To Prevent DeFi Hacks
By Waqas The smart contracts that govern DeFi are littered with exploitable code, and hackers understand that since hundreds of millions of crypto funds have been siphoned off due to this very issue. This is a post from HackRead.com Read the original post: We Need Smarter Smart Contracts To Preve...
User funds(ETHs) sent along with bulkExecute tx may be stolen by a reentry attack
Lines of code Vulnerability details Impact The funds ETH that users sent along with the bulkExecute may be stolen. Proof of Concept When a buyer send a bulkExecute tx with msg.value 0 with order of buying token with eth, the sent ETH may be stolen if the tx contains a malicious selling order whic...
State varaible marketplace has never been initialized in LooksRareProxy.sol
Lines of code Vulnerability details Impact Detailed description of the impact of this finding. State varaible marketplace has never been initialized in LooksRareProxy.sol. Although it has been initialized in the constructor, it won't count since functions such as execute will only be called via...