Submitted by pedroais
Pool Manager can front-run entry fee to 100% and users could lose all their deposits.
Considering:
The pool manager is the creator of the pool.
Anyone can create a pool.
Manager is not a trusted actor.
Anyone can create a pool and get people to join. If there is a big deposit admin could front-run the transaction and set the fee to max which is uint(1 ether) = 10**18 (100% as this is a per token fee).
Function that set fees :
https://github.com/code-423n4/2021-12-nftx/blob/194073f750b7e2c9a886ece34b6382b4f1355f36/nftx-protocol-v2/contracts/solidity/NFTXVaultUpgradeable.sol#L119
Max fees are 1 ether :
https://github.com/code-423n4/2021-12-nftx/blob/194073f750b7e2c9a886ece34b6382b4f1355f36/nftx-protocol-v2/contracts/solidity/NFTXVaultFactoryUpgradeable.sol#L122
The manager could benefit from this by having other pool assets deposited in staking so he would receive fees in Vtokens and could use them to withdraw the nfts.
Add a timelock to change fees. In that way, frontrunning wouldnt be possible and users would know the fees they are agreeing with.
0xKiwi (NFTX) acknowledged, but disagreed with high severity and commented:
LSDan (judge) decreased severity to medium and commented:
