Documentation
    Preparing search index...

    PoolProxyContract class for managing PoolProxy operations.

    Index

    Constructors

    Methods

    • Parameters

      • marginManagerKey: string

        The key to identify the MarginManager

      Returns (tx: Transaction) => void

      A function that takes a Transaction object

      Cancel all existing orders

    • Parameters

      • marginManagerKey: string

        The key to identify the MarginManager

      • orderId: string

        Order ID to cancel

      Returns (tx: Transaction) => void

      A function that takes a Transaction object

      Cancel an existing order

    • Parameters

      • marginManagerKey: string

        The key to identify the MarginManager

      • orderIds: string[]

        Order IDs to cancel

      Returns (tx: Transaction) => void

      A function that takes a Transaction object

      Cancel multiple existing orders

    • Parameters

      • marginManagerKey: string

        The key to identify the MarginManager

      Returns (tx: Transaction) => void

      A function that takes a Transaction object

      Claim a rebate from a pool

    • Parameters

      • marginManagerKey: string

        The key to identify the MarginManager

      • orderId: string

        Order ID to modify

      • newQuantity: number

        New quantity for the order

      Returns (tx: Transaction) => void

      A function that takes a Transaction object

      Modify an existing order

    • Parameters

      Returns (tx: Transaction) => TransactionResult

      A function that takes a Transaction object

      Place a market order and repay the loan from the fill proceeds. The taker fill settles into the manager's balance, so the proceeds (plus any idle balance) are repaid into the debt side before the risk check; the gate is then the net post-repay risk_ratio being at least the pre-fill ratio. Unlike placeMarketOrder, which checks the post-trade ratio against min_borrow_risk_ratio, this lets a deleveraging fill go through in the liquidation..min_borrow band, where a swap alone would be rejected.

    • Parameters

      Returns (tx: Transaction) => TransactionResult

      A function that takes a Transaction object

      Place a reduce only limit order. Requires the manager to have debt on the relevant side; enforces a monotonic risk_ratio_after >= risk_ratio_before invariant so the fill cannot leak value to the counterparty.

    • Parameters

      Returns (tx: Transaction) => TransactionResult

      A function that takes a Transaction object

      Place a reduce only limit order and repay the loan from the fill proceeds. Requires debt on the relevant side (a bid needs base debt; an ask needs quote debt and sells at most the gross base held); the repay happens before the monotonic risk_ratio gate, so the check is on the net post-repay ratio.

    • Parameters

      Returns (tx: Transaction) => TransactionResult

      A function that takes a Transaction object

      Place a reduce only market order. Requires the manager to have debt on the relevant side; enforces a monotonic risk_ratio_after >= risk_ratio_before invariant so the fill cannot leak value to the counterparty.

    • Parameters

      • marginManagerKey: string

        The key to identify the MarginManager

      • stakeAmount: number

        The amount to stake

      Returns (tx: Transaction) => void

      A function that takes a Transaction object

      Stake in the pool

    • Parameters

      • marginManagerKey: string

        The key to identify the MarginManager

      • params: MarginProposalParams

        Parameters for the proposal

      Returns (tx: Transaction) => void

      A function that takes a Transaction object

      Submit a proposal

    • Parameters

      • marginManagerKey: string

        The key to identify the MarginManager

      Returns (tx: Transaction) => void

      A function that takes a Transaction object

      Unstake from the pool

    • Parameters

      • poolKey: string

        The key to identify the pool

      Returns (tx: Transaction) => void

      A function that takes a Transaction object

      Update the current price for a pool using Pyth oracle

    • Parameters

      • marginManagerKey: string

        The key to identify the MarginManager

      • proposalId: string

        The ID of the proposal to vote on

      Returns (tx: Transaction) => void

      A function that takes a Transaction object

      Vote on a proposal

    • Parameters

      • poolKey: string

        The key to identify the pool

      • marginManagerId: string

        The object ID of the MarginManager

      Returns (tx: Transaction) => void

      A function that takes a Transaction object

      Withdraw settled amounts permissionlessly for a margin manager by ID

    • Parameters

      • marginManagerKey: string

        The key to identify the MarginManager

      Returns (tx: Transaction) => void

      A function that takes a Transaction object

      Withdraw settled amounts