Skip to content

fix(pattern): correct cross-chain atomicity claims in ERC-7573 cards - #198

Open
oskarth wants to merge 1 commit into
masterfrom
fix/erc7573-atomicity-claims
Open

fix(pattern): correct cross-chain atomicity claims in ERC-7573 cards#198
oskarth wants to merge 1 commit into
masterfrom
fix/erc7573-atomicity-claims

Conversation

@oskarth

@oskarth oskarth commented Sep 11, 2026

Copy link
Copy Markdown
Collaborator

The private PvP card claimed "both legs settle or both revert, without relying on time-locks for safety." Its own recipe finalised the paying leg first (step 3) and then said both escrows revert on failure (step 6). A settled payment can't revert. Step 2 also had each escrow wait on the other leg, which can't release either.

What changes

  • Private PvP via ERC-7573: the recipe now follows the shape ERC-7573 specifies. One leg is locked, the other pays through the decryption contract, and the oracle's key releases or returns the locked leg ("for a two-party DvP with two tokens only one token requires locking", EIP-7573). The guarantee is now conditional settlement with its assumptions named: verified key setup, an honest and available oracle, and key delivery. The card also says ERC-7573 has no timeout; it replaces HTLC time-locks with trust in the oracle.
  • Atomic DvP via ERC-7573: drops the timeout reclaim, which ERC-7573 doesn't define and which can fire after the buyer has paid. Step 1 now names a target settlement time, not a guaranteed unwind.
  • Permissioned Ledger Interoperability: a malicious two-phase-commit coordinator can split the outcome, not only stall it (Zhao; Canton's docs treat the mediator as trusted). The partition line now says two-phase commit blocks rather than breaks.

Other sources: the authors' paper (arXiv 2311.05966), Zamyatin et al. on why cross-chain atomicity needs a trusted party or synchrony, and Gray and Lamport.

Checks

  • validate-patterns.js and check-terminology.js pass in strict mode.
  • The PvP card is 905 words, over the 800-word soft limit (warning only; the DvP card was already over it).

The private PvP card finalised the paying leg, then claimed both
escrows revert on failure and atomic settlement without time-locks.
A settled payment cannot revert. Rewrite the recipe to the ERC-7573
shape: one leg locked, the other paid through the decryption
contract, and an oracle key that releases or returns the locked leg.
State the guarantee as conditional on the oracle.

The DvP card offered a timeout reclaim that ERC-7573 does not define
and that can fire after the buyer has paid. The permissioned-ledger
card said a malicious coordinator can only stall; under two-phase
commit it can split the outcome.
@oskarth
oskarth requested a review from rymnc September 11, 2026 05:22

@rymnc rymnc left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, some comments inline

## Protocol

1. [user] Two institutions agree off-chain on the asset, quantity, payment token, amount, shared trade identifier `T`, and a latest time to settle or unwind.
1. [user] Two institutions agree off-chain on the asset, quantity, payment token, amount, shared trade identifier `T`, and a target settlement time (ERC-7573 enforces no on-chain deadline).

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
1. [user] Two institutions agree off-chain on the asset, quantity, payment token, amount, shared trade identifier `T`, and a target settlement time (ERC-7573 enforces no on-chain deadline).
1. [user] Two institutions agree off-chain on the asset, quantity, payment token, amount, shared trade identifier `T`, and a target settlement time.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mentioned below

Threat model:

- Honesty of the sync coordinator or relayer set. A malicious coordinator can stall commits but cannot unilaterally fabricate state.
- Honesty of the sync coordinator or relayer set. A crashed coordinator blocks domains that have already prepared. A malicious one can send different decisions to different domains, breaking atomicity, unless a Byzantine fault tolerant commit protocol prevents conflicting decisions.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- Honesty of the sync coordinator or relayer set. A crashed coordinator blocks domains that have already prepared. A malicious one can send different decisions to different domains, breaking atomicity, unless a Byzantine fault tolerant commit protocol prevents conflicting decisions.
- Honesty of the sync coordinator or relayer set. An unavailable coordinator prevents execution of transactions in its domains. A malicious one can send different decisions to different domains, breaking atomicity, unless a Byzantine fault tolerant commit protocol prevents conflicting decisions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants