1 of 32

EthCC 2019, Paris

1

XClaim - @alexeiZamyatin

Interoperability between Bitcoin and Ethereum - Trustless

Dominik Harz, EDCON, 2019, Sydney

2 of 32

Motivation

2

3 of 32

A History of Theft and Loss

EDCON 2019, Sydney

3

XClaim - @nud3l

4 of 32

A History of Theft and Loss

EDCON 2019, Sydney

4

XClaim - @nud3l

Decentralized Exchanges?

5 of 32

Decentralized Exchanges

“Decentralized” Exchanges (DEX)

Mostly limited to ERC20 tokens on Ethereum

Not „cross-chain“!

EDCON 2019, Sydney

5

XClaim - @nud3l

Trading volume

6 of 32

Cross-Chain Communication Today

Atomic Cross-Chain Swaps* (2012)

  • Ensure A 🡪 B and A 🡨 B occur atomically
  • Hashed Time-Lock Contracts (HTLCs)

Challenges

  • All parties must be online
  • No standardized interface for locks
  • Need out-of-band channel (censoring!)
  • Race conditions, mempool sniffing, …
  • Require monitoring of all involved chains

Wrapped Bitcoin

Challenges

  • Trusted third-party receiving Bitcoin
  • KYC and AML required
  • Relies on trust in legal system and is not decentralized

6

7 of 32

XCLAIM in a nutshell

First introduced at Scaling Bitcoin October 2018

Issue���

Trade/swap

Connect DEX, Plasma, payment channels, stablecoins cross-chain, and more�

Redeem

7

8 of 32

Why XCLAIM?

Trustless cross-chain token issue and redeem

  • Decentralised: no trusted third parties
  • Value redeemability: secured by collateral in Ethereum smart contracts
  • Compatibility: minimal requirements for backing chain

8

9 of 32

Conditional Locks in Bitcoin

Goal:

Unlock funds on Bitcoin only when tokens are burned

Challenge:

We cannot verify the state of Ethereum on Bitcoin

Can we use hashlocks?

Publicly verifiable contracts cannot generate random secret

  • We need an intermediary

EDCON 2019, Sydney

9

XClaim - @nud3l

10 of 32

System Model

EDCON 2019, Sydney

10

XClaim - @nud3l

Requester: locks Bitcoin to issue Bitcoin-backed tokens on Ethereum

Redeemer: burns Bitcoin-backed tokens to receive Bitcoin

Sender/Receiver: Send/receive Bitcoin-backed tokens

Vault: ensures correct redeeming on backing chain.

Collateralized and permissionless

Smart Contract: responsible for issuing, trading and redeeming. Enforces correctness of Vaults.

Intermediaries

11 of 32

Smart Contract

EDCON 2019, Sydney

11

XClaim - @nud3l

Base functionality:

  • Issue
  • Transfer / Swap
  • Redeem

Chain Relay:

  • Verify PoW
  • Verify TX inclusion proof

Collateralization:

  • Lock
  • Conditional release / Liquidate

12 of 32

Protocols

EDCON 2019, Sydney

12

XClaim - @nud3l

13 of 32

Issue

EDCON 2019, Sydney

13

XClaim - @nud3l

Vault

14 of 32

Issue: Precondition

EDCON 2019, Sydney

14

XClaim - @nud3l

🡪 Over-collateralization to mitigate exchange rate fluctuations

Vault

15 of 32

Issue

EDCON 2019, Sydney

15

XClaim - @nud3l

Vault

16 of 32

Issue

EDCON 2019, Sydney

16

XClaim - @nud3l

Vault

17 of 32

Issue

EDCON 2019, Sydney

17

XClaim - @nud3l

Vault

18 of 32

Issue

EDCON 2019, Sydney

18

XClaim - @nud3l

Vault

19 of 32

Swap & Transfer…

Simple ERC20 transfer / atomic swap!

Alice 🡪 Bob

EDCON 2019, Sydney

19

XClaim - @nud3l

20 of 32

Redeem

EDCON 2019, Sydney

20

XClaim - @nud3l

Vault

21 of 32

Redeem

EDCON 2019, Sydney

21

XClaim - @nud3l

Vault

22 of 32

Redeem

EDCON 2019, Sydney

22

XClaim - @nud3l

Vault

23 of 32

Redeem

EDCON 2019, Sydney

23

XClaim - @nud3l

Vault

24 of 32

Redeem

EDCON 2019, Sydney

24

XClaim - @nud3l

Vault

25 of 32

Redeem

EDCON 2019, Sydney

25

XClaim - @nud3l

Vault

26 of 32

Redeem

EDCON 2019, Sydney

26

XClaim - @nud3l

If the vault cannot provide proof of correct behavior:

  • Collateral slashed
  • Bob reimbursed

Vault

27 of 32

System Properties

EDCON 2019, Sydney

27

XClaim - @nud3l

  1. Auditability: all actions on both chains logged
  2. Consistency: backed-assets only issued if proof provided
  3. Redeemability: receive Bitcoin or be reimbursed in Ether
  4. Liveness: no third party: Any user can be a vault!!
  5. Atomic Swaps: swap Bitcoin vs Ether via smart contract
  6. Scale-out: more collateral, more assets can be issued
  7. Compatibility: minimal requirements for backing chain

28 of 32

Implementation

EDCON 2019, Sydney

28

XClaim - @nud3l

  • XCLAIM smart contract: Solidity v0.5.x (~ 820 LOC)

  • BTCRelay: SerpentSolidity implementation is WIP�https://github.com/ethereum/btcrelay

  • Tested on Ropsten

29 of 32

Performance and Costs

EDCON 2019, Sydney

29

XClaim - @nud3l

Exchange rate: USD 220 / ETH (Gas cost: 5 gwei); USD 4.497 / BTC

“Recommended” security parameters: 14 sec x 12 ETH Tx confs; 10 min x 6 BTC Tx confs.

30 of 32

Comparison to HTLC Atomic Swaps

EDCON 2019, Sydney

30

XClaim - @nud3l

BTC-ETH swaps with XCLAIM are 95.7% faster and 64.5% cheaper for 1000 independent swaps.

31 of 32

Joint Work With

EDCON 2019, Sydney

31

XClaim - @nud3l

Alexei

Zamyatin

Joshua

Lind

Panayiotis

Panayiotu

Arthur

Gervais

William

Knottenbelt

32 of 32

EthCC 2019, Paris

32

XClaim - @alexeiZamyatin

eprint.iacr.org/2018/643

github.com/crossclaim

Questions?

Dominik Harz

@nud3l

d.harz@imperial.ac.uk

Website: xclaim.io