Home > @primitivefi/rmm-sdk > IPool
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.
Abstraction of a Primitive RMM Pool
Signature:
export interface IPool
State includes reserves and calibration, just as a pool in PrimitiveEngine.sol does.
Property | Type | Description |
---|---|---|
expired | boolean | (BETA) True if Date.now() in seconds is greater than maturity timestamp. |
inTheMoney | boolean | (BETA) True if strike is below referencePriceOfRisky . |
invariant | FixedPointX64 | (BETA) Trading function invariant of the Pool, formatted as Q64.64 |
lastTimestamp | Time | (BETA) Timestamp of last curve update. |
liquidity | Wei | (BETA) Total liquidity of Pool, including the min liquidity IEngine.MIN_LIQUIDITY. |
premium | number | (BETA) Theoretical call option premium, computed using the pool's calibration data. |
referencePriceOfRisky | Wei | (BETA) Gets stored reference price of IEngine.risky, denominated in IEngine.stable. |
remaining | Time | (BETA) Difference between maturity timestamp and the current timestamp returned by Date.now(). |
reportedPriceOfRisky | Wei | (BETA) Gets the reported price CFMM for the IEngine.risky token, denominated in the IEngine.stable token. |
reserveRisky | Wei | (BETA) Risky token reserves of IEngine.risky. |
reserveStable | Wei | (BETA) Stable token reserves of IEngine.stable. |
tau | number | (BETA) Difference between maturity timestamp and lastTimestamp . |
Method | Description |
---|---|
getCurrentLiquidityValue(priceOfRisky, priceOfStable) | (BETA) Gets the current value of the pool denominated in units of priceOfRisky . |
liquidityQuote(amount, sideOfPool) | (BETA) Computes other side(s) of pool and/or liquidity amount, given a known size of one side of the pool. |