Ablockchain Atomic Swap

https://en.bitcoin.it/wiki/Atomic_swap Algorithm 2 pay txs and 2 claim tx claim txs are singed at first, locked with time 2 pay txs are encrypted by x, affects only when x is reveal on the network Initialization A: random number x tx1: A pay B A Pay BTC to B’s public key if x known & singed by B or Signed by A & B tx2: A claim tx1 pay BTC to A’s public key locked 48 hours signed by A ...

November 8, 2019 · 1 min · 159 words · chechiachang

Blockchain Bep3 Atomic Swap

BEP3 Atomic Swap Binance 在 BEP3: HTLC and Atomic Peg 提到,BEP 即將在 binance chain 上支援原生的 Hash Timer Locked Transfer (HTLT) ,這使跨鏈的原子性交換 (atomic swap) 變得可行,透過 HTLC 在兩邊的鏈上鎖住 (peg) tokens,然後只有在執行交換的時候,透過 hash 交換,一次執行雙邊的交易。 關於 Atomic Swap 網路有非常多的訊息,有興趣的話可以看這篇 交易只有在雙邊完成後才完成,完成之前不能動用交換的資產 在任何階段失效都可以完全 fallback,並進行 refund 交易的認證是去中心化的 這邊有個但書,Ethereum 上是透過 smart contract 實現,但 Binance chain 上還是靠 Binance 認證 XD Binance 在 BEP3 中支援 HTLC,我們這邊主要的資訊來源是 binance.org 的官方說明文件,這邊針對文章進行驗證,並且補足文件缺漏的部分,提醒過程中可能會踩到的雷。 跨鍊(Cross Chain) 交易 在部署 asset / token 的時候,我們會選擇合適的鏈作為發布資產並運行 block chain app。常用的應用鏈如 ethereum 與 binance chain 等等。不同的主鏈上有各自的優缺點,例如使用 ethereum ,可以與許多 token 與應用互動,也是最多人使用的應用主鏈。而在 binance 鏈上執行,則能夠快速的發生 transactions,並且可以與 binance 上的資產與交易所互動。 ...

October 22, 2019 · 14 min · 2861 words · chechiachang