Skip to content

Latest commit

 

History

History
33 lines (21 loc) · 1.22 KB

rmm-sdk.computepoolid.md

File metadata and controls

33 lines (21 loc) · 1.22 KB

Home > @primitivefi/rmm-sdk > computePoolId

computePoolId() function

This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

Computes deterministic poolIds from hashing engine address and calibration parameters.

Signature:

export declare function computePoolId(engine: string, strike: string, sigma: string, maturity: string, gamma: string): string;

Parameters

Parameter Type Description
engine string Address of Engine contract.
strike string Strike price in wei, with decimal places equal to the Engine's stable token decimals.
sigma string Implied volatility in basis points.
maturity string Timestamp of expiration in seconds, matching the format of block.timestamp.
gamma string Equal to 10_000 - fee, in basis points. Used to apply fee on swaps.

Returns:

string

Keccak256 hash of a solidity packed array of engine address and calibration struct.