10190 matches found
call() should be used instead of transfer() on an address payable
Lines of code Vulnerability details Impact call should be used instead of transfer on an address payable Proof of Concept The use of the deprecated transfer function for an address will inevitably make the transaction fail when: 1. The claimer smart contract does not implement a payable function...
Pausing assets only affects future price updates, not previous malicious updates.
Lines of code Vulnerability details Description NFTFloorOracle retrieves ERC721 prices for ParaSpace. It is pausable by admin on a per asset level using setPauseasset, flag. setPrice will not be callable when asset is paused: function setPriceaddress asset, uint256 twap public onlyRoleUPDATERROLE...
There isn't an end time on FixedPrice and LPDA sales, and the sale can't be canceled after the sale start.
Lines of code Vulnerability details Impact The sale can't be canceled after the sale start. Moreover, the sale won't end, which contradict the fact that typical NFT sales nowadays have an end time. Even your OpenEdition have an end time. Proof of Concept struct Sale // slot 1 uint48 currentId;...
LAST PRICE DUTCH AUCTION SALE (LPDA) CAN BE EXPLOITED
Lines of code Vulnerability details Impact The function logic of buy in LPDA.sol can be exploited by shrewd buyers to achieve the lowest finalPrice possible. Proof of Concept LPDA.solL58-L89 function buyuint256 amount external payable uint48 amount = uint48amount; Sale memory temp = sale;...
Loss of ETH for NFT buyers in LPDA contract
Lines of code Vulnerability details Impact The buy function of LPDA sale contract can be invoked with 0 as the input value and 0 ETH as the sent valuemsg.value = 0. The buy function automatically ends the sale when newId == sale.finalId and distributes ETH to feeReceiver and saleReceiver. Since t...
Not possible to finish LPDA after endTime
Lines of code Vulnerability details Vulnerability details The only way to finish the sale is when newId == temp.finalId, making not possible to finish LPDA even if the endTime is already over POC There isn't any function to finalize the LPDA sale even if already finished the sale, the only way to...
Bad debt will likely incur when multiple NFTs are liquidated.
Lines of code Vulnerability details Description getUserBalanceForERC721 in GenericLogic gets the value of a user's specific ERC721 xToken. It is later used for determining the account's health factor. In case isAtomicPrice is false such as in ape NTokens, price is calculated using: uint256...
Discrepency in the Uniswap V3 position price calculation because of decimals
Lines of code Vulnerability details Impact When the squared root of the Uniswap V3 position is calculated from the getOracleData function, the price may return a very high number in the case that the token1 decimals are strictly superior to the token0 decimals. See: The reason is that at the...
Attacker can drain pool using executeBuyWithCredit with malicious marketplace payload.
Lines of code Vulnerability details Description Paraspace supports leveraged purchases of NFTs through PoolMarketplace entry points. User calls buyWithCredit with marketplace, calldata to be sent to marketplace, and how many tokens to borrow. function buyWithCredit bytes32 marketplaceId, bytes...
WPunk will become locked if liquidator ops to receive the underlying token instead of nToken
Lines of code Vulnerability details Impact WPunks received directly as the result of liquidation will be unable to be withdrawn Proof of Concept function withdrawPunkuint256 calldata punkIndexes, address to external nonReentrant INToken nWPunk = INToken Pool.getReserveDataaddressWPunk.xTokenAddre...
Ownership of EscherERC721.sol contracts can be changed, thus creator roles become useless
Lines of code Vulnerability details Impact creator = has a CREATORROLE in Escher.sol non-creator = doesn't have a CREATORROLE in Escher.sol Currently creating an ERC721 edition via the Escher721Factory.sol contract requires a user to have the CREATORROLE in the main Escher.sol contract. This...
The buy() function on Last Price Dutch Auction Sale doesn't check if auction ended, may lead to user loss asset
Lines of code Vulnerability details Impact The buy function on Last Price Dutch Auction Sale doesn't check if auction is ended, may lead to user loss asset if user call with amount 0 with msg.value 0 Proof of Concept Ideally if the max id finalId is reached, then the auction will end, so no user...
Compromised admin can instantly take all NFTs held in NToken contracts
Lines of code Vulnerability details Description executeAirdrop is a function admin may call in order to collect airdrops for NFTs held in ParaSpace's nToken contract. function executeAirdrop address airdropContract, bytes calldata airdropParams external override onlyPoolAdmin require...
Implementing Security Restrictions and Owner Access Controls on LPDA Smart Contract.
Lines of code Vulnerability details Vulnerability details Impact The new changes to the contract add an additional layer of security and restrict access to certain privileged functions. The buy function now requires that only the owner can purchase tokens, which prevents malicious actors from...
NFTFloorOracle trust feeder without any fallback
Lines of code Vulnerability details Impact In the current design, NFTFloorOracle take the median of valid feeder price as the oracle price. This design can be dangerous if more than half as few as 2 of the feeders decided to collude and publish malicious prices. If they set the price higher, they...
LPDA refund logic is broken, meaning buyers always get lowest price sale
Lines of code Vulnerability details Impact The protocol intends the LPDA to refunds buyers with the difference between the price they paid and the last sale price Once the sale has ended, the users must call refund to get their Ether refunds based on their purchase price and lowest sale price 99:...
Missing ReEntrancy Guard to executeAcceptBidWithCredit function
Lines of code Vulnerability details Impact if the mint was initiated by a contract, then the contract is checked for its ability to receive ERC721 tokens. Without reentrancy guard, onERC721Received will allow an attacker controlled contract to call the mint again, which may not be desirable to so...
underflow in the getPrice() function can block the buy and refund in the LPDA sale
Lines of code Vulnerability details Impact In the LPDA sale the price decrease in values after each second, and when creating the sale the value of the lowest price possible is not checked, so the price could go below zero at a given timestamp which will lead to an underflow in the getPrice...
Missing access control in NFTFloorOracle::removeFeeder
Lines of code Vulnerability details Proof of Concept THe removeFeeder method is lacking onlyRoleDEFAULTADMINROLE modifier, even though the NatSpec states āAllows owner to remove feederā. Due to this, now everyone can remove a feeder anytime. Different types of attack can be executed, one of which...
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...
Users will get a low amount of NFT if they try to buy a lot of them
Lines of code Vulnerability details Impact If user calls buyamount with a value larger than uint48 it will overflow during casting identical to amount = amount % typeuint48.max and cause unexpected behavior for the user. When a user pays a lot of money for a large amount of NFT, but instead they...
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...
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 ==...
Oracle will become invalid much faster than intended on non-mainnet chains
Lines of code Vulnerability details Description NFTFloorOracle is in charge of answering price queries for ERC721 assets. EXPIRATIONPERIOD constant is the max amount of blocks allowed to have passed for the reading to be considered up to date: uint256 diffBlock = currentBlock - priceInfo.updatedA...
Buys and refunds can get stuck forever if the parameters are not set sensibly in the LPDA
Lines of code Vulnerability details Impact In the LPDA contract, there is a function called getPrice which returns the price of one token by taking into account the drop in price per second of the Dutch auction. It basically calculates how much time was elapsed since the start of the sale, to...
Dangerous casting from i256 to u256 of the price returned by the Chainlink oracle
Lines of code Vulnerability details Impact Referring to the docs, Chainlink oracles are returning the price as an int256, which means that the answer can be a negative price. Later, this price is casted as an uint256 in the case of an oracle that is set, which overflows when price 0. Any price...
Possible malicious _uri in initialize() of Escher721.sol
Lines of code Vulnerability details Impact Loss of user funds if user approves malicious transaction Description Trace: createContract of Escher721.Factory.sol calls initialize of Escher721.sol The initialize function sets tokenUriDelegate to the passed in uri address. There's no input validation...
MarketplaceLogic.sol doesn't support ERC20 Tokens with fee on transfer
Lines of code Vulnerability details MarketplaceLogic.sol doesn't support ERC20 Tokens with fee on transfer Summary There are ERC20 tokens with transfer at fees. For checking if the transferred amount is the same as expected, code already compares balanceOf before and balanceOf after transfer...
[NAZ-H1] Anyone Can Call removeFeeder()
Lines of code Vulnerability details Impact Currently anyone can call removeFeeder which can cause an ample amount of issues across the protocol. It is also stated in the NatSpec: Allows owner to remove feeder. Proof of Concept Anyone can remove a feeder and only the admin should be able to remove...
Dutch auction getPrice() formula can lead to price reaching 0 and eventually reverting and locking the function.
Lines of code Vulnerability details Impact In the function getPrice the current price is calculated by taking the start price and subtracting the product of dropPersecond and time elapsed. start price - dropPreSecond timeElapsed. The issue with this is that given the right inputs for dropPerSecon...
Denial of Service on the LPDA.sol contract due to incorrect validation of parameters.
Lines of code Vulnerability details Impact The impact is that the contract will be on Denial Of Service, not allowing anyone to get ether out, neither the creator or people via refund. Proof of Concept The functions buyuint256 amount and refund of the LPDA.sol contract both call the function...
Lack of verification for _uri parameter in createContract() function in Escher721Factory contract
Lines of code Vulnerability details Impact The impact of this vulnerability is that an attacker could potentially manipulate the token URI for any given token ID in the Escher721 contract created by the Escher721Factory contract. This could potentially allow the attacker to trick users into...
Possible negative price on LPDA causes sale and refund mechanism to not working
Lines of code Vulnerability details Impact Possible negative price on LPDA causes sale and refund mechanism to not working Proof of Concept function getPrice public view returns uint256 Sale memory temp = sale; uint256 start, uint256 end = temp.startTime, temp.endTime; if block.timestamp...
Use of payable.transfer() may lock user funds
Lines of code Vulnerability details Impact The use of payable.transfer is heavily frowned upon because it can lead to the locking of funds. The transfer call requires that the recipient has a payable callback, only provides 2300 gas for its operation. This means the following cases can cause the...
The LPDA will keep minting NFTs after the endTime
Lines of code Vulnerability details Impact The users would keep minting from LPDA even if the end time was reached Proof of Concept Please copy the following test on LPDA.t.sol import IEscher721 from "../src/interfaces/IEscher721.sol"; function testRevertsWhenEndedBuy public testBuy; // the testB...
wrong configuration can lock eth in LPDA contract forever
Lines of code Vulnerability details When creating an LPDA auction there are some sanity checks of the values used for the auction. But there is no check that the auction will not cause the price calculation to underflow after a while. This calculation of the price can underflow in getPrice in...
LPDA can be initialized with parameters that will revert getPrice()
Lines of code Vulnerability details Impact LPDA Sales can start reverting the buy and refund functions at some point of time if initialized with incorrect parameters revert happens at getPrice function. Users might not be able to withdraw their excess balance using refund function if getPrice...
overflow in buy function
Lines of code Vulnerability details Impact the function doesn't check if the input is more the supply Proof of Concept the function doesn't have any condition check of amount Tools Used manually Recommended Mitigation Steps check the input for maximum or requirement for max supply --- The text wa...
Funds reserved for refunding users can be steal in LPDA sale
Lines of code Vulnerability details Impact LPDA sale works like a Dutch Auction, where early buyers will get refund after the sale ended. In addition, in buy function, when last NFT is saled, it is automatically ending the LPDA sale and send payments to sale receiver, fee to fee receiver. And the...
Use of payable.transfer() may lock user funds
Lines of code Vulnerability details Impact The use of payable.transfer is heavily frowned upon because it can lead to the locking of funds. The transfer call requires that the recipient has a payable callback, only provides 2300 gas for its operation. This means the following cases can cause the...
PoolApeStaking#withdrawApeCoin compares health factor to incorrect value and allows user to take out large loans that expected
Lines of code Vulnerability details Impact BAYC, MAYC and BAKC can be leveraged past max LTV and up to the liquidation factor Proof of Concept function withdrawApeCoin address nftAsset, ApeCoinStaking.SingleNft calldata nfts external nonReentrant DataTypes.PoolStorage storage ps = poolStorage;...
overflow in buy function
Lines of code Vulnerability details Impact the function doesn't check if the input is more the supply Proof of Concept the function doesn't have any condition check of amount Tools Used manually Recommended Mitigation Steps check the input for maximum or requirement for max supply --- The text wa...
Some arbitrary feeders will not be removable, even by admin.
Lines of code Vulnerability details Description NFTFloorOracle receives data from different "feeders". They are added using addFeeders and removed by removeFeeder. Feeders are managed by two data structures. feeders is an array, each element in the address of the feeder. feederPositionMap maps...
Buy can be executed after sale end
Lines of code Vulnerability details Impact In LPDA.sol buy function when all tokens are minted, the final price is set and the ether from the sale and fee is sent to the saleReceiver and feeReceiver addresses. Since there is no check to validate if sale has ended the function can be executed with...
NFTFloorOracle's asset and feeder structures can be corrupted
Lines of code Vulnerability details NFTFloorOracle's addAsset and addFeeder truncate the assets and feeders arrays indices to 255, both using uint8 index field in the corresponding structures and performing uint8assets.length - 1 truncation on the new element addition. 2^8 - 1 looks to be too tig...
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...
User can pass auction recovery health check easily with flashloan
Lines of code Vulnerability details Description ParaSpace features an auction mechanism to liquidate user's NFT holdings and receive fair value. User has the option, before liquidation actually happens but after auction started, to top up their account to above recovery factor 1.5 instead of 1 an...
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...
Downcast can lead to overflow and impact the functionality to remove an asset in NFTFloorOracle
Lines of code Vulnerability details Impact When adding a new asset, the index for the last asset will be saved and downcasted on L284. If the number of assets is bigger than 256, the downcasting operation will lead to a silent overflow. Consequentially, the incorrect index will be stored. This ca...
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...