aftermath-ts-sdk - v3.3.3
    Preparing search index...

    On-chain representation of a vault that manages user collateral and interacts with clearing houses on their behalf.

    interface PerpetualsVaultObject {
        accountId: bigint;
        accountObjectId: string;
        collateralCoinType: string;
        creationTimestamp: number | undefined;
        idleCollateral: bigint;
        idleCollateralUsd: number;
        lastPausedTimestamp: number;
        lpCoinDecimals: number;
        lpCoinType: string;
        lpSupply: bigint;
        marketIds: string[];
        metadata: PerpetualsVaultMetatada;
        monthlyAprPercentage: number;
        monthlyBoostedAprPercentage: number;
        objectId: string;
        ownerAddress: string;
        ownerLockedLpBalance: bigint;
        parameters: {
            collateralPriceFeedStorageId: number;
            collateralPriceFeedStorageSourceId: number;
            collateralPriceFeedStorageTolerance: bigint;
            forceWithdrawDelayMs: bigint;
            lockPeriodMs: bigint;
            maxForceWithdrawMarginRatioTolerance: number;
            maxMarketsInVault: bigint;
            maxPendingOrdersPerPosition: bigint;
            maxTotalDepositedCollateral: bigint;
            minForceWithdrawValueUsd: number;
            performanceFeePercentage: number;
            scalingFactor: number;
        };
        pausedUntilTimestamp: bigint
        | undefined;
        tvlUsd: number;
        version: bigint;
    }
    Index
    accountId: bigint

    Underlying perpetuals account ID that the vault uses.

    accountObjectId: string

    Account object ID used by the vault.

    collateralCoinType: string

    Collateral coin type accepted by this vault.

    creationTimestamp: number | undefined

    Creation timestamp of the vault.

    idleCollateral: bigint

    Total balance of underlying Coin (C), deposited by users.

    "Idle" collateral is not currently allocated to any clearing house position. It remains held by the vault and can be used for new allocations or withdrawals (subject to lock/queue rules).

    idleCollateralUsd: number

    USD valuation of idleCollateral at query time.

    This is derived using the vault's collateral oracle price and is provided for UI convenience.

    lastPausedTimestamp: number

    Timestamp at which pause_vault_for_force_withdraw was last called.

    lpCoinDecimals: number

    Decimals for the LP token minted by this vault.

    lpCoinType: string

    LP coin type minted by this vault.

    This is the Coin<T> type used to represent shares in the vault. Users receive LP coins on deposit and burn/return them on withdrawal.

    lpSupply: bigint

    Supply of LP coins from a TreasuryCap for liquidity integrity.

    This is the total minted supply of the vault's LP token. Together with tvlUsd, this is used to derive LP share price.

    marketIds: string[]

    IDs of ClearingHouse where Vault has positions.

    Curator-provided metadata used for vault discovery and display.

    This data is expected to be relatively stable and is typically set at creation time (though it may be updatable depending on protocol rules).

    monthlyAprPercentage: number

    Estimated monthly APR for this vault, expressed as a percentage.

    This is typically computed off-chain from historical performance and/or accounting state. It is a display metric and should not be treated as a guaranteed rate.

    monthlyBoostedAprPercentage: number

    The annualized percentage return from incentives (added yields)

    objectId: string

    Unique identifier for distinct network identification.

    ownerAddress: string

    Owner address of the vault.

    ownerLockedLpBalance: bigint

    The amount of LP tokens locked by the vault owner (native units).

    This is the owner's initially locked liquidity, a portion of which can be withdrawn via the owner locked liquidity withdraw flow.

    parameters: {
        collateralPriceFeedStorageId: number;
        collateralPriceFeedStorageSourceId: number;
        collateralPriceFeedStorageTolerance: bigint;
        forceWithdrawDelayMs: bigint;
        lockPeriodMs: bigint;
        maxForceWithdrawMarginRatioTolerance: number;
        maxMarketsInVault: bigint;
        maxPendingOrdersPerPosition: bigint;
        maxTotalDepositedCollateral: bigint;
        minForceWithdrawValueUsd: number;
        performanceFeePercentage: number;
        scalingFactor: number;
    }

    Vault parameters

    Type Declaration

    • collateralPriceFeedStorageId: number

      Numeric price-feed storage id identifying the oracle price for C.

    • collateralPriceFeedStorageSourceId: number

      Numeric source id of the collateral price feed (the oracle provider/source: pyth, stork, etc.). Together with collateralPriceFeedStorageId it identifies the feed in the oracle aggregator registry.

    • collateralPriceFeedStorageTolerance: bigint

      Maximum tolerated deviation for the collateral oracle price.

      Used as a safety bound when valuing deposits/withdrawals and computing USD conversions. This is typically a fixed-point or scaled bigint value, consistent with the on-chain oracle representation.

    • forceWithdrawDelayMs: bigint

      Delay period to wait for eventual force withdrawing

      Force-withdrawal is an emergency/escape hatch path; this delay gives the vault time to unwind positions before executing the withdrawal.

    • lockPeriodMs: bigint

      Lock-in duration for engaged assets in milliseconds.

    • maxForceWithdrawMarginRatioTolerance: number

      Maximum margin ratio tolerance for force-withdraw processing.

      Force-withdraw generally requires closing positions. This tolerance controls how much worse (or better) the resulting margin ratio is allowed to be, compared to a target/expected value, before rejecting the action.

    • maxMarketsInVault: bigint

      The maximum number of distinct ClearingHouse.

    • maxPendingOrdersPerPosition: bigint

      The maximum number of pending orders allowed for a single position in the Vault.

    • maxTotalDepositedCollateral: bigint

      Maximum total collateral (native units) that can be deposited into the vault.

      This is a capacity/risk control parameter. Deposits that would cause the vault to exceed this limit should be rejected by the protocol/backend.

    • minForceWithdrawValueUsd: number

      Minimum position margin (USD) to trigger full close during force withdraw.

    • performanceFeePercentage: number

      Fee rate for vault's owner, collected from user's profits when they withdraw

    • scalingFactor: number

      Used to calculate user's minimum deposit value in usd

    pausedUntilTimestamp: bigint | undefined

    Indicates the vault is temporarily paused until the timestamp (if present).

    tvlUsd: number

    Total value locked in USD for this vault.

    Includes idle collateral plus the value of all open positions. It is the primary headline number used for ranking and display.

    version: bigint

    Contract version number for controlled upgrades.