> 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/logic/open-long.md).

# Open Long

<figure><img src="https://1743545109-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F134K9qwR2RRL5RDcV9YV%2Fuploads%2FgYq6AAwG3CVUJApRpWyA%2FScreenshot%202023-12-10%20at%204.26.02%E2%80%AFPM.png?alt=media&amp;token=08c65313-80ec-4dab-b6cf-ccd1a2ad6359" alt=""><figcaption></figcaption></figure>

Notes:

* The text matches the variable names in code;
* The colors for text and lines/symbols are matched;
* For illustration, assume no price impact, the grey price line is tangent to the curve;
* A feeAmount will be applied to marginFrom + amountFromBorrowed;
* In practice, `marginTo` in "Open Long" is 0;
* Can also borrow out-of-range liquidity, but `currentPrice` must only be on the right of `tickLower`.
