UNPKG

@starkdefi/core-sdk

Version:

SDK for building StarkDefi applications

9 lines (8 loc) • 539 B
import { Currency, TokenAmount, Percent, Price } from '../entities'; /** * Returns the percent difference between the mid price and the execution price, i.e. price impact. * @param midPrice mid price before the trade * @param inputAmount the input amount of the trade * @param outputAmount the output amount of the trade */ export declare function computePriceImpact<TBase extends Currency, TQuote extends Currency>(midPrice: Price<TBase, TQuote>, inputAmount: TokenAmount<TBase>, outputAmount: TokenAmount<TQuote>): Percent;