金融交易的網路與資訊化發展迅速,線上交易工具應而崛起,常見大型金融機構提供線上系統用以操作金流資訊,而區塊鏈的發明提供了一個機制,使得金流資訊得以去中心化,不必信任特定實體也得以安全的交易。 以區塊鏈和數位貨幣進行網路交易時,金流透過區塊鏈的共識機制與不可竄改特性被保證有效,但交易仍然可能存在線下部分,如貨品交付或服務提供。牽涉到線下交易時,經常透過中間商進行第三方託管 (Escrow) 或第三方支付 (Third-party Payment) 以保證整個交易的原子性;傳統第三方託管模式中,不論是貨幣或實體資產,至少其一的所有權會被轉移給第三方實體,故必須保證第三方實體完全可信。 使用智慧合約技術,將貨幣與數位資產託管於智慧合約中,第三方實體不擁有資產,只有仲裁之權利,得以將其排除到直接利害關係人之外,降低託管之風險與對第三方實體的必須信任程度。除了貨幣以外,區塊鏈的智慧合約技術亦可用來實作、儲存其他數位資產,以代幣 (Token) 作為特定事物與權力的數位憑證,並交易之。然而現實存在著多種類型或非公開之區塊鏈,數位貨幣與資產可能存在於不同區塊鏈中;在跨鏈情境下進行第三方託管,需解決不同區塊鏈網路的多筆、不同數位貨幣、資產之交易以及鏈外行為之共同原子性 (Atomicity)。 本研究提出一個跨鏈第三方託管 (Cross-chain Escrow) 交易模型與流程,以智慧合約進行第三方託管,並讓半信任 (Semi-trusted) 第三方進行整個交易的有效性判斷,以保證跨鏈交易和線下行為同時發生之原子性。使用以太坊平台開發、實現HTLA (Hashed Time Lock Agreements) 之託管合約。
Financial ecosystem has adopted network and information technology rapidly, and thus the online transaction tools arise. Financial institutions usually provide online systems which allow users access the cash flow. The appearance of blockchain made decentralization of cash flow possible; users may transact online without trusting any certain entity. The cash flow of online transaction with digital currency on blockchain has been secured by consensus algorithm and immutability of blockchain, but the transaction may still consist offline procedure such as goods delivering and service providing. When the transaction involves offline procedure, we often include mediator who provides escrow or third-party payment service to ensure the atomicity of the whole transaction. In traditional escrow procedure, the ownership of both or at least one of the goods and cash would be held by the escrow entity. As the result, the escrow entity must be fully trustworthy. Using smart contract, we may store digital currency and property in it, and exclude the escrow entity from direct stakeholders. The escrow entity can’t take away the ownership, while they can still arbitrate the escrow procedure when dispute occurs. In this way, we may lower the risk of escrow and the trustworthy level of the escrow entity. Smart contract may also be used to implement other digital property by creating token as a digital certification and manage them. However, there are several kinds of blockchains, and thus the digital currency and token (digital certification) may not be on the same blockchain. When multiple blockchains involve, escrow has to solve the problem that atomicity of procedures on different blockchains, even offline, must be satisfied, such as payment, token transfer and physical delivery. This study proposes a cross-chain escrow model which use smart contract to execute escrow process and let a semi-trusted third party to arbitrate the escrow, ensure atomicity of cross-chain and not-only-blockchain transaction. Implement a HTLA escrow smart contract on ethereum.