import { BigNumber } from "bignumber.js"; /** * Swap contains the result of a swap * * @export * @class Swap * @property {BalancerPool} poolStart the pool before the swap * @property {BalancerPool} poolEnd the pool after the swap * @property {BigNumber} dxAmm the amount of x added to the pool * @property {BigNumber} dxUser the amount of x removed from the pool * @property {BigNumber} dyAmm the amount of y removed from the pool * @property {BigNumber} dyUser the amount of y added to the pool * @property {BigNumber} priceImpact the price impact of the swap */ export declare class Swap { poolStart: BalancerPool; poolEnd: BalancerPool; dxAmm: BigNumber; dxUser: BigNumber; dyAmm: BigNumber; dyUser: BigNumber; priceImpact: BigNumber; constructor(poolStart: BalancerPool, poolEnd: BalancerPool); } /** * Balancer contains the logic for exchanging tokens in a traditional xy=k AMM pool * * Constructor: * @param {BigNumber} x * @param {BigNumber} y * @param {BigNumber} swapFee * * @export * @class BalancerPool * @property {BigNumber} x the amount of x in the pool * @property {BigNumber} y the amount of y in the pool * @property {BigNumber} swapFee the swap fee expressed as a ratio */ export declare class BalancerPool { x: BigNumber; y: BigNumber; swapFee: BigNumber; constructor(x: BigNumber, y: BigNumber, fee: BigNumber); k(): BigNumber; spotPrice(): BigNumber; /** * Calculates the result of adding x to the pool * * @param dxAmm the amount of x to add to the pool. Could be negative. * @returns a Swap object representing the result of the swap */ swapX(dxAmm: BigNumber): Swap | undefined; /** * Calculates the result of adding y to the pool * * @param dyAmm the amount of y to add to the pool. Could be negative. * @returns a Swap object representing the result of the swap */ swapY(dyAmm: BigNumber): Swap | undefined; } //# sourceMappingURL=balancer.d.ts.map