• The vAMM is the contract that enables user's to take perpetual positions through its "virtual" automated market maker.

Hierarchy

Implements

Constructors

Properties

contractAddress: string
sender: string

Methods

  • Allows the margin engine to swap quote asset into the vAMM.

    Parameters

    • __namedParameters: {
          baseAssetLimit: string;
          canGoOverFluctuation: boolean;
          direction: Direction;
          positionId: number;
          quoteAssetAmount: string;
      }
      • baseAssetLimit: string
      • canGoOverFluctuation: boolean
      • direction: Direction
      • positionId: number
      • quoteAssetAmount: string
    • _fee: number | StdFee | "auto" = "auto"
    • Optional _memo: string
    • Optional _funds: Coin[]

    Returns Promise<ExecuteResult>

  • Enables owner to update key contract parameters.

    vammContract.updateConfig({
    tollRatio: '0'
    });

    Parameters

    • __namedParameters: {
          baseAssetHoldingCap?: string;
          fluctuationLimitRatio?: string;
          insuranceFund?: string;
          marginEngine?: string;
          openInterestNotionalCap?: string;
          pricefeed?: string;
          spotPriceTwapInterval?: number;
          spreadRatio?: string;
          tollRatio?: string;
      }
      • Optional baseAssetHoldingCap?: string
      • Optional fluctuationLimitRatio?: string
      • Optional insuranceFund?: string
      • Optional marginEngine?: string
      • Optional openInterestNotionalCap?: string
      • Optional pricefeed?: string
      • Optional spotPriceTwapInterval?: number
      • Optional spreadRatio?: string
      • Optional tollRatio?: string
    • _fee: number | StdFee | "auto" = "auto"
    • Optional _memo: string
    • Optional _funds: Coin[]

    Returns Promise<ExecuteResult>

©2020 - 2023 Oraichain Foundation