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

Was this helpful?

Export as PDF
  1. Archive

Maya Integration Guide

Previous$MAYA Airdrop for Maya Mask HoldersNextRoadmap 2023

Last updated 1 year ago

Was this helpful?

A small guide to show what you would need to integrate Maya.

Maya Protocol can perform an action when a specific instruction is sent to Maya’s address for a particular chain.

If you want to swap BTC to KUJI, you send a BTC transaction to Maya’s vault for Bitcoin, along with the memo: e.g. =:KUJI.KUJI:kujira1q6g84pxu4tpr26dwp39fdrrwtpcnak44sf0x7f

This memo specifies the asset you want to swap to, and the destination address. You don’t have to manually look for these vaults, we have an endpoint, from which you can fetch the inbound vaults for Maya, and the memo’s you need. An example. You want to swap 0.001 BTC to KUJI. Your Kujira address is: kujira1cd5kzygxfzylez8q4vak55pwj2z7a6hweat0zw.

Entering this in the quoting endpoint:

Gives:

{
  "expected_amount_out": "2352067700",
  "fees": {
    "affiliate": "0",
    "asset": "KUJI.KUJI",
    "outbound": "450000"
  },
  "inbound_address": "bc1q6u3d8780tytlrcrr69gj96gxhr9m24558lxee2",
  "inbound_confirmation_blocks": 1,
  "inbound_confirmation_seconds": 600,
  "memo": "=:KUJI.KUJI:kujira1cd5kzygxfzylez8q4vak55pwj2z7a6hweat0zw",
  "outbound_delay_blocks": 1,
  "outbound_delay_seconds": 3,
  "slippage_bps": 2
}

You find the expected amount of KUJI you’ll get in 1e8 (in this case 23.52 KUJI), the address (inbound_address) you need to send your BTC to, and the memo you need to attack to the BTC transaction. That is everything you need, to swap using Maya Protocol.

You can add limits, affiliate fees and more to this endpoint as well.

Bitcoin is BTC.BTC, USK is KUJI.USK (KUJI is the chain, USK the asset).

Exceptions: It can happen that a chain is halted.

If HALTBTCTRADING = 1, trading is halted. Trading is not halted when the parameter is set to 0. Currently we have the following chains: BTC, ETH, THOR, DASH & KUJI.

You can find all available and active pools in the Pools endpoint: .

This can be checked by looking at the Mimir endpoint:

You can find all endpoints here: Hopefully this explains well how you can swap and integrate Maya’s cross-chain swaps! (edited)

https://mayanode.mayachain.info/mayachain/quote/swap?from_asset=BTC.BTC&to_asset=KUJI.KUJI&amount=100000&destination=kujira1cd5kzygxfzylez8q4vak55pwj2z7a6hweat0zw
https://mayanode.mayachain.info/mayachain/pools
https://mayanode.mayachain.info/mayachain/mimir
https://mayanode.mayachain.info/mayachain/doc