depositors face immediate loss in case `equity = 0`
The vulnerability in the `valueToShares` function exposes users to significant losses in case the equity `(currentAllAssetValue - debtBorrowed)` becomes zero due to strategy losses, users receive disproportionately low shares, and take a loss Immediately.\\nWhen a user deposits to the contract, the calculation of the shares to be minted depends on the `value` of `equity` added to the contract after a successful deposit. In other words:\\n`value` = `equityAfter` - `equityBefore`, while:\\n`equity` = `totalAssetValue` - `totalDebtValue`. and we can see that here :\\n```\\n   function processDeposit(GMXTypes.Store storage self) external {\\n        self.depositCache.healthParams.equityAfter = GMXReader.equityValue(self);\\n        self.depositCache.sharesToUser = GMXReader.valueToShares(\\n            self,\\n            self.depositCache.healthParams.equityAfter - self.depositCache.healthParams.equityBefore,\\n            self.depositCache.healthParams.equityBefore\\n        );\\n\\n        GMXChecks.afterDepositChecks(self);\\n    }\\n    // value to shares function :\\n\\n     function valueToShares(GMXTypes.Store storage self, uint256 value, uint256 currentEquity)\\n        public\\n        view\\n        returns (uint256)\\n    {\\n\\n        uint256 _sharesSupply = IERC20(address(self.vault)).totalSupply() + pendingFee(self); // shares is added\\n        if (_sharesSupply == 0 || currentEquity == 0) return value;\\n        return value * _sharesSupply / currentEquity;\\n    }\\n```\\n\\nNOTICE: When the equity value is `0`, the shares minted to the user equal the deposited value itself. The equity value can become zero due to various factors such as strategy losses or accumulated lending interests... ect\\nIn this scenario, the user immediately incurs a loss, depending on the total supply of `svToken` (shares).\\nConsider the following simplified example:\\nThe total supply of `svToken` is (1,000,000 * 1e18) (indicating users holding these shares).\\nthe equity value drops to zero due to strategy losses and a user deposits 100 USD worth of value,\\nDue to the zero equity value, the user is minted 100 shares (100 * 1e18).\\nConsequently, the value the user owns with these shares immediately reduces to 0.001 USD. `100 * 100 * 1e18 / 1,000,000 = 0.001 USD` (value * equity / totalSupply).\\nIn this case, the user immediately shares their entire deposited value with these old minted shares and loses their deposit, whereas those old shares should be liquidated some how.\\nNotice: If the total supply is higher, the user loses more value, and vice versa.
use a liquidation mechanism that burns the shares of all users when equity drops to zero.
users face immediate loss of funds in case equity drops to zero
```\\n   function processDeposit(GMXTypes.Store storage self) external {\\n        self.depositCache.healthParams.equityAfter = GMXReader.equityValue(self);\\n        self.depositCache.sharesToUser = GMXReader.valueToShares(\\n            self,\\n            self.depositCache.healthParams.equityAfter - self.depositCache.healthParams.equityBefore,\\n            self.depositCache.healthParams.equityBefore\\n        );\\n\\n        GMXChecks.afterDepositChecks(self);\\n    }\\n    // value to shares function :\\n\\n     function valueToShares(GMXTypes.Store storage self, uint256 value, uint256 currentEquity)\\n        public\\n        view\\n        returns (uint256)\\n    {\\n\\n        uint256 _sharesSupply = IERC20(address(self.vault)).totalSupply() + pendingFee(self); // shares is added\\n        if (_sharesSupply == 0 || currentEquity == 0) return value;\\n        return value * _sharesSupply / currentEquity;\\n    }\\n```\\n