Incorrect depositable shortToken amount calculation in Delta neutral vaults
When calculating the maximum possible depositable amount for delta neutral vaults, `_maxTokenBLending` is calculated incorrectly.\\n```\\n    if (self.delta == GMXTypes.Delta.Neutral) {\\n      (uint256 _tokenAWeight, ) = tokenWeights(self);\\n\\n\\n      uint256 _maxTokenALending = convertToUsdValue(\\n        self,\\n        address(self.tokenA),\\n        self.tokenALendingVault.totalAvailableAsset()\\n      ) * SAFE_MULTIPLIER\\n        / (self.leverage * _tokenAWeight / SAFE_MULTIPLIER);\\n\\n\\n      uint256 _maxTokenBLending = convertToUsdValue(\\n        self,\\n        address(self.tokenB),\\n        self.tokenBLendingVault.totalAvailableAsset()\\n      ) * SAFE_MULTIPLIER\\n        / (self.leverage * _tokenAWeight / SAFE_MULTIPLIER)\\n        - 1e18;\\n```\\n\\nhttps://github.com/Cyfrin/2023-10-SteadeFi/blob/0f909e2f0917cb9ad02986f631d622376510abec/contracts/strategy/gmx/GMXReader.sol#L254-L270\\nIf `a` user wants to deposit `v` value to `a` `l` leveraged delta neutral vault with token weights `a` and `b`, the calculation of required lending amount would be as follows:\\n```\\nTotal value to deposit to GMX = lv\\nValue of tokens to short = lva\\nHence this value will be borrowed from the tokenA lending vault\\nRemaining value to borrow (from tokenB lending vault) = lv - lva - v (deposit value provided by user)\\nHence if there is Tb value of tokens in tokenB lending vault, v <= Tb / (l - la - 1)\\n```\\n
Change the formula to the correct one.\\n```\\ndiff // Remove the line below\\n// Remove the line below\\ngit a/contracts/strategy/gmx/GMXReader.sol b/contracts/strategy/gmx/GMXReader.sol\\nindex 73bb111..ae819c4 100644\\n// Remove the line below\\n// Remove the line below\\n// Remove the line below\\n a/contracts/strategy/gmx/GMXReader.sol\\n// Add the line below\\n// Add the line below\\n// Add the line below\\n b/contracts/strategy/gmx/GMXReader.sol\\n@@ // Remove the line below\\n266,8 // Add the line below\\n266,7 @@ library GMXReader {\\n         address(self.tokenB),\\n         self.tokenBLendingVault.totalAvailableAsset()\\n       ) * SAFE_MULTIPLIER\\n// Remove the line below\\n        / (self.leverage * _tokenAWeight / SAFE_MULTIPLIER)\\n// Remove the line below\\n        // Remove the line below\\n 1e18;\\n// Add the line below\\n        / (self.leverage // Remove the line below\\n (self.leverage *_tokenAWeight / SAFE_MULTIPLIER) // Remove the line below\\n 1e18);\\n \\n       _additionalCapacity = _maxTokenALending > _maxTokenBLending ? _maxTokenBLending : _maxTokenALending;\\n     }\\n```\\n
Deposit attempts can revert even when there is enough tokens to lend causing inefficiency, loss of gas for depositors and deviation from the protocol specification.
```\\n    if (self.delta == GMXTypes.Delta.Neutral) {\\n      (uint256 _tokenAWeight, ) = tokenWeights(self);\\n\\n\\n      uint256 _maxTokenALending = convertToUsdValue(\\n        self,\\n        address(self.tokenA),\\n        self.tokenALendingVault.totalAvailableAsset()\\n      ) * SAFE_MULTIPLIER\\n        / (self.leverage * _tokenAWeight / SAFE_MULTIPLIER);\\n\\n\\n      uint256 _maxTokenBLending = convertToUsdValue(\\n        self,\\n        address(self.tokenB),\\n        self.tokenBLendingVault.totalAvailableAsset()\\n      ) * SAFE_MULTIPLIER\\n        / (self.leverage * _tokenAWeight / SAFE_MULTIPLIER)\\n        - 1e18;\\n```\\n