API Reference

nftperp v2 is a real amm (as opposed to vamm) so its real liquidity deployed by participants. this liquidity facilitates trades on the protocol. LPs earn pro rata fees and are also subject to funding payments.

To add liquidity:

function addLiquidity(address amm, uint margin, uint leverage, uint minLiquidity) external;

params

  • amm amm address
  • margin margin amount (wei)
  • leverage leverage (wei)
  • minLiquidity min expected liquidity output (wei) (used for setting slippage, 0 for bypassing slippage checks)