Skip to main content
Engineering

How Rockpile verifies a bridge transfer

Why a signed quote, a source-chain deposit, and a provider’s success report each need different checks before a bridge transfer is complete.

A bridge transfer has at least two financial events: funds leave on one chain, and funds arrive on another. A source transaction can succeed while the destination payment is still pending. A provider can also report success before the wallet has verified a receipt.

Rockpile’s cross-chain engine separates quote validation, deposit authorization, and destination verification. This article uses the implemented ZEC/SOL engine to explain those checks. The implementation checks and the live evidence needed to release a route are separate parts of that story.

Review the whole transfer before funding it

A deposit address alone is not enough information to approve a bridge. The user also needs the source amount, destination asset and address, minimum arrival amount, deadline, and refund destination.

Rockpile binds the provider’s quote to those terms before preparing the source payment. The native review includes the final destination, minimum arrival amount, and refund address alongside the immediate deposit. This lets the user assess what the deposit is intended to accomplish, rather than approving a transfer to an unexplained intermediate address.

The engine stores the quote and operation state in the encrypted portfolio database. The signed source transaction’s identity is persisted before network submission, so a lost response does not erase the evidence needed to investigate the deposit.

A quote signature authenticates specific fields

A provider-signed quote can establish who issued the signed terms and whether those terms changed. It does not automatically authenticate every field in the surrounding response, guarantee settlement, or validate a later status message.

The provider adapter verifies the signed quote and checks later responses against that retained quote. It also validates requested assets, amounts, deposit mode, and unsupported additions.

Those checks have different strengths. Rejecting a changed unsigned field detects disagreement with the stored request; it does not turn that field into a signed promise. The provider’s signature format and exact field coverage are therefore part of the integration’s trust model.

Persist uncertainty instead of issuing another deposit

Consider a crash just after the wallet signs and submits the source payment. On restart, the quote may have expired and the provider may not yet show the deposit.

That does not establish that nothing was funded. The engine retains the operation and continues reconciliation using the original deposit identity. It must not close an uncertain submission as unfunded simply because the quote deadline passed.

Approval and cancellation are processed in a controlled sequence so they cannot race to create or cancel the same deposit operation. Deadline checks run before funding, including after a long approval or proving step. A quote that was valid when first displayed can be stale by the time the transaction is ready to leave.

Observe the destination payment

Validate quote and full terms
              ↓
Approve and record source payment
              ↓
Submit the original transaction
              ↓
Reconcile provider status
              ↓
Verify destination-chain receipt

Provider status supplies information for reconciliation. The engine marks settlement only after observing an acceptable destination-chain receipt.

For the ZEC/SOL paths, verification checks the recipient, amount, and required confirmations through the relevant chain data. The provider’s claimed output must meet the quote’s minimum, and the observed receipt must cover that claimed amount. The tests reject unrelated transactions, underpayments, failed transactions, and receipts that lack enough confirmations. A transaction ID supplied by a provider is a lead to investigate, not sufficient evidence by itself.

These checks depend on the chain data used to establish the receipt. The provider also supplies the association between a swap and its destination transaction. A matching receipt verifies that the expected address received enough funds; it does not independently prove the provider’s attribution of that payment to this particular swap.

Refunds need the same discipline

A provider saying “refunded” is not the same as the wallet receiving a refund. Rockpile checks the refund destination and requires an observed receipt covering the provider’s claimed refund before presenting that claim as verified. Without the necessary transaction identifiers or chain evidence, the refund remains unverified. The same check applies to partial refunds and returned excess input.

For Zcash, a transparent refund remains transparent until a separate shielding transaction confirms. A bridge status must not imply that an arrival is shielded merely because the user started with shielded funds.

The provider can also associate deposit, destination, and refund information. Quote authentication and settlement verification protect transaction handling; they do not guarantee anonymity or eliminate provider risk.

Test the live route as well as the engine

Local signed-quote fixtures test interrupted deposits, stale approvals, altered responses, receipt mismatches, and refunds. Live provider acceptance, actual settlement, refund behavior, and supported-platform signing require separate bounded drills. The implementation keeps funding behind a privileged release gate until the route’s requirements are satisfied.

For operational guidance, see bridge transfers and checking bridge status. The principle behind both is the same: keep the source payment, provider report, and observed destination receipt distinct until the evidence connects them.