Wallet Infrastructure / Stablecoin Payments

Custom wallet infrastructure for on-chain stablecoin payments

An NDA-protected implementation with dedicated deposit addresses, blockchain observation, token and network validation, a confirmation engine, internal ledger and treasury workflows.

NDA / Confidential clientClient implementationFinTech / Blockchain Infrastructure / Digital AssetsNDA
Crypto & Stablecoin Payment SystemsWallet infrastructureBlockchain indexingPayment ledgerTreasury workflowsOperations & monitoring
Architecture of dedicated stablecoin payment wallets with transaction observer, ledger and treasury
Project overview

Softech designed native stablecoin payment infrastructure for an NDA-protected client using dedicated blockchain addresses. The solution does not treat an on-chain transfer as a finished user balance: an address is first linked to business context, an observer detects the event, the system validates network, token and amount, a confirmation engine waits for the chosen finality policy, and only then does the internal ledger apply the business effect. Sweeping and treasury operate separately, so an internal treasury failure does not invalidate an otherwise correctly credited customer payment.

01 / Context

Business context and the situation before implementation

In this product, blockchain payment was part of the core domain rather than a checkout add-on. The system had to identify customer deposits deterministically and process them automatically without relying on manual explorer checks or a shared treasury address.

  • A payment address had to map to a user, account or specific payment intent.
  • Transfers had to be validated by network, token contract, destination and amount.
  • The system had to separate transaction detection from final product credit.
  • After crediting, funds could move through a separate treasury workflow without altering user history.

Before state

The simplest model — one shared wallet with manual transaction checks — does not scale operationally and does not provide deterministic mapping from transfer to obligation. It is equally risky to derive product balance directly from the current blockchain balance.

  • A shared address makes deterministic ownership and payment-purpose mapping difficult.
  • RPC or indexer availability can be interrupted, so the observer must replay missed blocks.
  • A technically valid transfer may still use the wrong token, network or amount.
  • Treasury movement after payment is a different process from crediting the user obligation.
02 / Strategy

Goals, success criteria and constraints

Discovery covered address ownership, payment-intent lifecycle, finality policy, blockchain data sources, replay requirements, invalid-transfer classification and the boundary between customer ledger and treasury. The key decision was to treat blockchain as an event source rather than the product accounting ledger.

Product goals

  • Assign dedicated addresses to business context without exposing private keys to the application layer.
  • Detect stablecoin transfers with replay capability and without duplicate processing.
  • Validate network, token contract, destination, amount and finality policy.
  • Credit payments in an internal ledger independent of blockchain balance.
  • Separate treasury sweeping from the customer payment lifecycle and provide exception handling.

Success criteria

  • Every observed transfer has a deterministic event key and can be safely reprocessed.
  • The product does not credit payment before finality and token-validation rules are satisfied.
  • An RPC or indexer outage does not permanently lose a payment event.
  • A sweep failure does not reverse a correctly credited customer payment.
  • Operations can distinguish underpayment, overpayment, wrong token, wrong network and manual-review cases.

NDA and key security

We do not disclose the exact custody model, derivation paths, addresses, key providers or production security parameters.

Asynchronous finality

Detecting a transfer does not automatically mean the product should credit the user immediately.

Multiple failure domains

RPC, indexer, queue, database and sweep service can fail or become unavailable independently.

Custody and application separation

The product layer should not have direct access to keys capable of unrestricted treasury transfers.

Analysis and product decisions

  • We defined ownership and lifecycle of a dedicated payment address.
  • We established deterministic event identity from transaction, log index and network context.
  • We defined checkpointing and safe block-replay boundaries.
  • We mapped DETECTED, CONFIRMING, CONFIRMED, CREDITED and exception states.
  • We separated payment acceptance from sweeping and later treasury management.
03 / System

Solution architecture

The system combines address allocation and wallet registry, a checkpointed blockchain observer, validation and confirmation engine, event store, internal ledger and a separate sweep/treasury pipeline. Each layer is designed to be recoverable and replayable without crediting the same payment twice.

