Close Position
Function:
closePositionThe actual position closing steps are in
_closePosition, which implements: swap back the needed amount to repay LP (Base.swap), repay LP (increaseLiquidity), send gains to trader (refundWithCheck), pays for fees (addTokensOwed).Note: caller is authorized by checking the liens[msg.sender, lienId] belonging to the caller is non empty.
Last updated