Function getImmediatePrice

  • Parameters

    • balanceFrom: bigint

      Balnace of the from token.

    • balanceTo: bigint

      Balance of the to token.

    • weightFrom: bigint

      Weight of the from token.

    • weightTo: bigint

      Weight of the to token.

    • amplification: bigint

      Amplification factor for the swap.

    • escrowTo: bigint = ...

    Returns bigint

    Marignal price of the token with WAD resolution.

    Notice

    Calculates the price for an infinitesimal small trade between 2 assets.