A depositor of the GMXVault can bypass paying the fee when the depositor deposit into the GMXVault.
The fee-minted in the form of shares (svTokens) would not be subtracted from the amount of shares (svTokens) to be minted to the GMXVault's depositor.\\nDue to that, a depositor of the GMXVault could receive the amount of the shares (svTokens), which the amount of the fee-minted in the form of the shares (svTokens) via the GMXDeposit#mintFee() was not subtracted.\\nThis means that a depositor of the GMXVault can bypass paying the fee when the depositor deposit into the GMXVault.\\nWithin the GMXDeposit#deposit(), the GMXVault#mintFee() would be called to mint the fee in the form of the svTokens like this: https://github.com/Cyfrin/2023-10-SteadeFi/blob/main/contracts/strategy/gmx/GMXDeposit.sol#L119\\n```\\n  /**\\n    * @notice @inheritdoc GMXVault\\n    * @param self GMXTypes.Store\\n    * @param isNative Boolean as to whether user is depositing native asset (e.g. ETH, AVAX, etc.)\\n  */\\n  function deposit(\\n    GMXTypes.Store storage self,\\n    GMXTypes.DepositParams memory dp,\\n    bool isNative\\n  ) external {\\n    // rest of code\\n    self.status = GMXTypes.Status.Deposit;\\n\\n    self.vault.mintFee();    ///<----------------------- @audit\\n    // rest of code\\n```\\n\\nWithin the GMXVault#mintFee(), the amount (GMXReader.pendingFee(_store)) of the shares would be minted to the treasury (_store.treasury) in the form of the svTokens like this: https://github.com/Cyfrin/2023-10-SteadeFi/blob/main/contracts/strategy/gmx/GMXVault.sol#L335\\n```\\n  /**\\n    * @notice Mint vault token shares as management fees to protocol treasury\\n  */\\n  function mintFee() public {\\n    _mint(_store.treasury, GMXReader.pendingFee(_store)); ///<------------ @audit\\n    _store.lastFeeCollected = block.timestamp;\\n  }\\n```\\n\\nWhen callback of deposit, the the GMXDeposit#processDeposit() would be called via the GMXVault#deposit().\\nWithin the GMXDeposit#processDeposit(), the amount (self.depositCache.sharesToUser) of shares (VaultTokens) would be minted to the GMXVault's depositor (self.depositCache.user) like this: https://github.com/Cyfrin/2023-10-SteadeFi/blob/main/contracts/strategy/gmx/GMXDeposit.sol#L172\\n```\\n  /**\\n    * @notice @inheritdoc GMXVault\\n    * @param self GMXTypes.Store\\n  */\\n  function processDeposit(\\n    GMXTypes.Store storage self\\n  ) external {\\n    GMXChecks.beforeProcessDepositChecks(self);\\n\\n    // We transfer the core logic of this function to GMXProcessDeposit.processDeposit()\\n    // to allow try/catch here to catch for any issues or any checks in afterDepositChecks() failing.\\n    // If there are any issues, a DepositFailed event will be emitted and processDepositFailure()\\n    // should be triggered to refund assets accordingly and reset the vault status to Open again.\\n    try GMXProcessDeposit.processDeposit(self) {\\n      // Mint shares to depositor\\n      self.vault.mint(self.depositCache.user, self.depositCache.sharesToUser); ///<------------- @audit\\n      // rest of code\\n```\\n\\nWithin the GMXDeposit#processDeposit() above, the amount of the fee-minted in the form of the shares (svTokens) via the GMXDeposit#mintFee() is supposed to be subtracted from the amount of the shares to be minted to the GMXVault's depositor via the GMXDeposit#processDeposit().\\nHowever, there is no logic to subtract the amount of the fee-minted in the form of the shares (svTokens) via the GMXDeposit#mintFee() from the amount of the shares to be minted to the GMXVault's depositor in the form of the shares (svTokens) via the GMXDeposit#processDeposit().
Within the GMXDeposit#processDeposit(), consider adding a logic to subtract the amount of the fee-minted in the form of the shares (svTokens) via the GMXDeposit#mintFee() from the amount of the shares to be minted to the GMXVault's depositor in the form of the shares (svTokens) via the GMXDeposit#processDeposit().
The depositor could receive the amount of the shares (svTokens), which the amount of the fee-minted in the form of the shares (svTokens) via the GMXDeposit#mintFee() was not subtracted.\\nThis means that a depositor of the GMXVault can bypass paying the fee when the depositor deposit into the GMXVault.
```\\n  /**\\n    * @notice @inheritdoc GMXVault\\n    * @param self GMXTypes.Store\\n    * @param isNative Boolean as to whether user is depositing native asset (e.g. ETH, AVAX, etc.)\\n  */\\n  function deposit(\\n    GMXTypes.Store storage self,\\n    GMXTypes.DepositParams memory dp,\\n    bool isNative\\n  ) external {\\n    // rest of code\\n    self.status = GMXTypes.Status.Deposit;\\n\\n    self.vault.mintFee();    ///<----------------------- @audit\\n    // rest of code\\n```\\n