Manager can grief with fees
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.
NFTX contest
Originally disclosed on Code4rena
The fees in NFTXVaultUpgradeable can be set arbitrarily high (no restriction in setFees).
The manager can front-run mints and set a huge fee (for example fee = base) which transfers user’s NFTs to the vault but doesn’t mint any pool share tokens in return for the user.
Similar griefing attacks are also possible with other functions besides mint.
Recommend checking for a max fee as a percentage of base (like 10%) whenever setting fees.
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 fee setter has no upper bound, so the manager can set a fee equal to or above the base amount and front-run user transactions.
Impact
A malicious or compromised manager could take users' deposited NFTs without giving them any pool tokens in return.
What the attacker needed
Manager role on the vault; ability to front-run user transactions
The fix
The fee setter should enforce a maximum fee as a percentage of the base amount, such as 10%.
How it was found
- The manager watches for a pending mint transaction.
- The manager front-runs it by setting a very high fee.
- The user's mint executes, transferring their NFTs to the vault but minting no pool share tokens.
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 shared pool where people deposit NFTs and get pool tokens in return. The manager controls a fee taken on each deposit, and the code never caps how high that fee can be. By changing the fee just before a user deposits, the manager can take the user's NFT and give back nothing.
What is Business logic?
The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.