In LeverageModule.executeOpen/executeAdjust, vault.checkSkewMax should be called after updating the global position data
```\\nFile: flatcoin-v1\\src\\LeverageModule.sol\\n    function executeOpen(\\n        address _account,\\n        address _keeper,\\n        FlatcoinStructs.Order calldata _order\\n    ) external whenNotPaused onlyAuthorizedModule returns (uint256 _newTokenId) {\\n// rest of code// rest of code\\n101:->       vault.checkSkewMax({additionalSkew: announcedOpen.additionalSize});\\n\\n        {\\n            // The margin change is equal to funding fees accrued to longs and the margin deposited by the trader.\\n105:->           vault.updateGlobalPositionData({\\n                price: entryPrice,\\n                marginDelta: int256(announcedOpen.margin),\\n                additionalSizeDelta: int256(announcedOpen.additionalSize)\\n            });\\n// rest of code// rest of code\\n    }\\n```\\n\\nWhen `profitLossTotal` is positive value, then `stableCollateralTotal` will decrease.\\nWhen `profitLossTotal` is negative value, then `stableCollateralTotal` will increase.\\nAssume the following:\\n```\\nstableCollateralTotal = 90e18\\n_globalPositions = {  \\n    sizeOpenedTotal: 100e18,  \\n    lastPrice: 1800e18,  \\n}\\nA new position is to be opened with additionalSize = 5e18.  \\nfresh price=2000e18\\n```\\n\\nWe explain it in two situations:\\n`checkSkewMax` is called before `updateGlobalPositionData`.\\n```\\nlongSkewFraction = (_globalPositions.sizeOpenedTotal + additionalSize) * 1e18 / stableCollateralTotal \\n                 = (100e18 + 5e18) * 1e18 / 90e18 \\n                 = 1.16667e18 < skewFractionMax(1.2e18)\\nso checkSkewMax will be passed.\\n```\\n\\n`checkSkewMax` is called after `updateGlobalPositionData`.\\n```\\nIn updateGlobalPositionData:  \\nPerpMath._profitLossTotal calculates\\nprofitLossTotal = _globalPositions.sizeOpenedTotal * (int256(price) - int256(globalPosition.lastPrice)) / int256(price) \\n                = 100e18 * (2000e18 - 1800e18) / 2000e18 = 100e18 * 200e18 /2000e18 \\n                = 10e18 \\n_updateStableCollateralTotal(-profitLossTotal) will deduct 10e18 from stableCollateralTotal. \\nso stableCollateralTotal = 90e18 - 10e18 = 80e18.  \\n\\nNow, checkSkewMax is called:  \\nlongSkewFraction = (_globalPositions.sizeOpenedTotal + additionalSize) * 1e18 / stableCollateralTotal \\n                 = (100e18 + 5e18) * 1e18 / 80e18 \\n                 = 1.3125e18 > skewFractionMax(1.2e18)\\n```\\n\\nTherefore, this new position should not be allowed to open, as this will only make the system more skewed towards the long side.
```\\nFile: flatcoin-v1\\src\\LeverageModule.sol\\n    function executeOpen(\\n        address _account,\\n        address _keeper,\\n        FlatcoinStructs.Order calldata _order\\n    ) external whenNotPaused onlyAuthorizedModule returns (uint256 _newTokenId) {\\n// rest of code// rest of code\\n101:---      vault.checkSkewMax({additionalSkew: announcedOpen.additionalSize});\\n\\n        {\\n            // The margin change is equal to funding fees accrued to longs and the margin deposited by the trader.\\n            vault.updateGlobalPositionData({\\n                price: entryPrice,\\n                marginDelta: int256(announcedOpen.margin),\\n                additionalSizeDelta: int256(announcedOpen.additionalSize)\\n            });\\n+++              vault.checkSkewMax(0); //0 means that vault.updateGlobalPositionData has added announcedOpen.additionalSize.\\n// rest of code// rest of code\\n    }\\n```\\n
The `stableCollateralTotal` used by `checkSkewMax` is the value of the total profit that has not yet been settled, which is old value. In this way, when the price of collateral rises, it will cause the system to be more skewed towards the long side.
```\\nFile: flatcoin-v1\\src\\LeverageModule.sol\\n    function executeOpen(\\n        address _account,\\n        address _keeper,\\n        FlatcoinStructs.Order calldata _order\\n    ) external whenNotPaused onlyAuthorizedModule returns (uint256 _newTokenId) {\\n// rest of code// rest of code\\n101:->       vault.checkSkewMax({additionalSkew: announcedOpen.additionalSize});\\n\\n        {\\n            // The margin change is equal to funding fees accrued to longs and the margin deposited by the trader.\\n105:->           vault.updateGlobalPositionData({\\n                price: entryPrice,\\n                marginDelta: int256(announcedOpen.margin),\\n                additionalSizeDelta: int256(announcedOpen.additionalSize)\\n            });\\n// rest of code// rest of code\\n    }\\n```\\n