Skip to main content

Overview

Settlement risk occurs when one party delivers an asset without receiving payment, or vice versa. This approach documents multiple mechanisms for achieving atomic settlement where both legs complete or neither does, eliminating counterparty risk. Single-network vs cross-network atomicity: On a single network (L1 or L2), atomic settlement is an inherent property of blockchain transactions—a smart contract can execute both legs in one transaction, making atomicity straightforward. Cross-network settlement (e.g., L2↔L2 or L1↔L2) is fundamentally harder: trustless atomicity across independent chains remains an open research problem. Current cross-network approaches rely on trusted intermediaries, oracles, or optimistic assumptions. Relationship to Atomic DvP via ERC-7573: The ERC-7573 pattern (draft; requires trusted oracle) specifically addresses cross-network coordination. This approach is more general, documenting the core atomicity mechanisms (HTLCs, escrow, oracles) that work on single networks or can be composed with ERC-7573 for cross-network scenarios.

TLDR for Different Personas

Eliminates settlement risk - both legs complete or neither does. Reduces counterparty exposure and enables trustless settlement with unknown parties.
Multiple implementation options: HTLCs for trustless atomic swaps, escrow with dual approval for institutional workflows, oracle-based for event-driven settlement. Can integrate with EIP-6123 for derivatives.

Architecture and Design Choices

Payment Locking Mechanisms

Mechanism
string
Payment locked with hash; released when preimage revealed
Atomicity
string
Preimage revelation unlocks both legs simultaneously
Timeout
string
Automatic refund if preimage not revealed within window
Use Case
string
Cross-chain atomic swaps, trustless counterparties
1

Generate Secret

Seller generates secret S, shares hash H(S)
2

Lock Payment

Buyer locks payment with H(S) and timeout T1
3

Lock Asset

Seller locks asset with H(S) and timeout T2 (T2 < T1)
4

Reveal Secret

Seller reveals S to claim payment
5

Claim Asset

Buyer uses S to claim asset

Escrow Conditions

ConditionDescriptionExample
Settlement DateRelease on specific timestampT+2 bond settlement
Lock PeriodMinimum hold before release allowedVesting schedules
ExpiryAutomatic return if not settled by deadlineFailed trade cleanup
ConditionDescriptionExample
Payment ConfirmationRelease when payment finality confirmedBank transfer clearing
Regulatory ApprovalRelease when compliance check passesCross-border settlement
Multi-sig ThresholdRelease when N-of-M parties approveCommittee settlement
ConditionDescriptionExample
Price BoundsSettlement only if price within rangeLimit orders
Collateral RatioRelease only if collateralization maintainedMargin calls
Net SettlementBatch and net multiple obligationsClearing house

Integration with EIP-6123 (Derivatives)

For derivative contracts using EIP-6123 lifecycle management:
Lifecycle EventDvP Integration
Trade ConfirmationLock initial margin in escrow
Valuation UpdateAdjust escrow based on mark-to-market
Margin CallConditional release requires margin top-up
SettlementFinal exchange of payment vs position closure
Early TerminationEscrow handles close-out netting

Protocol Flow

1

Agree

Counterparties agree on asset, payment amount, escrow conditions, and timeout parameters.
2

Lock Asset

Seller transfers asset to escrow contract with release conditions.
3

Lock Payment

Buyer transfers payment to escrow contract with matching conditions.
4

Verify

Escrow contract (or oracle) verifies all conditions are met.
5

Settle

If conditions satisfied, escrow atomically transfers asset to buyer, payment to seller.
6

Timeout

If conditions not met by deadline, escrow returns assets to original owners.
  • Standards: ERC-20 or ERC-721 for asset and payment tokens; ERC-7573 (draft) for cross-network coordination; EIP-6123 for derivative lifecycle
  • Infrastructure: Escrow smart contract with conditional release logic; time-lock or hash-lock primitives; event listeners for settlement triggers
  • Settlement: Asset token contract (security, bond, derivative position); payment token contract (stablecoin, tokenized deposit, CBDC); settlement coordinator (on-chain or hybrid)

Trade-offs and Open Questions

Guarantees

Settlement Atomicity - Both legs complete or neither completes; no partial settlement
Counterparty Risk Elimination - Assets locked in escrow, not held by counterparty
Deterministic Outcomes - Clear conditions define exactly when settlement occurs
Timeout Safety - Automatic recovery path if settlement conditions not met

Trade-offs

Capital Lockup - Assets locked during settlement window reduce liquidity
Condition Complexity - Complex conditions increase gas costs and audit surface
Oracle Dependency - Event-based conditions require trusted oracle infrastructure
Cross-Network Trust - Cross-network settlement requires trusted intermediaries or oracles; trustless cross-network DvP remains an unsolved problem

Failure Modes

FailureImpactMitigation
Oracle failureSettlement blockedMulti-oracle consensus, manual fallback
Network congestionTimeout before settlementGenerous timeout windows, priority fees
Escrow bugAsset lossFormal verification, audits, insurance
Counterparty disappearsDelayed recoveryAutomatic timeout refunds
Condition ambiguityDisputed settlementPrecise condition specification, arbitration

Example: Bond Purchase with Tokenized Deposit

1

Asset Manager A sells €1M corporate bond to Bank B on L2 network

2

Lock Bond

A locks bond tokens in escrow contract with conditions: release to B if €1M EURC received, timeout in 24 hours.
3

Lock Payment

B locks €1M EURC in same escrow with matching trade ID.
4

Verify

Escrow verifies both legs present and conditions aligned.
5

Settle

Escrow atomically transfers: bond to B, EURC to A.
6

Fallback

If B had not deposited EURC within 24 hours, A would reclaim bond via timeout.

Atomic DvP via ERC-7573

Cross-network DvP coordination

ERC-3643 RWA Tokenization

Compliant security tokens

MPC Custody

Secure key management for escrow

Commit and Prove

Privacy-preserving condition verification

References

Build docs developers (and LLMs) love