Architecture diagram
Product layers and responsibilities
Logical view
  1. 01
    Layer 01

    Address allocation and wallet registry

    A dedicated address receives an explicit link to a user, account or payment intent together with lifecycle state.

    Dedicated addressesWallet registry
  2. 02
    Layer 02

    Blockchain observer

    The observer reads blocks and token events, stores checkpoints and can safely replay a range after a data-source outage.

    RPC / indexerCheckpointingReplay
  3. 03
    Layer 03

    Validation and confirmation engine

    The layer validates network, token contract, destination, amount and the selected confirmation policy before crediting.

    Token validationFinality policyState machine
  4. 04
    Layer 04

    Blockchain event store and internal ledger

    The raw blockchain event is preserved as evidence, while an accepted payment event creates a controlled entry in the product ledger.

    Event storeInternal ledgerIdempotency
  5. 05
    Layer 05

    Sweep, treasury and operations

    After payment credit, funds can move according to treasury policy while exceptions are routed to controlled operator workflows.

    Sweep serviceTreasury workflowOperational review
Key flows
Payment intentDedicated addresscontext assignment
BlockchainObservertoken-transfer detection
ObserverConfirmation enginevalidation and finality
Confirmation engineInternal ledgersingle credit
Deposit walletTreasuryseparate sweep workflow
04 / Product

Problems, decisions and implemented capabilities

Decision 1Confirmed in the product
Problem

A single shared address would not deterministically identify deposit ownership.

Decision

Addresses are allocated and registered against a specific user or payment intent.

Capability

Deterministic deposit mapping

Outcome

A transfer can be mapped to the correct domain context without guessing from amount or memo.

Decision 2Confirmed in the product
Problem

A data-source outage could cause a block to be missed.

Decision

The observer stores checkpoints and supports safe range replay.

Capability

Recoverable chain observation

Outcome

After recovery, the system can catch up on events without duplicate credits.

Decision 3Confirmed in the product
Problem

A token transfer alone does not guarantee payment validity.

Decision

Before crediting, the system checks network, token contract, destination, amount and finality.

Capability

Validated payment acceptance

Outcome

Wrong token, wrong network and mismatched amounts are not automatically credited as valid user balance.

Decision 4Confirmed in the product
Problem

Blockchain balance does not represent product obligations and history.

Decision

An independent internal ledger is used as the business source of truth.

Capability

Product ledger independent of chain balance

Outcome

Product balance preserves history and domain semantics independently of later treasury movements.

Decision 5Confirmed in the product
Problem

Treasury sweeping may fail even after a valid customer payment.

Decision

Customer credit and sweeping use separate state machines and retry policies.

Capability

Decoupled treasury operations

Outcome

An internal treasury transfer failure does not reverse a correctly confirmed customer payment.

Technology decisions

TechnologyRoleRationaleTrade-off
Dedicated deposit addressesDeposit identificationThe address becomes a stable routing key from a transfer to specific business context.More addresses increase registry, monitoring and custody-policy complexity.
RPC / indexer observerBlockchain event sourceIt enables automated token-transfer detection and historical reconstruction from blocks.It requires redundancy or recovery strategy for unavailable or inconsistent sources.
Checkpoint + replayRecoverabilityThe system knows the last processed range and can replay scanning after failure.Replay must be fully idempotent and efficient over larger ranges.
Confirmation engineFinalityIt separates DETECTED from CONFIRMED and allows finality policy to match network and product risk.More conservative policies increase user waiting time.
Internal ledgerBusiness stateIt preserves obligations and history independently of current blockchain and treasury balances.It requires explicit synchronization and reconciliation with the on-chain layer.
Sweep serviceTreasury movementIt consolidates funds or applies treasury policy without burdening the customer payment lifecycle.It introduces a separate domain for fee management, nonce handling and retries.

Integrations and data flows

Blockchain RPC / indexer

Chain → observer

Provides blocks, logs and token-transfer events to the detection layer.

Checkpointing and replay reduce the risk of event loss during temporary source outages.

Wallet / custody layer

Allocator ↔ wallet layer

Provides payment addresses and controlled execution for later transfers without exposing keys to the product domain.

The public description does not disclose the exact custody or key-management model.

Treasury operations

Ledger → sweep / treasury

Triggers internal fund movement only after the payment event has been correctly credited.

Sweeping has separate state and retries, so failure does not change customer payment status.

05 / Control

AI, security and reliability

No private keys in the product domain

Application logic works with wallet identifiers and controlled requests rather than raw signing secrets.

Deterministic event identity

Every blockchain event receives a stable identity so replay and multiple sources cannot create duplicate credits.

Checkpointing and backfill

The observer stores progress and supports controlled backfill of missing blocks.

Separate state machines

Customer payment, confirmation and treasury movement are not one status, so downstream failure cannot reverse a correct deposit.

Manual review instead of automatic guessing

Invalid or ambiguous transfers are routed to review instead of changing balance based on heuristics.

06 / Delivery

Implementation, testing and release

  1. 1
    Phase 1 / Wallet domain

    Define address ownership, allocation lifecycle and custody boundary.

    • Wallet registry
    • Address allocation rules
    • Custody boundary contract

    Result: Addresses gained explicit business-context relationships without moving signing secrets into the application.

  2. 2
    Phase 2 / Chain observation

    Detect transfers with checkpointing, replay and deterministic event identity.

    • RPC/indexer adapter
    • Checkpoint store
    • Replay and deduplication

    Result: The observation layer can catch up on missed events and safely process them again.

  3. 3
    Phase 3 / Validation and ledger

    Separate detection, confirmation and final product credit.

    • Token/network validation
    • Confirmation state machine
    • Internal ledger entries

    Result: Product balance is created only after payment rules are satisfied and preserves its own history.

  4. 4
    Phase 4 / Treasury and operations

    Add sweeping, retries, monitoring and manual handling for ambiguous events.

    • Sweep state machine
    • Treasury reconciliation
    • Operations exception queue

    Result: Fund movement and exceptions were separated from the core customer payment lifecycle.

Replay of the same block range

Re-scanning cannot create another payment credit for an already processed event.

Wrong token / wrong network

A transfer to a known address that violates asset or network rules becomes an exception rather than valid balance.

Underpayment and overpayment

Amounts different from expected are not automatically normalized without an explicit product policy.

RPC outage and catch-up

After a controlled outage, the observer resumes from checkpoint and catches up on missing events.

Sweep failure

A failed treasury transfer remains retryable and does not change the status of a correctly credited customer payment.

07 / Verification

What confirms the project description

The case study does not publish on-chain volume, address count or treasury data. Technical outcomes are described through verifiable architecture properties: deterministic mapping, replay, validation, controlled finality, an independent ledger and separation of customer payment from treasury operations.

ScopeBasisReferenceConfirmationInterpretation boundary
A dedicated address is linked to business context before transfer acceptance.Wallet architecture diagramCW-01 · project material and implementation architectureOperationally confirmedThe public diagram does not reveal derivation or custody design.
Transfer detection and final payment credit are separate states.Observer and confirmation diagramCW-02 · project material and implementation architectureOperationally confirmedExact finality thresholds for production networks remain confidential.
The observer can replay block ranges using checkpointing and idempotent processing.Observer and confirmation diagramCW-02 · project material and implementation architectureOperationally confirmedRPC provider topology and redundancy configuration are not published.
The product ledger is independent of blockchain balance and later sweeping.Ledger and treasury diagramCW-03 · project material and implementation architectureOperationally confirmedThe public version does not expose the client internal accounting schema.
Treasury sweeping is a separate workflow with its own state and retries.Ledger and treasury diagramCW-03 · project material and implementation architectureOperationally confirmedTreasury addresses and fee-management rules remain confidential.
Wrong token, wrong network and mismatched amount are classified before crediting.Observer and confirmation diagramCW-02 · project material and implementation architectureOperationally confirmedThe public diagram shows exception classes rather than the client exact risk rules.

How to read this information

  • Address and active-wallet counts are not published.
  • Production networks, finality thresholds and transfer volumes are not published.
  • Custody model, key providers and treasury addresses are not published.
  • Outcomes are described as system capabilities rather than percentage business KPIs.
08 / Lessons

Process change, decision consequences and lessons

AreaBeforeAfterBusiness impact
Deposit identificationA shared address would require extra heuristics or manual mapping.A dedicated address has explicit ownership and payment-intent context.A transfer can be mapped automatically to the correct domain context.
Blockchain detectionAn event missed during an RPC outage could remain unnoticed.Checkpointing and replay allow the range to be scanned again.The system can recover state without manually inserting transactions.
FinalityA detected transfer could be credited too early.The confirmation engine separates DETECTED, CONFIRMING, CONFIRMED and CREDITED.Risk policy becomes explicit and controlled.
Product balanceBlockchain balance mixes technical funds with user-obligation semantics.The internal ledger preserves domain state independently of where funds are held.Treasury can change without changing customer history.
TreasuryFund consolidation would sit in the same path as customer payment.Sweeping runs as a separate retryable workflow.A treasury failure does not invalidate a correct deposit.
Decision trade-off

