> For the complete documentation index, see [llms.txt](https://erc20-docs.particle.trade/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://erc20-docs.particle.trade/developer/open-position.md).

# Open Position

* Function: `openPosition`
* 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`.
