struct DecreasePositionSizeInput {
address user;
uint32 index;
uint120 collateralDelta;
uint24 leverageDelta;
uint64 expectedPrice;
}
struct IncreasePositionSizeInput {
address user;
uint32 index;
uint120 collateralDelta;
uint24 leverageDelta;
uint64 expectedPrice;
uint16 maxSlippageP;
}
DecreasePositionSizeValues
struct DecreasePositionSizeValues {
uint256 positionSizeCollateralDelta;
uint256 existingPositionSizeCollateral;
uint256 existingLiqPrice;
uint256 priceAfterImpact;
int256 existingPnlCollateral;
uint256 borrowingFeeCollateral;
uint256 closingFeeCollateral;
int256 availableCollateralInDiamond;
int256 collateralSentToTrader;
uint120 newCollateralAmount;
uint24 newLeverage;
}
IncreasePositionSizeValues
struct IncreasePositionSizeValues {
uint256 positionSizeCollateralDelta;
uint256 existingPositionSizeCollateral;
uint256 newPositionSizeCollateral;
uint256 newCollateralAmount;
uint256 newLeverage;
uint256 priceAfterImpact;
int256 existingPnlCollateral;
uint256 newOpenPrice;
uint256 borrowingFeeCollateral;
uint256 openingFeesCollateral;
uint256 existingLiqPrice;
uint256 newLiqPrice;
}