Maya Protocol One-Stop-Shop
  • Introduction
    • 🍫What is Maya Protocol?
      • Getting Started
      • Roles
        • Liquidity Providers
        • Swappers
        • Arbitrageurs
        • Node Operators
      • Maya Protocol Native Assets
    • 🌐Maya Ecosystem
      • User interfaces & Wallets
      • Tools
    • 🍫How to buy CACAO?
    • πŸ›£οΈRoadmap 2025
  • Deep Dive
    • πŸšΆβ€β™‚οΈStep-by-Step Guides
      • Set up a MAYAChain wallet
        • Using El Dorito Club
        • Using THORWallet web APP
        • Using THORWallet Mobile APP
        • Through MAYANode cli
        • By importing Ledger hard wallet into Ctrl Wallet
      • Custom Memos
        • Swap
        • Add Liquidity
        • Withdraw Liquidity
    • πŸ› οΈHow It Works
      • Technology
      • Incentive Curve
      • Fees
      • Governance
      • Constants and Mimir
      • Security
      • Dynamic Inflation
      • Liquidity Nodes
      • Impermanent Loss Protection (ILP)
      • ELI5
        • What is Threshold Signature Scheme (TSS)?
    • πŸ’΅DeFi Products
      • Synthetics
      • Liquidity
    • πŸ”Audits
    • 🎭Maya Masks
    • ❓FAQs
  • Blockchain Explorer
    • πŸ”ŽMayaScan
      • πŸͺ™MRC-20 Tokens
      • πŸ–ΌοΈM-NFTS
  • Airdrop
    • πŸͺ‚$MAYA Airdrops Guide
  • Media
    • πŸ“½οΈAaluxx Interviews
    • 🐦Twitter Spaces
    • πŸ”—Links
  • Contribute
    • 😎Ambassador Program
    • 🎨Content Creators Guide
  • Node Docs
    • πŸ–₯️MAYANodes
      • MAYANode Overview
      • Cluster Launcher
        • Setup - Linode
        • Setup - Azure
        • Setup - Hetzner Bare Metal
        • Setup - Google Cloud
        • Setup - HCloud
        • Setup - Digital Ocean
        • Setup - AWS
      • Deploying
      • Joining
      • Managing
      • Pooled MAYANodes
      • Alerting
      • Leaving
      • πŸ›‘Emergency Procedures
      • βœ”οΈ CHECKLIST
      • Multi-node Deployment
      • Fullnode Installation Guide
    • Bonding & Unbonding Guide
    • Bare Metal Node Guides
  • MAYACHAIN DEV DOCS
    • Introduction
      • MAYAName Guide
      • Swapping Guide
        • Quickstart Guide
        • Fees and Wait Times
        • Streaming Swaps
      • Add MAYAChain to your Wallet
    • Examples
      • Tutorials
      • Typescript (XChainJS) WIP
        • Query Package
        • AMM Package
        • Client Packages
        • Packages Breakdown
        • Coding Guide
      • SwapKit SDK
    • Concepts
      • Connecting to MAYAChain
      • Querying MAYAChain
      • Transaction Memos
      • Asset Notation
      • Memo Length Reduction
      • Network Halts
      • Fees
      • Delays
      • Sending Transactions
      • Math
    • Aggregators
      • Memos
      • EVM Implementation
    • CLI
      • Multisig
      • Offline Ledger Support
    • Protocol Development
      • Adding New Chains
      • Chain Clients
        • UTXO
        • EVM Chains
        • Cosmos Chains
      • ERC-20 Tokens
      • THORChain Version Updates I
      • THORChain Version Updates II
  • White Paper
    • πŸ“–Maya Whitepaper 2.0
      • Introduction
      • 🍫Fair Launch
        • Philosophical perspective FL
        • Economic overview FL
        • Technical overview FL
      • πŸͺ™$MAYA token
        • Philosophical perspective MT
        • Economic overview MT
        • Technical overview MT
      • 🌊Liquidity Nodes
        • Philosophical perspective LN
        • Economic overview LN
        • Technical overview LN
      • πŸ”’Security Nodes
        • Philosophical perspective SN
        • Economic overview SN
        • Technical overview SN
      • πŸ”΄Aztec Chain & $AZTEC token
        • Philosophical perspective AC
        • Economic overview AC
        • Technical overview AC
      • βš–οΈStable Pools & Route Optimization
        • Philosophical perspective RO
        • Economic overview RO
        • Technical overview RO
      • πŸ‘£Roadmap. Maya 3.0
        • Philosophical perspective 3.0
        • Economic overview 3.0
        • Technical overview 3.0
  • Website
  • GitLab
  • Archive
    • Liquidity Auction
    • THORChads Airdrop
    • Add ETH, USDC, or USDT through THORWallet using Metamask + Ledger
    • $MAYA Airdrop for Maya Mask Holders
    • Maya Integration Guide
    • Roadmap 2023
Powered by GitBook

Social Media

  • Twitter
  • Telegram
  • Discord
On this page
  • Overview
  • Inbound Confirmation
  • Observation Counting
  • Confirmation Counting
  • Outbound Delay
  • Outbound Confirmation
  • How to Handle Delays

Was this helpful?

Export as PDF
  1. MAYACHAIN DEV DOCS
  2. Concepts

Delays

Understanding end to end transaction times.

PreviousFeesNextSending Transactions

Last updated 3 months ago

Was this helpful?

Overview

There are four phases of a transaction sent to MAYAChain.

Wait times can be between a few seconds to several hours. The assets being swapped, the size of the swap and the current network traffic within MAYAChain will determine the wait time.

Inbound Confirmation

This depends purely on the host chain and is out of the control of MAYAChain.

  • Bitcoin/Dash: ~10 minutes

  • ETH/ARB: ~15 seconds

  • Cosmos: ~6 seconds

Observation Counting

MAYANodes have to witness to MAYAChain when they see a transaction. It could seconds to minutes depending on how fast nodes can scan their blockchains to find transactions. Once 67% of MAYANodes see a tx, then it can be confirmed. You can count the number of nodes that have seen a tx by counting the signatures in the signers parameter or look at the status field on the /tx endpoint.

Confirmation Counting

MAYAChain has to defend against 51% attacks, which it does by counting to economic finality for each block (the value of the block relative to the value of the block reward). It tracks both, then computes the number of blocks to wait. It then populates this on the /tx endpoint.

block_height is the external height it first saw it.

finalise_height is the external height it needs to see before it will confirm it.

An event is not sent until the external block height crosses finalise_height so Midgard will NOT see the tx until confirmation-counted.

Examples:

  • 10 BTC: 2 blocks

  • 50 ETH: 16 blocks

Outbound Delay

Queue

Delayed txOuts:

Finalised txOuts:

Outbound Confirmation

This depends purely on the host chain and is out of the control of MAYAChain.

  • Bitcoin: ~10 minutes

  • Dash: ~2.5 minutes

  • ETH/ARB: ~15 seconds

  • Cosmos: ~6 seconds

How to Handle Delays

Follow these guidelines

  1. Use the Quote endpoint to get the estimated fee.

  2. Don't leave the user with a swap screen spinner, instead, move the swap to a "pending state" with a 10 minute countdown. Let the user exit the app, perhaps even send them a notification after.

  3. Every minute, poll Midgard and see if the swap is processed.

  4. Once processed, you can inform the user, perhaps surprise them if the swap is done faster

Example:

Example:

MAYAChain throttles all outputs to prevent fund loss attacks, but the maximum delay is 1hr. It does this by computing the value of the outbound transaction then applying an artificial delay. If the tx is in "scheduled", it will be delayed by a number of blocks. Once it is "outbound" it is being processeed. See more information .

https://mayanode.mayachain.info/mayachain/tx/09DCAEF3F7D76AB1D621E684824503DD7E36C48A2F35C5122569159DA884153F
https://mayanode.mayachain.info/mayachain/tx/09DCAEF3F7D76AB1D621E684824503DD7E36C48A2F35C5122569159DA884153F
https://mayanode.mayachain.info/mayachain/queue
https://mayanode.mayachain.info/mayachain/queue/scheduled
https://mayanode.mayachain.info/mayachain/queue/outbound
Inbound Confirmation
Observation Counting
Confirmation Counting
Outbound Delay
Outbound Confirmation
here