Particle LAMM Dev Handbook
  • Introduction
  • Logic
    • Overview
    • Open Long
    • Close Long
    • Open Short
    • Close Short
  • Developer
    • Liquidity Provision
    • Open Position
    • Close Position
    • Liquidate Position
    • Long/Short Symmetry
    • Trading Fees
    • Premium Accounting
    • Reclaim Liquidity
Powered by GitBook
On this page
  1. Logic

Open Long

PreviousOverviewNextClose Long

Last updated 1 year ago

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.