Developer guide

Architecture and data

4 min read

42. Why does the platform use a decoupled, event-driven architecture?

A blockchain operation can take time, fail temporarily, or go through several providers. Keeping an HTTP call open for the whole process would produce timeouts, duplicates and low resilience.

The API records the operation and publishes events. Specialized processes continue signing, execution, observation, reconciliation and notification.

This model allows retrying steps, isolating failures, scaling components independently, and rebuilding an operation's complete history.

43. How are platform administration and financial processing separated?

The architecture defines two functional scopes:

  • Control Plane, which administers tenants, credentials, networks, assets, providers, contracts, limits, fees and policies;
  • Data Plane, which processes users, wallets, quotes, operations, signing, execution, ledger and events.

The Data Plane uses an approved configuration version. An administrative change does not modify an operation already in progress.

These terms describe parts of ChatterPay B2B, not Kubernetes' internal control plane.

44. What is the operational ledger?

The operational ledger is ChatterPay B2B's internal, chronological financial record. It is information persisted in the database: it records movements, but it is not a wallet and does not custody crypto assets. Through append-only movements, it represents which amounts were reserved, sent, received, charged as a fee, consumed as gas, refunded or adjusted for each operation, asset, tenant and beneficiary.

Its purpose is to explain an operation's economic outcome. The blockchain provides the on-chain facts, such as a confirmed transaction and its amounts; the Operation keeps the workflow; the ledger keeps how those facts financially impact the system's and the Partner's internal accounts.

45. What is reconciliation and how does it relate to the ledger?

Reconciliation is the verification process that compares what was expected with what actually happened. It contrasts the Operation and its legs, the ledger's movements, the transactions observed on each blockchain, and the states or charges reported by providers like LI.FI.

When the data matches, it confirms the financial result and releases the corresponding reservations. When there is a difference — for example, actual gas different from the estimate, a refund, a different received amount, or an ambiguous transaction — it records the discrepancy and generates the applicable compensating adjustment or manual review. Reconciliation uses the ledger; it is not another record of funds.

46. How are events published without losing consistency with the database?

Transactional Outbox is a widely used architectural pattern for coordinating database changes with the asynchronous publication of messages. It is a design pattern, not a protocol or a specific product.

The operation and the pending event are saved atomically in the same PostgreSQL transaction. An independent process reads that Outbox and publishes the event to Pub/Sub.

Each consumer records in an Inbox the identifiers of the messages it already processed. This allows detecting repeated deliveries and applying the result only once.

This lets the platform assume at-least-once delivery: a message may repeat, but the financial result must not be duplicated.

47. How is an operation kept alive for hours or several days without depending on one process's memory?

Each operation is split into persisted steps, such as validation, reservation, signing, simulation, submission, observation, accounting and notification.

Each worker executes a bounded transition, saves the result and publishes the next event. If the process restarts, another worker continues from the durable state.

Operations with swaps or bridges add independent legs for each transaction or stage. A leg is an executable unit with its own network, provider, amount, payload, hash and status; several legs make up the result of a single Operation.

48. What happens when a transaction may have been submitted but no conclusive response was received?

The operation moves to an ambiguous-result state, such as broadcast_unknown.

The platform keeps the signed payload and looks for evidence via hash, nonce, receipts and on-chain observation. It only resubmits the same artifact when it is safe to do so.

It does not create a second transfer or rebuild another transaction with a different nonce.