IDEX
  • Introduction to IDEX
  • What is IDEX
    • Components
      • High-performance Exchange
      • Hybrid Liquidity
        • HL Mechanics
        • IDEX HL and LPs
      • Smart Contracts
    • User Benefits
    • Liquidity Mining
    • Staking
    • Referral Program
    • Hummingbot
    • Markets
    • Fees
    • Live Help
  • Code
    • API
    • Smart Contracts
      • Custodian
      • Exchange
      • Governance
    • Resources
  • User Guides
    • Getting Started
      • Connect Your Ledger Hardware Wallet to IDEX
      • Connect Your Metamask Account to IDEX
      • Connect You Private Key/Keystore on IDEX
    • Trading
      • Deposit tokens
      • Withdraw tokens
      • Buy and sell
      • View and cancel open orders
      • View trade, deposit, and withdraw history
    • LP and Farms
      • Add liquidity (LP)
      • Remove liquidity (LP)
      • Add LP tokens to farms
      • Remove LP tokens from farms
    • Staking
      • Operate your own staking node
        • Host a public staking node
      • Delegate to an existing node
    • Polygon Confirmations
    • Hummingbot Setup
      • Pure Market Making
      • Arbitrage
    • AURA Swap Instructions
    • Withdraw Directly on Chain
      • Farm ID List
  • FAQ
    • Polygon Bridge
    • Escape Hatch
    • Adding Polygon To Metamask
    • Clock Sync
Powered by GitBook
On this page
  • Off-chain Credits
  • Polygon Finality
  • Confirmation Delay - Examples

Was this helpful?

  1. User Guides

Polygon Confirmations

Certain actions require waiting 128 blocks for confirmation before additional actions are allowed. Here we discuss the reason for this delay as well as the instances in which it will occur.

Off-chain Credits

The IDEX design uses an off-chain order book and matching engine to provide users with a fast and responsive trading experience.

Before users are credited with balances for trading in this off-chain system, they must move their funds on-chain into the IDEX smart contract. This guarantees that the credited funds will be available for settlement after any trades are executed off-chain.

Polygon Finality

The Polygon network requires 128 blocks before finality is reached. This means that until 128 blocks have passed, the IDEX matching engine cannot guarantee that deposit transactions are valid.

If IDEX credits a user off-chain before finality, it is possible for this deposit to be dropped. Any attempt by the user to trade these funds, which are no longer deposited in the smart contract, would lead to trade settlement failures and errors.

Confirmation Delay - Examples

The following are instances in which user’s will encounter the 128 block delay (~4-5 minutes at current block time):

Depositing funds for trading - users must wait before these funds are credited for trading in the off-chain system.

Adding liquidity to liquidity pools directly from your wallet

  • Users have the option of adding to liquidity pools using funds in their wallet (not already deposited to IDEX)

  • In this instance, users must wait five minutes before the liquidity addition is confirmed, and the user receives their LP tokens

  • Note: it is possible that the liquidity pool pricing changes during this block delay, and the slippage tolerance cause the liquidity addition to revert

    • In this instance, the funds will stay within the IDEX smart contract (as part of “My IDEX Balance”)

    • Users can re-submit the liquidity addition, which will be processed instantly, as the funds have already been deposited and passed the block delay

    • To avoid this, users can first deposit to IDEX and wait for confirmation prior to adding liquidity

Removing liquidity from liquidity pools with LP tokens that are in your wallet

  • Users can remove liquidity from liquidity pools using their existing LP tokens; these LP tokens will most often be held in the user’s wallet (or in a farm contract)

  • The liquidity removal function first deposits the LP tokens; after the block delay (guaranteeing that the LP token deposit won’t be reverted), the liquidity is released from the pool

  • Note: it is possible that the liquidity pool pricing changes during this block delay, and the slippage tolerance cause the liquidity removal to revert

    • In this instance, the LP tokens will stay deposited in the IDEX smart contract (as part of “My IDEX Balance”)

    • Users can re-submit the liquidity removal, which will be processed instantly, as the LP tokens have already been deposited and passed the block delay

PreviousDelegate to an existing nodeNextHummingbot Setup

Last updated 3 years ago

Was this helpful?