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

Close Long

PreviousOpen LongNextOpen Short

Last updated 1 year ago

Notes:

  • Changing Open to Close, all "From"s are changed to "To"s;

  • premiumFrom in "Close Long" has the same length as the premiumTo in "Open Long". Also, since tokenFromOwed is capped at premiumFrom, the minimum amountSpent is (collateralFrom - amountFromAdd).