Open Position
Function:
openPosition
The function implements the borrowing steps plainly: determine required collateral (
Base.prepareLeverage
), borrow liquidity (decreaseLiquidity
andcollectLiquidity
), 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