Someone initiating a cross-chain bridge transfer on laptop, phone showing confirmation, coffee shop background, casual DeFi moment.
Protocols

Atomic Cross-Chain Swaps via Shared Validator Sets

An advanced implementation pattern for trustless, peer-to-peer asset swaps between two Avalanche Subnets that share a common validator set, eliminating third-party bridge risk through shared security atomicity guarantees.
introduction
Shared Security Atomic Swaps

Introduction

A trust-minimized pattern for cross-chain asset exchange between two Avalanche Subnets that share an identical validator set, eliminating the need for external bridges or third-party intermediaries.

Atomic cross-chain swaps via shared validator sets represent an advanced interoperability pattern unique to the Avalanche Subnet architecture. When two Subnets are validated by the exact same set of nodes, they share a common source of truth for state finality. This shared security domain allows for a native atomicity guarantee: a transaction on Subnet A can be cryptographically conditioned on the successful execution of a transaction on Subnet B, enforced directly by the validators who are responsible for both chains. Unlike hash time-locked contracts (HTLCs) that rely on economic incentives and timelocks, this pattern achieves true atomicity at the consensus level, removing liveness and griefing risks associated with traditional cross-chain swap designs.

The mechanism leverages Avalanche Warp Messaging (AWM) to carry signed attestations of state from one Subnet to the other within the same validator set. Because the validators are identical, the destination chain can verify a BLS multi-signature from the source chain's validator set without introducing additional trust assumptions—the signers are the same entities securing the destination chain. This allows a smart contract on the destination chain to programmatically verify that a specific action (e.g., an asset lock or burn) has been finalized on the source chain, and then atomically execute the corresponding leg of the swap. The pattern is particularly relevant for app-chain clusters, DeFi subnetworks, and institutional settlement networks where multiple sovereign chains operate under a unified operator group or consortium.

Operators and protocol architects evaluating this pattern must rigorously assess failure recovery mechanisms. If one leg of the swap reverts after the Warp message is delivered, the system must guarantee that the other leg can be unwound without loss of funds. Chainscore Labs can review the atomicity guarantees, replay protection, and failure recovery logic in cross-chain swap contracts to ensure they do not introduce subtle race conditions or liveness vulnerabilities that could trap user assets.

ATOMIC SWAP SECURITY MODEL

Quick Facts

Key technical and operational facts about atomic cross-chain swaps that rely on shared validator sets for trustless execution.

FieldValueWhy it matters

Trust Model

Relies on a single validator set securing both source and destination Subnets

Eliminates the need for a third-party bridge, but couples the security of both chains to the same set of operators.

Atomicity Guarantee

Enforced by the shared validator set's ability to attest to state on both chains via Warp Messaging

A failure in the validator set's liveness or honesty can break the swap's atomicity, leading to partial fills or stuck assets.

Failure Mode

Validator set partition or >1/3 Byzantine behavior

Can lead to a scenario where a swap is completed on one chain but the corresponding attestation for the other chain is never produced or is invalid.

Liveness Dependency

Swap completion requires the shared validator set to be live and producing Warp signatures

A network halt on either Subnet or a liveness fault in the shared validator set will freeze all in-flight swaps.

Replay Protection

Must be implemented in the swap contract logic using nonces or expiring hashlocks

Without explicit replay protection, a valid Warp message could be re-executed to drain funds after a swap is completed or cancelled.

Validator Collusion Risk

A supermajority of the shared validator set can collude to steal locked assets

The economic security of the swap is bounded by the total stake of the shared validator set. The cost to corrupt the swap is the cost to corrupt the subnet.

Operational Requirement

Operators must monitor Warp message signing participation and Subnet block production

A drop in validator participation below the signature threshold will halt swaps and requires immediate investigation.

technical-context
SHARED SECURITY ATOMICITY

Technical Mechanism

How shared validator sets enable trustless cross-chain swaps without third-party bridges or hash time-locked contracts.

Atomic cross-chain swaps between two Avalanche Subnets sharing the same validator set derive their security directly from the primary network's consensus mechanism. Because both Subnets are validated by the identical set of nodes, a validator can attest to the state of both chains simultaneously within a single Warp message, eliminating the need for external oracles or bridge relayers to verify cross-chain events. This shared view of state is the foundational property that makes atomicity achievable without introducing additional trust assumptions.

