Layerswap V8 Atomic Bridging protocol’s specification.
This document specifies the Layerswap V8 Atomic Bridging protocol, a permissionless and trustless cross-chain asset transfer system based on improved Hashed Timelock Contracts (PreHTLCs). The protocol aims to facilitate seamless asset movement across multiple blockchain networks without relying on third parties or oracles.
Presents a series of diagrams illustrating different transaction flows within the protocol, covering both standard scenarios and edge cases.
Visualizes the typical sequence of actions in a successful atomic swap transaction using the protocol.
sequenceDiagram
participant P1 as Party 1
participant SC as Source Chain
participant P2 as Party 2
participant DC as Destination Chain
P1->>SC: commit()
SC-->>P2: TokenCommitted
P2->>DC: lock()
DC-->>P1: TokenLocked
P1->>SC: lockCommitment()
SC-->>P2: TokenLocked
P2->>DC: redeem()
DC-->>P1: TokenRedeemed
P2->>SC: redeem()
SC-->>P2: TokenRedeemed
sequenceDiagram
participant P1 as Party 1
participant SC as Source Chain
participant P2 as Party 2
participant IC as Intermediary Chain
participant P3 as Party 3
participant DC as Destination Chain
P1->>SC: commit()
SC-->>P2: TokenCommitted
P2->>IC: commit()
IC-->>P3: TokenCommitted
P3->>DC: lock()
DC-->>P1: TokenLocked
P1->>SC: lockCommitment()
DC-->>P2: TokenLocked
P2->>IC: lockCommitment()
IC-->>P3: TokenLocked
P3->>DC: redeem()
DC-->P1: TokenRedeemed
P3->>IC: redeem()
IC-->>P2: TokenRedeemed
P2->>SC: redeem()
Explores potential failure scenarios and how the protocol handles them to ensure fund safety and transaction integrity.
sequenceDiagram
participant P1 as Party 1
participant SC as Source Chain
participant P2 as Party 2
participant DC as Destination Chain
P1->>SC: commit()
SC-->>P2: TokenCommitted
P2->>DC: lock()
DC-->>P1: TokenLocked
P1->>SC: lockCommitment()
SC-->>P2: TokenLocked
P2->>SC: redeem()
SC-->>P1: TokenRedeemed
P1->>DC: redeem()
DC-->>P1: TokenRedeemed
sequenceDiagram
participant P1 as Party 1
participant SC as Source Chain
participant P2 as Party 2
participant DC as Destination Chain
P1->>SC: commit()
SC-->>P2: TokenCommitted
P2->>DC: lock()
DC-->>P1: TokenLocked
P1->>SC: lockCommitment()
SC-->>P2: TokenLocked
Note over P2,DC: Timelock passes
P2->>DC: unlock()
DC-->>P2: TokenUnlocked
Note over P1,SC: Timelock passes
P1->>SC: unlock()
SC-->>P1: TokenUnlocked
sequenceDiagram
participant P1 as Party 1
participant SC as Source Chain
participant P2 as Party 2
participant DC as Destination Chain
P1->>SC: commit()
SC-->>P2: TokenCommitted
P2->>DC: lock()
DC-->>P2: TokenLocked
Note over P1,SC: Timelock passes
P1->>SC: uncommit()
SC-->>P1: TokenUncommited
Note over P2,DC: Timelock passes
P2->>DC: unlock()
DC-->>P2: TokenUnlocked