import { CurrencyExt, StableLpToken } from "../../../types"; import { MonetaryAmount } from "@interlay/monetary-js"; import Big from "big.js"; import { PoolType, PooledCurrencies, LiquidityPoolBase } from "../types"; import { LiquidityPoolCalculator } from "./calculator"; declare class StableLiquidityPool extends LiquidityPoolCalculator implements LiquidityPoolBase { type: PoolType.STABLE_META | PoolType.STABLE_PLAIN; lpToken: StableLpToken; actuallyPooledCurrencies: PooledCurrencies; pooledCurrencies: PooledCurrencies; rewardAmountsYearly: Array>; tradingFee: Big; poolId: number; amplificationCoefficient: Big; totalSupply: MonetaryAmount; isEmpty: boolean; constructor(type: PoolType.STABLE_META | PoolType.STABLE_PLAIN, lpToken: StableLpToken, actuallyPooledCurrencies: PooledCurrencies, pooledCurrencies: PooledCurrencies, rewardAmountsYearly: Array>, tradingFee: Big, // Decimal point poolId: number, amplificationCoefficient: Big, totalSupply: MonetaryAmount, isEmpty: boolean); private _xp; private _distance; private get _feePerToken(); private _getD; private _getY; private _getYD; /** * Sort amounts in same order as `actuallyPooledCurrencies`. * * @param amounts Array of monetary * @returns Amounts containing currency amounts at the same index as `this.actuallyPooledCurrencies` * @throws When currencies of `amounts` differ from `actuallyPooledCurrencies` */ private _sortAmounts; involvesToken(currency: CurrencyExt): boolean; getTokenIndex(currency: CurrencyExt): number; get xp(): Array; /** * * @param amounts Array of monetary amount for each pooled currency of this pool. * @param deposit True for deposit, false for withdrawal * @returns LP token amount that will be minted/burned after operation. */ calculateTokenAmount(amounts: PooledCurrencies, deposit: boolean): MonetaryAmount; calculateRemoveLiquidityOneToken(tokenLPAmount: MonetaryAmount, outputCurrencyIndex: number): [MonetaryAmount, MonetaryAmount]; calculateSwap(inputIndex: number, outputIndex: number, inputAmount: MonetaryAmount): MonetaryAmount; } export { StableLiquidityPool };