The mechanism works by having the source chain's VM produce a Warp message that includes a cryptographic commitment to the swap's conditions—typically a hash of the intended recipient, asset type, and amount—signed by the validator set's aggregated BLS signature. The destination chain's VM, running on the same validators, can verify this signature against the known validator set weight and execute the corresponding mint or release operation. Because the same validators are responsible for block production on both chains, the swap can be executed as a single logical operation: the burn on the source chain and the mint on the destination chain are both included in blocks produced by the same set, making partial execution detectable and preventable at the protocol level.

Failure recovery in this model relies on the validators' ability to observe and act on incomplete swaps. If a burn transaction is included on the source chain but the corresponding mint fails on the destination chain—due to a VM bug, gas issues, or a malformed message—the validators can produce a reversal Warp message that authorizes a refund on the source chain. This recovery path is only possible because the validator set has a consistent view of both chains' state and can coordinate the corrective action without relying on user-initiated challenge periods or external watchtowers. Teams implementing this pattern should ensure their VM logic handles these reversal messages atomically and that the swap contract on the source chain can only release refunds when presented with a valid, quorum-signed reversal attestation.

Chainscore Labs can review the atomicity guarantees and failure recovery mechanisms in shared-validator-set swap implementations, assessing whether the VM-level logic correctly handles edge cases such as validator set rotation during an in-flight swap, signature aggregation failures, and race conditions between swap execution and reversal message generation.

WHO MUST ACT ON THIS PATTERN

Affected Actors

Subnet Architects

Teams designing two Subnets that share a validator set must define the atomic swap protocol at the VM level. This includes specifying the cross-chain message format, timeout windows, and failure recovery paths. Architects must ensure that both Subnets' state machines can interpret and enforce the shared security assumption—namely, that a validator set attesting to a state transition on one chain is equally authoritative on the other.

Key responsibilities include:

  • Defining the cryptographic proof format for validator set attestations.
  • Setting timeout parameters that account for cross-chain message propagation delays.
  • Designing the refund mechanism for cases where the swap cannot complete.

Chainscore Labs can review the atomicity logic, timeout economics, and trust model to ensure the swap cannot be broken by a subset of validators.

implementation-impact
SHARED VALIDATOR SET SWAP RISKS

Implementation Impact Areas

Atomic cross-chain swaps using shared validator sets introduce unique trust, liveness, and failure-mode considerations that differ from third-party bridge architectures. Teams must validate atomicity guarantees, replay protection, and recovery paths before deployment.

01

Atomicity Failure and Partial Execution Risk

The core promise of this pattern is that both swap legs execute or neither does. However, atomicity can break if a validator set changes mid-swap, if the destination Subnet halts, or if a Warp message expires without delivery. Teams must model failure scenarios where one side of the swap completes and the other reverts, and implement application-level recovery mechanisms. Chainscore can review the atomicity logic in your swap contracts and test failure recovery paths against Subnet liveness edge cases.

02

Shared Validator Set Trust Assumptions

This pattern replaces bridge operator trust with trust in the shared validator set. If a majority of validators are malicious or faulty, they can sign conflicting Warp messages, enabling double-spend attacks across the two Subnets. The security model collapses to the honesty of the overlapping validators. Teams must assess validator collusion risk, stake distribution, and slashing enforcement. Chainscore can evaluate the economic security of your validator set and recommend threshold configurations that align with the value at stake in cross-chain swaps.

03

Warp Message Replay and Ordering Protection

Without proper nonce management and source-chain identification, a valid Warp message could be replayed on the destination chain to drain funds or manipulate state. Implementations must include chain ID binding, per-message nonces tracked in the receiving contract, and checks that the source chain's validator set weight meets a configurable threshold. Chainscore can audit your Warp message verification logic for replay vulnerabilities and ordering assumptions that could be exploited during validator set transitions.

04

Validator Set Churn During Swap Execution

