The smart contracts use the ERC20 transfer and transferFrom functions without checking their return values. Some tokens return false instead of reverting on failure, so a failed transfer could go unnoticed, potentially leading to loss of funds.
A malicious fee receiver contract can revert when its receiveRewards function is called, causing the distribute function to fail and block fee distribution. This denial of service affects all fee receivers until the malicious receiver is removed.
The transferFromERC721 function in NFTXStakingZap and NFTXMarketplaceZap sends Cryptokitties NFTs to the contract itself instead of the intended recipient. This causes the NFT to be missing from the vault, leading to incorrect accounting.
The NFTXInventoryStaking contract distributes rewards in a single lump when the owner calls receiveRewards, so an attacker can front-run that transaction with a deposit and receive a share of the rewards. After a short lock period, the attacker withdraws the deposit and rewards for a profit.
The owner can change the vault factory address in several helper contracts without any restriction, but the new factory would not have the existing vault and asset data. An owner mistake or malicious action could therefore break the system by pointing these contracts at an empty factory.
The pool manager can change the entry fee to 100% just before a user deposits, causing the user to lose their entire deposit as fees. The manager can then use the collected fees to withdraw the pool's NFTs.
The _sendForReceiver function only returns a value in its if branch, so when a receiver has isContract set to false the function implicitly returns false. The distribute function then treats this as a failure and sends the remaining token balance to the treasury instead of the receiver.
The buyAndSwap1155WETH function passes msg.value (which is zero) instead of the user-supplied maxWethIn to the internal _buyVaultToken call, so the swap fails. If a user mistakenly sends both ETH and WETH, the ETH becomes locked in the contract, causing asset loss.
The marketplace and staking zap contracts check that their vToken balance equals the expected amount after minting, but any user can send vTokens directly to these contracts, causing the check to fail. This makes the vault functionality unavailable for all users on the marketplace.
The addReceiver function does not check whether a receiver address already exists, allowing the same receiver to be added multiple times. This could cause that receiver to receive more fees than intended until the duplicate is removed.
The timelock mint function overwrites an existing longer timelock with a shorter one because it always sets the finish time to the current block timestamp plus the new timelock length. An attacker could reduce a seven-day timelock to two milliseconds by calling deposit in NFTXInventoryStaking.
The buyAndSwap1155WETH function incorrectly uses msg.value instead of maxWethIn when calling _buyVaultToken, so it only works if the user sends both WETH and native ETH equal to maxWethIn. This causes the function to fail for normal users who only supply WETH.
The assignFees() function in the NFTXVaultFactoryUpgradeable contract lacks access control, allowing any user to call it and update all fees. If the vault owner sets factoryMintFee and factoryRandomRedeemFee to zero, an attacker could change these fees.
The _sendForReceiver function does not return a value when the receiver is not a contract, so it defaults to false. This causes the distribute function to believe the fee transfer failed and to carry over the amount, resulting in the receiver getting more fees than intended.
Many public and external functions in the NFTX contracts lack the nonReentrant modifier that other functions use. The author did not find an exploit, but the judge raised severity because reentrancy is a real risk even without a demonstrated attack path.
The approve function in xToken contracts was not overridden, so allowances were denominated in shares rather than the equivalent rebalanced vault token amount. As rewards accrued, the approved spender could transfer more underlying tokens than the approver intended.
The NFTXStakingZap.addLiquidity721ETHTo function makes a low-level call to refund excess ETH but does not check whether the call succeeded. If the refund call fails, the caller loses the refunded amount.
The fee distribution function does not return success when a receiver is not a contract, causing the same fee amount to be sent twice to consecutive receivers. This leads to double payments for some receivers and missed payments for others.
The deposit function in NFTXInventoryStaking allows a user to deposit vault tokens just before a reward distribution and withdraw immediately after, capturing a disproportionate share of rewards. An attacker can also trigger reward distribution at will because the distribute function lacks access control.
The LPStaking contract does not lock stakes or track staking duration, so an attacker can use a flash loan to stake a large amount, claim nearly all accrued rewards, and unstake in one transaction. This leaves legitimate stakers with very little reward.
The contract uses transfer/transferFrom without checking return values in three places, which can cause silent failures of token transfers and affect token accounting. An attacker could exploit this to cause incorrect accounting or loss of funds.
The `distribute` function in `NFTXFeeDistributor` lacks access control and calls a fallback on fee receivers, allowing a malicious receiver to re-enter and repeatedly claim its allocation, potentially draining the contract's balance and leaving other recipients with zero.
The NFT redemption process used on-chain randomness (nonce and blockhash) to select which NFT a user receives, but a user could repeatedly call the redeem function from a contract and revert if the returned NFT was not the desired one, effectively brute-forcing the randomness. This allowed users to obtain specific NFTs rather than a random one, subverting the intended random distribution.
The random token selection function for ERC1155 vaults ignores the quantity of each token deposited, giving each token ID an equal chance instead of weighting by quantity. An attacker could exploit this to preferentially redeem more valuable NFTs.
The random NFT selection during redemption occurs in the same transaction, allowing an attacker to revert if they do not receive the desired NFT. By using Flashbots, they can avoid paying fees for reverted transactions, thereby bypassing the direct redeem fee and potentially reducing earnings for other users.
The fee setter in the NFTX vault contract allows the manager to set fees arbitrarily high, with no upper limit. A manager can front-run a user's mint and set a huge fee so the user's NFTs are transferred to the vault but no pool share tokens are minted in return.
The flashLoan function in ERC20FlashMintUpgradeable lacks an overflow check when adding the fee to the loan amount, allowing an attacker to burn zero tokens and avoid repayment. This could lead to a huge profit if the fee is non-zero.
The distribute function in NFTXEligiblityManager iterates over all fee receivers, so if the number of fee receivers becomes too large, the gas cost of the transaction could exceed the block gas limit, making the function uncallable.
NC
NFTX contest
Medium
Instant results are busy. Press Enter to search every report.
No direct matches. Search every report above, or try a bug class like IDOR or SSRF.