Guidance for Exchange Deployment

Qtum Exchange Integration Guide

This guide provides comprehensive instructions for deploying and integrating Qtum into cryptocurrency exchanges, covering both traditional binary deployments and Docker-based solutions.


Exchanges typically use one of two deployment methods:

  1. Docker Deployment (Recommended) - Containerized, easier to maintain and scale

  2. Binary Deployment - Direct installation on host systems


Docker provides a consistent, isolated environment that simplifies deployment and maintenance. This is the preferred method for modern exchange infrastructure.

Prerequisites

  • Docker installed and running (Install Docker)

  • Sufficient disk space (minimum 100GB recommended for mainnet)

  • Stable network connection

Pull Qtum Docker Image

For a specific version:

Create Data Directory

Create a persistent directory for blockchain data and wallet:

Create Configuration File

Create /opt/qtum-data/qtum.conf:

Start Qtum Container

Production mainnet deployment:

With explicit staking disabled:

Verify Container Status

Using qtum-cli with Docker

Docker Maintenance Commands

Docker Compose (Alternative)

Create docker-compose.yml:

Deploy with:


Binary Deployment

Download Prebuilt Binaries

Download the latest release from the GitHub Releases page:

Current stable version: 29.1

The bin directory contains:

  • qtumd - Qtum daemon

  • qtum-cli - Command-line interface

Compile from Source (Alternative)

If compiling from source on Ubuntu/Debian:

Binaries will be in the build/src/ directory.

CMake Build Notes

Qtum 29.1 uses CMake (migrated from Autotools in Bitcoin Core 29.1):

  • Minimum CMake version: 3.22

  • Configuration: cmake -B build (creates build directory)

  • Compilation: cmake --build build

  • Installation: cmake --install build (optional)


Node Configuration

Initial Startup

CRITICAL: Always use -staking=0 or set staking=0 in qtum.conf for exchange wallets.

Configuration File

Create ~/.qtum/qtum.conf:

Restart the node after creating or modifying the configuration file.

Check Sync Status

Monitor the blocks and headers fields. When they match the latest block on Qtum Explorer, the node is fully synchronized.

Initial sync time: 30 minutes to 2 hours depending on network speed and hardware.

Shutdown Node


Critical Exchange Configuration

Why Disable Staking?

WARNING: Staking MUST be disabled for exchange wallets.

When staking is enabled:

  • Coins used for staking become locked for 500 blocks (~20 hours)

  • This creates unpredictable fund accessibility

  • Can cause failed withdrawals if staked funds are needed

  • Complicates balance accounting

Always set: staking=0


Wallet Management

Backup Wallet

Location: ~/.qtum/wallet.dat (or /opt/qtum-data/wallet.dat for Docker)

CRITICAL: Always stop the node before backing up to prevent corruption.

Encrypt Wallet

Important:

  • Node automatically stops after encryption

  • MUST create a new backup after encryption

  • Encrypted wallets cannot be decrypted (only unlocked temporarily)

  • Lost passphrase = permanently lost coins

Recommendation for Exchanges:

  • Hot wallets: Do NOT encrypt (requires manual unlocking for withdrawals)

  • Cold wallets: Encrypt for additional security

Unlock Encrypted Wallet

Note: Unlocking is only required to send transactions. Receiving and viewing transactions works with a locked wallet.


Receiving Deposits

Generate New Address

Returns a unique address. Generate a new address for each user.

Address formats:

  • Standard (P2PKH): Starts with Q

  • Multi-signature (P2SH): Starts with M

Validate Address

Returns address validity and ownership information.

Check Received Amount

The number 10 is minimum confirmations required. Returns total received by that address with at least 10 confirmations.

List All Transactions

WARNING: This includes unconfirmed transactions. Always verify confirmations before crediting deposits.

Get Transaction Details

Check the confirmations field before crediting user accounts.


Processing Withdrawals

Send Transaction

Examples:

Parameters:

  • destination_address: Recipient address (must start with Q or M)

  • amount: Amount in QTUM

  • comment: Internal note (stored locally)

  • to_comment: Internal note (stored locally)

  • subtractfee:

    • true = fee deducted from amount sent

    • false = fee paid separately by sender (exchange)

Important Notes

  • Cannot specify source address - Qtum automatically selects UTXOs

  • Smart contract addresses (0x...) are rejected - Use proper Qtum addresses only

  • Transaction returns a transaction ID for tracking


Network Parameters

Transaction Fees

Recommended: 0.004 QTUM per kilobyte (400,000 satoshis/KB)

Typical transaction size: 1-2 KB

Expected fee: 0.004 - 0.008 QTUM per transaction

Configure in qtum.conf:

Required Confirmations

Recommended by Qtum Foundation:

  • Large amounts (>10,000 QTUM): 20 confirmations

  • Medium amounts (100-10,000 QTUM): 10 confirmations

  • Small amounts (<100 QTUM): 6 confirmations

For new exchanges or high-risk periods: Use higher confirmation requirements initially.

Minimum Withdrawal Amount

Recommended: 0.01 QTUM

This ensures transaction fees don't consume a disproportionate amount of the withdrawal.

Network Port

P2P Port: 3888 (TCP)

Requirements:

  • Must allow outbound connections on port 3888

  • Port forwarding is NOT required (incoming connections are optional)

  • Firewall should allow daemon to reach external peers

RPC Port: 3889 (TCP)

  • Only expose to trusted internal networks

  • Never expose directly to the internet


Security Best Practices

Network Security

  1. Never expose RPC port (3889) to the internet

  2. Use firewall rules to restrict RPC access to internal IPs only

  3. Use strong, random RPC credentials

  4. Consider using VPN or SSH tunnels for remote access

Wallet Security

  1. Hot Wallet:

    • Keep minimum balance needed for daily withdrawals

    • Do NOT encrypt (requires manual unlocking)

    • Regular automated backups

    • Monitor for unusual activity

  2. Cold Wallet:

    • Store majority of funds offline

    • Encrypt wallet with strong passphrase

    • Store backups in multiple secure locations

    • Use multi-signature if possible

  3. Backup Strategy:

    • Automate daily backups

    • Store backups in multiple geographic locations

    • Encrypt backup files

    • Test restore procedures regularly

Monitoring

Monitor these metrics:

Set up alerts for:

  • Node synchronization issues

  • Low peer connections (< 8)

  • Unexpected balance changes

  • Failed RPC requests


QRC20 Token Support (Optional)

If your exchange supports QRC20 tokens, enable event logging:

Configuration

Add to qtum.conf:

Important: If blockchain is already synced, reindex:

Reindexing takes several hours.

QRC20 RPC Calls

Refer to QRC20 Integration Guide for detailed token integration.


Troubleshooting

Node Won't Sync

RPC Connection Refused

  1. Verify qtum.conf has server=1

  2. Check RPC credentials match

  3. Verify rpcallowip includes your IP

  4. Restart node after configuration changes

Wallet Not Sending Transactions

  1. Check if wallet is encrypted and locked

  2. Verify sufficient balance (including fee)

  3. Check if address is valid Qtum address

  4. Review debug.log for error messages

Docker Container Issues


Additional Resources


Support

For integration support:


Summary: Quick Exchange Integration Checklist

  • [ ] Deploy Qtum node (Docker recommended)

  • [ ] Configure qtum.conf with staking=0

  • [ ] Wait for full blockchain sync

  • [ ] Implement deposit detection (minimum 10 confirmations)

  • [ ] Test withdrawal process

  • [ ] Set up wallet backup automation

  • [ ] Implement security measures (firewall, monitoring)

  • [ ] Document hot/cold wallet procedures

  • [ ] Set appropriate minimum withdrawal (0.01 QTUM)

  • [ ] Configure transaction fees (0.004 QTUM/KB)

  • [ ] Set up monitoring and alerts

  • [ ] Test emergency procedures


Last Updated: November 2025 Qtum Core Version: 29.1 Build System: CMake 3.22+

Last updated