If the shared validator set rotates while a cross-chain swap is in flight, the destination Subnet may receive a Warp message signed by validators that no longer represent the current stake weight. The receiving contract must decide whether to accept messages from a previous validator set and for how long. This creates a trade-off between liveness and security. Chainscore can help design validator set transition windows and message acceptance policies that minimize swap failure risk without opening replay attack vectors.

05

Subnet Liveness and Timeout Coordination

A swap can deadlock if the source Subnet produces the Warp message but the destination Subnet halts before delivery. The initiating user's funds are locked until the destination recovers or a timeout path executes. Teams must define explicit timeouts, cancellation paths, and user communication strategies for stalled swaps. Chainscore can review your timeout logic and design monitoring alerts that detect liveness disruptions before they cascade into user fund lockups.

06

Integration Testing Across Subnet Boundaries

Testing atomic swaps requires simulating cross-Subnet message delivery, validator set changes, and Subnet halts in a controlled environment. Standard C-Chain testnets do not replicate these conditions. Teams need custom test harnesses that can manipulate Warp message delivery timing and validator set state. Chainscore can build integration test suites that validate swap atomicity under adversarial network conditions and provide coverage reports for failure modes identified in your threat model.

ATOMICITY AND SHARED SECURITY FAILURE MODES

Risk Matrix

Evaluates the specific risks introduced when two Subnets rely on a shared validator set for atomic cross-chain swaps, including failure modes that break atomicity, compromise funds, or create denial-of-service vectors.

RiskFailure modeSeverityMitigation

Validator Set Partition

A subset of the shared validator set stops validating one Subnet, breaking the shared security assumption and potentially allowing a swap to finalize on only one chain.

High

Implement a liveness threshold in the swap contract that requires a minimum percentage of validator weight to have signed recent blocks on both chains before a swap can be initiated.

Conflicting Swap Finalization

Due to a client bug or network asynchrony, validators sign a Warp message finalizing a swap on chain A but fail to produce a block on chain B, leaving the counterparty asset locked.

Critical

Swap contracts must include a timelock expiry that allows the original depositor to reclaim assets if the counterparty claim is not executed within a fixed window.

Long-Range Bribery Attack

An attacker bribes historical validators after their stake has been withdrawn to sign a fraudulent Warp message that unlocks a completed swap's collateral.

Medium

Receiving contracts must verify the BLS multi-signature against the validator set weight at the specific block height of the event, not the current weight, and reject messages signed by a set with insufficient stake.

Warp Message Replay

A valid Warp message confirming a swap on the source chain is replayed on the destination chain by a relayer to drain funds multiple times.

High

The destination contract must maintain a mapping of consumed Warp message IDs and strictly enforce an idempotency check before releasing any assets.

Shared Validator Collusion

A supermajority of the shared validator set colludes to sign a fraudulent Warp message that mints unbacked assets on one Subnet.

Critical

The economic security of the swap is bounded by the total stake of the shared validator set. Protocols should limit the notional value of a single swap to a fraction of this stake and monitor for concentration risks.

Relayer Censorship

The designated relayer service fails to deliver the Warp message to the destination chain, stalling the swap indefinitely.

Low

The swap protocol must be permissionless, allowing any party to deliver the Warp message and claim a relayer reward, ensuring liveness even if a specific relayer is unavailable.

Subnet Governance Takeover

The governance mechanism controlling the shared validator set is exploited to add a malicious validator majority, which then steals all locked swap collateral.

High

Operators must assess the governance attack surface of the Subnet managing the validator set. A timelock on validator set updates can provide a window for intervention.

ATOMIC SWAP READINESS

Implementation Checklist

A practical checklist for engineering teams implementing trustless cross-chain swaps between two Subnets sharing a validator set. Each item focuses on verifying the atomicity guarantees, failure recovery, and operational readiness of the integration.

What to check: Confirm that both the source and destination Subnets are actively validated by the exact same set of nodes with identical stake weights at the time of the swap.

Why it matters: The atomicity guarantee relies entirely on the shared security model. If validator sets have diverged—due to a pending validator rotation, slashing event, or a node falling out of sync—the trust assumption breaks. A swap could be finalized on one chain but not the other.

