Open Position
Function:
openPositionThe function implements the borrowing steps plainly: determine required collateral (
Base.prepareLeverage), borrow liquidity (decreaseLiquidityandcollectLiquidity), pay for fees (getfeeAmount), swap (Base.swap), bookkeep (create a newLien.Info).Storage: minimally required information of a position is stored in
liens, which maps[address, lienId]intoLien.Info.
Last updated