Exchange Integration Guide¶
This guide is for exchange and custody engineers evaluating native PFT deposits and withdrawals on Post Fiat L1. It covers transparent (non-shielded) accounts only. It describes what the code does today and lists the gaps that must close before a real-value integration.
Devnet only
The only running network is the controlled devnet postfiat-wan-devnet-2,
run by six Foundation-administered validators. It is not a production
mainnet, no public testnet is open, and the software has not been
externally audited. Do not hold customer funds on it. Current facts are on
Network Status.
For the full integration plan written for Coinbase, with roadmap, audit plan and comparisons, see the Coinbase listing package.
At a glance¶
| Topic | Rule today | Details |
|---|---|---|
| Account model | Account-based, XRP-style: balance plus strict sequence | below |
| Signatures | ML-DSA-65 only; 1,952-byte keys, 3,309-byte signatures | Addresses, Keys And Signatures |
| Address | pf + 40 lowercase hex characters; optional display checksum in source |
Addresses, Keys And Signatures |
| Recipient check | Canonical address checks at admission in the running build; execution checks require governance activation | Addresses, Keys And Signatures |
| Unit | 1 PFT = 1,000,000 atoms; amounts are integer atoms | Fees |
| Fee | At least 1 atom per started 512 bytes of transaction weight, plus 10 atoms when the transfer creates the recipient account; the whole fee burns | Fees |
| Reserve | 10 atoms must remain in every account | Fees |
| Confirmation | One committed block (commit quorum certificate) plus an accepted receipt | Confirmation |
| Memo / tag | Not in v1 transfers; up to 4 memos in payment_v2 |
Deposits |
| Account history | account_tx: transparent transactions and the transparent credits of shielded withdrawals |
Reconciliation |
| Key rotation | Not available for accounts | Addresses, Keys And Signatures |
Running a node¶
An exchange would normally run its own node and never trust a third-party RPC for crediting. Today that path is limited:
- No public network to join. There is no published public genesis, chain ID or peer set. The controlled devnet accepts no outside validators (Public Operator Runbook, section 3).
- No public RPC endpoint for
postfiat-wan-devnet-2is published in this repository. Validator RPC binds to loopback and is exposed only through an operator-managed authenticated TLS edge (Public RPC Operator Policy). - Independent archive or indexer onboarding is an open decision, and validators keep partial history by policy (History Retention).
What you can do today:
- Build from source and run a local multi-validator devnet to exercise every
flow below (
scripts/devnet-up, see First Day). - Read the node join mechanics: a node can catch up from an existing RPC
endpoint with
postfiat-node rpc-catch-up, or with the pinnedrpc-catch-up-certified-delta, which fails unless the chain ends at the expected height, block hash and state root (Public Operator Runbook). - Check that a node follows the chain: all nodes must agree on chain ID,
genesis hash, registry root, tip and state root (
scripts/testnet-rpc-doctor).
RPC basics¶
- Transport. Newline-delimited JSON over plain TCP. A request is one JSON
object followed by
\n:{"version":"postfiat-local-rpc-v1","id":"…","method":"…","params":{…}}. A response carries the sameversionandid,ok, and eitherresultorerror(python/postfiat_rpc/client.py). The persistent client (python/postfiat_rpc/persistent_client.py) reuses one connection; a WebSocket client exists for wallet-facing proxies. - Port. Validator RPC listens on
27650 + validator indexon loopback by default (Public RPC Operator Policy). - Clients. Use the Python client (
python/postfiat_rpc) or the Rust SDK (crates/rpc_sdk) rather than hand-building signatures.
Methods an exchange needs (RPC Methods):
| Method | Use |
|---|---|
status, server_info |
Height, health, chain identity |
account |
Balance, sequence and bound public key for an address |
account_tx, account_tx_index_status |
Bounded transaction history for an address; index readiness |
tx |
Finality and receipt for one transaction ID |
receipts, blocks |
Receipt and block lookup |
fee, transfer_fee_quote |
Fee policy; exact quote for a transfer (and for memos) |
mempool_submit_signed_transfer |
Submit a signed v1 transfer (when enabled) |
mempool_submit_signed_payment_v2 |
Submit a signed payment with memos (when enabled) |
mempool_status |
Pending transaction count |
A remote method is reachable by anyone who can connect to the listener. The
release service binds it to loopback. The following defaults apply when
rpc-serve starts without method flags.
| Method family | Transport | Default (bare server) | Authorization | Effect |
|---|---|---|---|---|
| Reads | RPC TCP | Enabled | Public queries | Read node or chain data |
FastSwap and FastLanefastlane_asset_control_apply, fastlane_asset_control_catch_up, fastlane_asset_control_prepare, fastlane_exit, fastswap_apply, fastswap_cancel_apply, fastswap_catch_up, fastswap_commit, fastswap_commit_round, fastswap_new_round_vote, fastswap_precommit, fastswap_prepare |
RPC TCP | Enabled | Signed intents, policy authorization or quorum certificates. A new-round vote uses existing prepared swap state and local round checks, without a caller signature. | Prepare, vote, catch up or apply protocol transitions |
Owned payments and unwrapsowned_apply, owned_apply_v3, owned_sign, owned_sign_v3, owned_unwrap_apply, owned_unwrap_apply_v3, owned_unwrap_sign, owned_unwrap_sign_v3 |
RPC TCP | Enabled (--allow-owned-lane / --disable-owned-lane) |
Signed owner intents or certified operations | Sign or apply owned-lane transitions |
| Mempool submission | RPC TCP | Disabled (--allow-mempool-submit) |
Signed transaction or protocol payload | Submit to the mempool |
| Finality submission and voting | RPC TCP | Disabled (--allow-mempool-submit-finality) |
Signed transaction, batch or consensus evidence as required by the method | Coordinate certification, voting or finality |
| Orchard batch creation | RPC TCP | Disabled (--allow-orchard-batch-create) |
Method-specific proof and parameter checks | Construct private batches |
| Private action admission | RPC TCP | Disabled (--allow-private-action-admission) |
Domain, intent and action validation for admission | Queue an action or read its admission receipt |
| Operator methods | Local CLI | Local only | Local process and storage permissions | Local reads or mutations |
The generated validator RPC service explicitly enables the owned lane and
finality submission. The legacy server_info.rpc.read_only field tracks the
mempool, finality, Orchard batch and owned-lane switches. FastSwap/FastLane
protocol mutations remain reachable when that field is true, and private
action admission has its own switch. Mempool and finality submissions share per-peer and
global rate limits. Those counters do not cover owned-lane applies.
The RPC Method Inventory lists the
transport policy for each method.
Confirmation (finality)¶
Block finality is deterministic. Under Consensus v2 a block is committed when
q distinct validators sign precommit votes for it, forming a commit quorum
certificate; with six validators q = 5. The protocol tolerates
f = floor((n - 1) / 3) faulty validators, which is 1 of 6
(Finality). There is no probabilistic
confirmation depth: waiting for more blocks does not add safety. Note that all
six validators are administered by one organization today, so the fault
assumption rests on that organization.
A committed block can contain a rejected transaction. The Python wallet's
default confirmation == "rpc_confirmed" means the submission server
returned a matching accepted receipt inline, or the query server later
reported it through tx. Both paths trust that server. The compatibility
field finalized is also true for this RPC-only outcome.
For independently verified exchange credit, provision a full, immutable
archive copy from your own node and pin the chain ID, genesis hash and
genesis validator registry root through your trusted deployment records.
Use a local, trusted postfiat-node build. The verifier follows ordered
committee changes, checks quorum signatures and chain linkage, replays
archived transactions and receipts, and resolves the signed native payment
at its certified receipt index. Pruned archives and committee changes
that require unauthenticated historical keys cannot supply this result.
This is full-history replay per observed payment. Budget for archive size
and replay time before enabling it on a deposit processor.
from pathlib import Path
from postfiat_rpc import FinalityTrust, verify_payment_finality
trust = FinalityTrust(Path(archive_path), chain_id, genesis_hash, genesis_registry_root)
evidence = verify_payment_finality(trust, deposit_tx_id)
if evidence["confirmation"] == "independently_verified":
payment = evidence["report"]["transaction_rows"][0]
# Match the expected deposit address, amount in atoms and customer memo.
# Record evidence and credit once, keyed by (chain_id, genesis_hash, tx_id).
Some devnet recovery blocks followed a different signing committee from the
one reconstructed by applying all ordered updates. Genesis-only verification
refuses this history. A custodian that independently authenticated the recovery
decision and its block can provide a local JSON array of exception records.
Each record contains the exact chain_id, genesis_hash, positive height,
block_hash, ordered_registry_root (the full committee after applying the
due updates) and signing_registry_root (the full committee authorized for that
block). Hashes and roots are 96 lowercase hexadecimal characters. List records
in strictly increasing height order.
Obtain these values from independently authenticated recovery records, verify
the signers’ authority through the custodian’s deployment records, then retain
the approved file with its provenance outside the archive. The payment RPC,
archive and certificate alone cannot establish a recovery decision. Set
historical_committee_pins=Path("/custody/trust/recovery.json") on
FinalityTrust, or supply --historical-committee-pins PATH to either transfer
or native verification CLI. Certificate and execution replay both check the
pinned block and committee roots. The verifier checks the block quorum, the
signed authority for effective committee changes, and the payment receipt. A
legacy unsigned Foundation drill record can only preserve the already-active
signers at an independently pinned recovery block. The result records the
pins used. Independent credit on the affected devnet history
remains unverified until the custodian provisions this evidence and successfully
replays its own archive.
Pass the same finality_trust=trust to send_pft_and_poll_finality to
require this verification for withdrawals. Both the inline-submit and
submit-then-poll paths derive the transaction ID from the locally signed
payment. The transfer CLI accepts --poll-finality --verification-archive PATH
--trusted-genesis-hash HASH --trusted-genesis-registry-root ROOT together
with --chain-id ID. Save the result's finality_evidence with the
withdrawal or the complete deposit evidence returned above. It contains the
trust pins, transaction ID, replay tip, proof ID, signed block certificate,
decoded payment and matching receipt. An independently verified payment has
accepted: true and the literal receipt code accepted. Retain the
corresponding full archive for later replay.
A pending result means this archive has no receipt yet. Publish a new
complete archive version by atomically switching the verifier's path to the
new immutable directory, then query the same transaction ID. A rejected
result records the certified unsuccessful receipt. Archive errors fail the
verification. A polling timeout can precede finality, so continue looking
up the existing ID before considering a replacement payment.
Deposits¶
Deposit attribution has two options. The repository's custody model recommends the first.
1. One address per customer (recommended). Generate a unique address for each customer or deposit intent inside your custody boundary, back it up, and record the mapping before showing the address (Wallet Exchange Custody Model). There is no extended public key, so a watch-only system cannot derive new deposit addresses. Then:
- Watch each address with
account(balance) andaccount_tx(history). - For each inbound transaction, check finality and the accepted receipt with
txas described above before crediting. - Reconcile every balance change against the transactions you have credited (see Reconciliation).
2. Shared address with memos (the require-memo flag needs governance activation).
payment_v2 and issued_payment_v2 can carry up to four memos (512 bytes total).
The source implementation returns signed memo contents through tx and
account_tx, alongside their hash, count and byte length. This source is in
the running build (04600868). Rows written before it need an account history
index rebuild to carry v2 memos; whether the devnet's indexes were rebuilt is
not recorded here.
After governance enables require_memo_v2_activation_height, an exchange can set
its account's require-memo flag with account_set. Covered payments without a
memo then fail. The flag does not cover shielded withdrawals, escrow, atomic
swap, offer, NFT, bridge or FastPay credits: an exchange must handle those
separately and validate that a supplied memo identifies a customer. See
Custody And Exchange.
Sweeping. To consolidate, send ordinary transfers from deposit addresses to a hot wallet. Each sweep pays its own fee, and each deposit address keeps its 10-atom reserve. The first spend from a deposit address binds its public key.
Withdrawals¶
The SDK's quote-bound flow (Wallet Exchange Custody Model):
- Validate the destination (
^pf[0-9a-f]{40}$at minimum; the chain does not). - Request
transfer_fee_quotewithfromset to your hot wallet address. - Bind the quote to the exact request; the SDK rejects a quote whose sender, recipient, amount or sequence differs.
- Sign with
wallet_sign_transfer_from_quote(Rust SDK,crates/rpc_sdk/src/wallet_sdk.rs) or the Python helperssend_pftandsend_pft_and_poll_finality(python/postfiat_rpc/wallet.py; Python Wallet Functions). - Submit through a write-enabled RPC, then poll
txby transaction ID. - Store the finality evidence listed above.
What the Python client checks before it signs¶
Every Python signing helper (send_pft, send_pft_and_poll_finality,
submit_asset_transaction, submit_escrow_transaction,
submit_nft_transaction, submit_offer_transaction and the wrappers built
on them) passes the node's quote through check_signing_quote before the
key is touched. It raises QuoteRefusedError (code quote_mismatch,
quote_invalid or quote_fee_above_ceiling) and signs and submits nothing
when:
- the quote's
transaction_kind,source(or a transfer'sfrom) or any field of the requested operation differs from the request, in value or type; a field on one side only is a difference unless the operation's Rust type gives absence exactly that value:nullfor anOptionfield (never0or""),[]for a#[serde(default)]Vec(anOption<Vec>is absent only asnull), orfalse,0or""of the declared type for a#[serde(default)]scalar; list contents and order must match. The table is generated from the Rust types (scripts/generate_operation_schemas.py); a required field is never filled in; - a transfer's
tooramountdiffers; - a requested
sequenceis not the quoted one, or the chain id (and the genesis hash, when the wallet knows it) is not the wallet's; sequence,minimum_feeor a quoted amount is not a non-negative integer within u64 (nothing is coerced withint());minimum_feeis abovemax_fee_atoms.
max_fee_atoms is the caller's. The default, default_max_fee_atoms, is 4 x
(23 atoms for the signing envelope + the family's largest state-expansion
part + 1 atom per started 512 bytes of the requested operation or memos):
132 for transfers, escrows and NFTs, 212 for asset transactions (more for a
trust_set with a larger reserve_paid), 92 for offer_cancel. An
offer_create's match fee grows with the number of fills, which the fee
rule does not bound, so create_offer and place_offer require
max_fee_atoms. python -m postfiat_rpc.pftl_transfer send takes --max-fee-atoms.
If you call the signer yourself (postfiat-rpc-sdk wallet-sign-* or the Rust
SDK), compare the quote with your request before you sign: only
wallet-sign-quote (plain transfers) is given the request; the asset,
escrow, NFT and offer signers sign the quote's operation, fee and sequence.
Sequence and mempool rules (crates/execution/src/entrypoints.rs,
crates/node/src/mempool_proposals.rs, crates/node/src/lifecycle_queries.rs):
- Strict sequence. A transfer's
sequencemust equal the account's stored sequence plus one, or it is rejected withbad_sequence. - Rejected transfers change nothing. A rejected transfer moves no balance,
burns no fee (
fee_chargedis 0) and does not use up its sequence. - Pipelining. Mempool admission (
admit_signed_transfer_to_mempool) dry-runs the new transfer after the transfers already pending and admits it only if it would be accepted. It refuses a duplicate transaction ID or a second pending transaction with the same sender sequence. At most 64 transactions per sender and 1,024 in total may be pending.transfer_fee_quoteprices the next transfer on the ledger after the pending plain transfers, the ones admission runs before it. A quote taken while earlier withdrawals are pending therefore counts their debits and the accounts they create. An account that only a pending memo payment, asset, escrow, NFT or offer entry creates still costs the creation fee. - No expiry. A signed v1 transfer stays valid until its sequence is used. To cancel a signed but unexecuted withdrawal, use up that sequence with another transaction.
Fees¶
| Rule | Value | Source |
|---|---|---|
| Unit | 1 PFT = 1,000,000 atoms | python/postfiat_rpc/pftl_transfer.py; Faucet runbook |
| Byte fee | max(1, ceil(weight / 512)) atoms |
minimum_transfer_fee in crates/execution/src/fees_offer_planning.rs |
| Weight | Length of signing bytes + algorithm ID + public-key hex + signature hex | transfer_weight_bytes, same file |
| New-account fee | +10 atoms if the recipient account does not exist yet | TRANSFER_ACCOUNT_CREATION_FEE in crates/execution/src/entrypoints.rs |
| Burn | The whole fee field burns; nothing goes to validators |
execute_transfer, same file; Whitepaper |
| Reserve | Sender and recipient must each keep at least 10 atoms after the transfer | ACCOUNT_RESERVE, same file |
An ML-DSA-65 public key and signature in hex add 10,522 bytes to the weight, so
a typical native transfer costs 22 atoms, or 32 atoms when it creates the
recipient account. The canonical test vector shows fee = 32 for a transfer to
a new account
(Transparent Transaction Envelope).
payment_v2 uses the same formula, with memos counted in its weight. Always
use transfer_fee_quote rather than computing the fee yourself; a fee below
the minimum is rejected with fee_too_low.
Because of the reserve, the first deposit to a new address must be at least 10 atoms, and the last 10 atoms of an account cannot be withdrawn.
Reconciliation¶
- Balances.
accountreturnsaddress,balance,sequenceandpublic_key_hex(Accountincrates/types/src/account_owned_asset_types.rs). An address that has never been funded returns balance 0 and sequence 0. The response does not include a height, so recordstatusbefore and after a balance sweep. - History.
account_txreturns at mostlimitrows in ascending height order.truncated: truemeans rows may be missing; page withfrom_heightandto_heightor useaccount_tx_history(Account History). - What history misses. Rows come only from transparent blocks and from the
transparent credits of shielded (Orchard) withdrawals
(
account_tx_indexes_batch_kindandaccount_tx_rows_for_blockincrates/node/src/block_finality.rs; the disk index is rebuilt byrebuild_account_tx_indexincrates/node/src/account_tx_disk_index.rs). Value that reaches a transparent account through another lane changes the balance but does not appear inaccount_tx. Balance reconciliation must allow for this. FastPay and FastSwap objects have their own read methods (owned_objects,fastswap_objects). - Supply. Native PFT has a fixed genesis supply, every fee burns, and there is no validator reward (Whitepaper).
Known gaps before exchange integration¶
These are recorded limits, not hidden ones. Each must be closed or accepted before real customer funds are involved.
- No production network. Only a controlled devnet exists, run by one organization's six validators. Gate Zero (Z1–Z3) is open (Testnet Path).
- No external audit. 16 of 21 release gates were open in the 2026-09-01 inventory, including validator key custody, specialist review and launch authority (Security, Release Gate Inventory).
- No self-service node or public RPC. No public genesis, peer set or endpoint; independent archive and indexer onboarding is undecided.
- No published release artifacts. No signed download, checksum, SBOM or second-builder reproduction exists for outsiders to verify (release gate rows 6 and 7).
- Address-safety activation remains pending. The running build includes recipient validation at admission and an optional checksum; the execution rule waits for a governed activation height, which this guide does not record as set.
- No account key rotation, no hardware-wallet or external-signer interface for ML-DSA, and no formal backup-encryption standard (Wallet Exchange Custody Model, "Remaining Production Work").
- No watch-only address derivation; every deposit address needs custody-side secret material.
- History backfill is not recorded. The running build indexes transparent transactions and shielded withdrawals; other balance-changing lanes still need separate reconciliation.
- Required-memo activation remains pending. Source exposes signed memo contents and provides a governed account flag for covered payments.
- No transaction expiry in the v1 envelope.
- Controlled write path: transaction submission is off by default, and a persistent public write edge needs explicit abuse controls and operator acceptance (Write Policy).
- Plaintext validator keys and unsafe-devnet acknowledgement flags on the running services (Network Status).