UNPKG

@cryptoalgebra/alm-sdk

Version:

Algebra ALM SDK

14 lines (13 loc) 625 B
import { JsonRpcProvider } from '@ethersproject/providers'; import { BigNumber } from 'ethers'; import { SupportedDex } from '../types'; interface UserPnl { totalDepositAmountBN: BigNumber; totalWithdrawAmountBN: BigNumber; pnlBN: BigNumber; pnl: string; roi: number; } /** calculates the PNL/ROI of a user in price of the deposit token */ export declare function calculateUserDepositTokenPNL(accountAddress: string, vaultAddress: string, currentAmount0: string, currentAmount1: string, decimals0: number, decimals1: number, jsonProvider: JsonRpcProvider, dex: SupportedDex): Promise<UserPnl>; export {};