A vault can be locked from MarketplaceZap and StakingZap
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.
Submitted by p4st13r4, also found by cmichel, GreyArt, hyh, jayjonah8, leastwood, pauliax, shenwilly, and WatchPug
Any user that owns a vToken of a particular vault can lock the functionalities of NFTXMarketplaceZap.sol and NFTXStakingZap.sol for everyone.
Every operation performed by the marketplace, that deals with vToken minting, performs this check:
require(balance == IERC20Upgradeable(vault).balanceOf(address(this)), "Did not receive expected balance");
A malicious user could transfer any amount > 0 of a vault’vToken to the marketplace (or staking) zap contracts, thus making the vault functionality unavailable for every user on the marketplace
Proof of Concept
Recommended Mitigation Steps
Remove this logic from the marketplace and staking zap contracts, and add it to the vaults (if necessary)
0xKiwi (NFTX) confirmed, but disagreed with high severity and commented:
Valid concern, confirmed. And disagreeing with severity.
In this case I agree with the warden’s severity. The attack would cause user funds to be locked and is incredibly easy to perform.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
The marketplace and staking zap contracts rely on their own vToken balance to verify minting, but that balance can be inflated by anyone sending tokens directly.
Impact
The attack could lock user funds and make the vault functionality unavailable for all users, and it is very easy to perform.
What the attacker needed
Owns a vToken of the target vault; can transfer vTokens to the zap contract
The fix
The check should be removed from the marketplace and staking zap contracts and added to the vaults if necessary.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
A vault is a smart contract that holds assets. The marketplace uses a check to ensure it received the right amount of a token called vToken. If someone sends extra vTokens to the marketplace contract, the check fails and the marketplace stops working for everyone.
What is DoS?
A request that exhausts resources or crashes a component. Many programs forbid testing it; reports usually show it from code, not by attacking.