Calculates position fees from increasing or decreasing a position.
The following fees apply:
Margin fee, applied to the delta of the position size
Swap fee, applied if adding or removing collateral when the input
collateral address differs from the position, requiring a swap.
As it is a sync function, it relies on a valid cache of the hLP config,
or throws if it does not exist.
Calculates position fees from increasing or decreasing a position. The following fees apply: