Utility library for position management operations
function shouldDeductFee( address _account, address _router, address[] memory _path, uint256 _amountIn, address _indexToken, bool _isLong ) external view returns (bool);
function increasePosition( address _account, address _collateralToken, address _indexToken, uint256 _sizeDelta, bool _isLong, uint256 _price ) external;
shouldDeductFee
// In a position management contract function increasePosition(/* parameters */) external { bool shouldChargeFee = PositionUtils.shouldDeductFee( msg.sender, router, path, amountIn, indexToken, isLong ); if (shouldChargeFee) { // Apply fee logic } // Proceed with position increase }