Readiness signal: Your off-chain swap coordinator or smart contract queries the current validator set from both Subnets' P-Chain state and confirms a 100% match in NodeIDs and their respective weights before initiating the swap transaction.

Chains We Build On

Looking to build on a specific blockchain?

We build smart contracts, DeFi applications, wallets, tokenization platforms, and blockchain infrastructure across the major ecosystems teams choose today. That includes Ethereum, Arbitrum, Optimism, Polygon, Avalanche, Solana, Sui, Aptos, Hedera, Stellar, and NEAR, with support for additional EVM and non-EVM networks based on your product requirements.

EVM ecosystems

  • Ethereum logo
    Ethereum
  • Arbitrum logo
    Arbitrum
  • Optimism logo
    Optimism
  • Polygon logo
    Polygon
  • Avalanche logo
    Avalanche
  • Cronos logo
    Cronos

Non-EVM ecosystems

  • Solana logo
    Solana
  • Sui logo
    Sui
  • Aptos logo
    Aptos
  • Hedera logo
    Hedera
  • Stellar logo
    Stellar
  • NEAR logo
    NEAR

Additional ecosystems

  • Polkadot logo
    Polkadot
  • Cosmos logo
    Cosmos
  • TON logo
    TON
  • Cardano logo
    Cardano
  • Algorand logo
    Algorand
  • Tempo logo
    Tempo

Also available for Base, appchains, custom EVM networks, and cross-chain product architecture.

OPERATIONAL AND SECURITY FAQ

Frequently Asked Questions

Common questions from protocol architects and security engineers evaluating or implementing atomic swaps using shared validator set security on Avalanche.

The atomicity guarantee relies on the fact that the same set of validators is responsible for finalizing blocks on both Subnets. If a validator set is shared, a transaction on Subnet A and a corresponding transaction on Subnet B can be linked by a cryptographic commitment. The protocol can enforce that the second transaction is only valid if the first has been finalized, and vice versa, because the same validators witness both chains. This removes the need for a third-party bridge or external oracle. However, the guarantee is only as strong as the honesty of the shared validator set; if a threshold of validators is malicious, they could theoretically finalize conflicting states on both chains. Teams should model this as a single-honest-majority assumption across the combined security budget.

Trusted by Industry Leaders

Delivering blockchain solutions for 5+ years.

We have partnered with 50+ leading DeFi protocols, NFT ecosystems, and fintech innovators to build secure, scalable, and capital-efficient blockchain products.

Selected Partners & Clients

ChainVote logo
Reax logo
Sokail logo
Swapsicle logo
SyntheX logo
Tekika logo
Telos logo
Zexe logo
ChainVote logo
Reax logo
Sokail logo
Swapsicle logo
SyntheX logo
Tekika logo
Telos logo
Zexe logo
ChainVote logo
Reax logo
Sokail logo
Swapsicle logo
SyntheX logo
Tekika logo
Telos logo
Zexe logo
ChainVote logo
Reax logo
Sokail logo
Swapsicle logo
SyntheX logo
Tekika logo
Telos logo
Zexe logo
“I've been working with Chainscore Labs for last 3+ years, they've consistently delivered with strong ownership across multiple projects. The team is reliable and detail-oriented.”
L
Lee Erswell
CEO, Telos Foundation
how to get started

How to get started?

If you're looking for blockchain integration, ChainScore Labs has 5+ years of experience helping teams build and integrate exchanges, wallets, smart contracts, tokenization solutions, and protocol-connected products, we can help you choose the right path, integrate securely, and get to production faster. Our team consists of experienced blockchain developers and architects who can help you with your blockchain integration needs.

01

Exploration & Strategy

Define your product goals and choose the right blockchain architecture for your use case.

02

Architecture & Design

Design the smart contracts, tokenomics, and security parameters of your system.

03

Development & Integration

Build and integrate with wallets, oracles, and front-end dApps for a seamless experience.

04

Security & Launch

Comprehensive audits followed by a risk-managed mainnet deployment to protect your users.

Start a build

Need a blockchain engineering team?

Send the project context and we will respond with next steps, scope questions, and a practical path to delivery.