```\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