Dedicated addresses

Alternative
One shared address
Trade-off
More wallet objects and higher operational registry cost.
Rationale
Deterministic payment mapping is more important than the simplicity of one address.
Decision trade-off

Checkpointed observer

Alternative
Realtime websocket only
Trade-off
More processing logic and checkpoint storage.
Rationale
The system can recover from interruption and does not depend on one continuous connection.
Decision trade-off

Internal ledger

Alternative
Blockchain as the only balance source
Trade-off
Additional reconciliation and data layer.
Rationale
It preserves obligation, refund and product-history semantics.
Decision trade-off

Separate sweep workflow

Alternative
Immediate sweep before payment credit
Trade-off
More operational states and retries.
Rationale
Customer payment is not blocked by a treasury operation that can fail independently.

Key lessons learned

  • A blockchain address is a technical identifier; the payment intent gives it business meaning.
  • The observer should support replay from day one because a realtime event stream is not a completeness guarantee.
  • A blockchain event and product-ledger entry should have an explicit auditable relationship without being the same record.
  • Finality policy is a product and risk decision, not an arbitrary confirmations value in code.
  • Treasury is a downstream process and should not decide whether a valid customer payment exists.
09 / Relevance

Which organisations this model is relevant for

FinTech and account-based products

When stablecoin deposits fund a user account or affect the core product balance.

Marketplaces and multi-sided platforms

When the system must distinguish many payers, beneficiaries and treasury flows.

Products with treasury workflows

When funds require consolidation, allocation or other internal operations after payment.

Systems requiring on-chain control

When a managed gateway does not provide enough control over addresses, transfer identification or product state.

Custom wallets / on-chain payments

Need a native payment rail instead of a managed gateway?

We can design wallet allocation, blockchain observation, confirmation policy, internal ledger, reconciliation, sweeping and treasury so payment becomes part of the product domain rather than merely a transfer to an address.

Discuss custom payment infrastructure
10 / Scope

Key confirmed facts

The following statements summarise the confirmed product scope and contain no unapproved growth data.

  1. 1

    The client project is protected by an NDA and the organization name is not published.

  2. 2

    The implementation uses dedicated addresses to identify stablecoin deposits.

  3. 3

    The system maintains a registry linking addresses to business context.

  4. 4

    The blockchain observer uses checkpointing and replay capability.

  5. 5

    Transfers are validated by network, token contract, destination and amount.

  6. 6

    Transfer detection is separated from final product credit.

  7. 7

    Product balance is maintained in an independent internal ledger.

  8. 8

    Sweeping and treasury are separated from the customer payment lifecycle.

  9. 9

    Invalid or ambiguous transfers are routed into controlled exception handling.

  10. 10

    The custody model, keys, addresses, volumes and security parameters are not published.

11 / Editorial responsibility

Prepared and reviewed by

Prepared by

Softech Product & Engineering

Prepared from an anonymized NDA-protected wallet and payment infrastructure implementation.

About Softech
Reviewed by

Softech Technical Review

Reviewed for on-chain/off-chain consistency, confidentiality boundaries and absence of client custody or security disclosures.

About Softech
Published: 2026-08-10Last updated: 2026-08-10

FAQ

Does every customer need a separate wallet?

Not always. A dedicated address may be assigned per user, account, invoice or payment intent depending on the business model, privacy, cost and custody approach.

Why is blockchain balance not the user balance?

An address balance only tells you how much value is on-chain. It does not tell you which obligation a transfer belongs to, whether it was accepted, whether it is final or whether the product has already credited it.

How does the system handle RPC or indexer outages?

The observer stores checkpoints and processes blocks idempotently, so it can resume from a known point or replay a selected range without crediting the same event twice.

Does a treasury sweep have to complete before the customer payment is complete?

No. Crediting the payment intent and moving funds to treasury are separate workflows. A sweeping failure should not reverse an otherwise correctly confirmed customer payment.

How are wrong tokens and networks handled?

Transfers are classified by network, token contract, destination and amount. Events that do not satisfy payment-intent rules are not automatically credited as valid payments.