@cowprotocol/cow-sdk
Version:
## 📚 [Docs website](https://docs.cow.fi/)
17 lines (16 loc) • 519 B
TypeScript
import { SupportedChainId } from '../../chains';
/**
* Get the slippage percentage for a given absolute slippage.
*
* Returns a percentage as a portion of 1 with 6 decimals of precision.
*
* @param params
* @returns
*/
export declare function getSlippagePercent(params: {
isSell: boolean;
sellAmountBeforeNetworkCosts: bigint;
sellAmountAfterNetworkCosts: bigint;
slippage: bigint;
}): number;
export declare function getDefaultSlippageBps(chainId: SupportedChainId, isEthFlow: boolean): number;