Submitted by immeas, also found by minhtrng, bin2chen, KIntern_NA, rbserver, ustas, rvierdiiev, and yellowBirdy
performanceFee is a fee on the profits of the vault. The feeRecipient (or any user) can collect these at any point.
They rely on the difference between the current share value and the highWaterMark that records a historical share value.
The issue is that this highWaterMark is written on interactions with the vault: deposit, mint, withdraw. Hence a user can front run the fee collection with any of these calls. That will set the highWaterMark to the current share value and remove the performance fee.
A malicious user can maximize the yield and deny any performance fee by front running the fee collection with a call to either deposit, mint or withdraw with only dust amounts.
PoC test in Vault.t.sol
VS Code, Forge
At every deposit, mint, redeem and withdraw, take fees before adding or removing the new users shares and assets.
 RedVeil (Popcorn) acknowledged 
