The function implements the borrowing steps plainly: determine required collateral (Base.prepareLeverage), borrow liquidity (decreaseLiquidity and collectLiquidity), pay for fees (get feeAmount), swap (Base.swap), bookkeep (create a new Lien.Info).
Storage: minimally required information of a position is stored in liens, which maps [address, lienId] into Lien.Info.