Skip to Content
IntegrationsExchange Integration

Exchange Integration

Tidecoin exchange integration is mostly a Bitcoin Core integration with three Tidecoin-specific responsibilities: validate Tidecoin address networks exactly, size withdrawals for post-quantum signatures, and understand the AuxPoW activation gate before enabling post-AuxPoW output types on mainnet.

This page is the exchange operations checklist. It is not the command schema; use RPC Reference for command arguments and RPC Integration Patterns for reusable polling, retry, and reorg patterns.

Listing readiness checklist

Before deposits are opened, an exchange integration should have:

AreaRequirement
Node fleetAt least two independently monitored Tidecoin Core nodes.
Network checksExplicit mainnet/testnet/regtest address validation.
Deposit ingestionA reorg-aware cursor based on block hash, not only height.
Withdrawal sizingFee estimates based on Tidecoin transaction vbytes, not Bitcoin-sized assumptions.
Wallet policyA documented hot-wallet scheme policy and cold-storage seed procedure.
Broadcast safetytestmempoolaccept before sendrawtransaction for externally built withdrawals.
Incident gatesAutomatic deposit/withdrawal pauses during IBD, peer loss, reindex, deep reorgs, or wallet failures.
Test coverageRegtest or testnet coverage for deposit credit, reorg removal, withdrawal broadcast, and address rejection.

Node layout

Run public-facing services and wallet-signing services as separate roles. Explorer or deposit indexers can use read-only node RPC credentials. Hot-wallet automation should use a wallet-scoped RPC credential and should not share a node with untrusted public API traffic.

Recommended production posture:

RolePurposeNotes
Primary deposit nodeTracks blocks and wallet notifications.Keep fully synced; do not credit deposits while in IBD.
Secondary verification nodeCross-checks best block hash, height, and mempool behavior.Use for alerting and manual failover.
Wallet nodeCreates and signs withdrawals.Bind RPC to localhost or a private network only.
Indexer nodeOptional block/transaction scan backend.Use if the exchange does not rely only on wallet RPC.

For RPC binding, authentication, service accounts, and firewalling, follow RPC Security.

Address policy

Do not infer Tidecoin network from string length or from a Bitcoin address library configured with default Bitcoin constants. Use the Tidecoin version bytes and HRPs listed in Address Validation.

Mainnet exchange policy should normally:

  1. Accept only mainnet address encodings for mainnet deposits.
  2. Reject testnet and regtest HRPs and Base58 prefixes at the API boundary.
  3. Support current mainnet receive types that the exchange has tested end to end.
  4. Decode PQ witness v1 addresses, but avoid enabling them for mainnet deposits while mainnet AuxPoW remains disabled.

Testnet and regtest integrations should include PQ witness v1 coverage because those networks activate the post-AuxPoW ruleset earlier.

Deposit monitoring

Wallet-backed deposit systems can use listsinceblock as the main cursor. Store the returned lastblock hash and use it on the next poll.

tidecoin-cli -rpcwallet="deposits" listsinceblock "<lastblock>" 6 true true

Important behavior:

Field or argumentIntegration meaning
blockhashCursor from the previous lastblock.
target_confirmationsControls the returned lastblock; it is not a transaction filter.
transactionsWallet transactions to evaluate for crediting.
removedTransactions removed by a reorg when include_removed is true.
lastblockPersist this as the next cursor after processing the response.

If the exchange runs a custom indexer instead of a wallet-owned deposit wallet, scan blocks by hash using getblock <hash> 2, persist height, hash, and previousblockhash, and rewind to the common ancestor when the stored parent no longer matches the active chain.

Do not credit deposits from a single unconfirmed mempool observation. Mempool tracking is useful for UX and fraud monitoring, but final account credit should come from confirmed block processing and the exchange’s confirmation policy.

Confirmation policy

There is no universal confirmation count that can be correct for every exchange, amount, and liquidity profile. A practical initial policy is:

Deposit typeStarting policy
Small normal deposits6 or more confirmations.
Large depositsMore confirmations and manual risk controls.
Mined fundsWait for coinbase maturity before treating funds as spendable.
Reorg recoveryDebit or freeze credits for transactions returned in removed.

The final policy belongs to the exchange’s risk model. Document the threshold in the listing runbook and make sure the implementation can change it without a code deployment.

Withdrawal flow

Withdrawal construction can use Tidecoin Core wallet RPC or an offline PSBT flow. For hot-wallet withdrawals before mainnet AuxPoW activation, use Falcon-512 policy unless the active network explicitly allows another scheme.

Minimum withdrawal pipeline:

  1. Validate the destination address against the selected network.
  2. Build the transaction with wallet RPC or an offline PSBT flow.
  3. Estimate final vbytes using Tidecoin’s PQ signature sizes.
  4. Run testmempoolaccept on the final hex.
  5. Broadcast with sendrawtransaction.
  6. Track the transaction by txid, block inclusion, and reorg state.

Common broadcast failures are usually policy, fee, dust, or consensus-rule errors. See Errors for how to handle RPC error categories and Transaction Size & Fees for Tidecoin-specific fee sizing.

Hot and cold wallet policy

Tidecoin wallets use PQHD seed management for post-quantum key material. Treat PQHD master seeds as high-value signing material. A hot wallet should hold only operational liquidity; reserves should be controlled by offline or tightly restricted cold procedures.

Operational points:

TopicGuidance
Hot walletKeep enough liquidity for normal withdrawals, then rebalance from cold storage.
Cold walletUse offline signing or tightly controlled wallet hosts.
Seed inventoryTrack PQHD seed IDs and backup status.
Scheme policyRecord the selected receive and change scheme policy per wallet.
PSBT metadataPreserve PQHD origin metadata through offline signing workflows when used.

Useful wallet commands include listpqhdseeds, importpqhdseed, setpqhdseed, removepqhdseed, and setpqhdpolicy. See RPC Reference for command details.

Pause conditions

Automated deposit or withdrawal processing should pause when:

ConditionWhy it matters
Node is in initial block downloadThe local chain view is not reliable.
Peer count is below the exchange thresholdThe node may be isolated.
Best block differs across exchange nodesThe fleet may be split or lagging.
A reorg exceeds the exchange thresholdPreviously credited deposits may need review.
Wallet RPC is locked or unavailableWithdrawal signing cannot be trusted to complete.
Address parser rejects a network or output type unexpectedlyA deployment may have wrong chain constants.

Source of truth

TopicCanonical page
Address prefixes and HRPsAddress Validation
Fee sizing and PQ transaction weightsTransaction Size & Fees
RPC polling and reorg handlingRPC Integration Patterns
RPC command schemasRPC Reference
RPC deployment securityRPC Security
AuxPoW activation stateActivation Status

See also: Wallet Integration, PSBT & Offline Signing, Errors.

Last updated on