引用本文:卓凤,段田田,贾林鹏,李忠诚,孙毅.OpenSwap: 基于先锁后绑模式的跨链资产交换协议.软件学报,,():1-23
【打印本页】   【下载PDF全文】   查看/发表评论  【EndNote】   【RefMan】   【BibTex】
←前一篇|后一篇→ 过刊浏览    高级检索
本文已被:浏览 501次   下载 178 本文二维码信息
码上扫一扫!
分享到: 微信 更多
OpenSwap: 基于先锁后绑模式的跨链资产交换协议
卓凤1,2, 段田田1, 贾林鹏1, 李忠诚1,2, 孙毅1,2,3,4
1.中国科学院 计算技术研究所, 北京 100190;2.中国科学院大学 计算机科学与技术学院, 北京 100049;3.未来区块链与隐私计算高精尖创新中心 (北京航空航天大学), 北京 100083;4.山东省区块链金融重点实验室, 山东 济南 250014
摘要:
跨链资产交换是资产跨区块链流通的典型模式之一. 以哈希时间锁(hashed timelock contract, HTLC)协议为代表的现有跨链资产交换方案普遍采用“先绑定跟随方、跟随方再锁定资产”的先绑后锁模式. 在该模式下, 一旦已绑定的跟随方退出, 发起方将无法更换交换对象, 只能等待时间锁超时后回收资产并重新发起交换, 从而显著延长交换周期并带来高额的链上开销. 为此, 提出一种先锁后绑的跨链资产交换新模式, 即交换开始前不在合约中预设跟随方, 而是由符合条件的响应方先行锁定资产, 再将其绑定为跟随方. 该模式可避免绑定对象退出带来的多次重试与资产长期锁定问题. 在该模式下, 提出一种基于地址签名锁的跨链资产交换协议——OpenSwap. OpenSwap设计了一种地址签名锁, 通过将跟随方身份信息嵌入锁结构, 使其随着资产的锁定与解锁过程在两条链之间同步, 从而确保两条链对跟随方绑定的一致性. 此外, OpenSwap还通过挑战期、协助解锁等设计, 提升协议安全性和执行效率. 理论分析与实验结果表明, OpenSwap在保证原子性的同时, 显著降低了交换延迟, 并在低用户响应场景下降低了链上开销, 为跨链资产交换提供了更灵活与高效的解决方案.
关键词:  区块链  跨链资产交换  哈希时间锁
DOI:10.13328/j.cnki.jos.007641
分类号:TP311
基金项目:国家重点研发计划(2023YFB2704803); 国家自然科学基金(U22B2032)
OpenSwap: Cross-chain Asset Swap Protocol Based on Lock-then-bind Mode
ZHUO Feng1,2, DUAN Tian-Tian1, JIA Lin-Peng1, LI Zhong-Cheng1,2, SUN Yi1,2,3,4
1.Institute of Computing Technology, Chinese Academy of Sciences, Beijing 100190, China;2.School of Computer Science and Technology, University of Chinese Academy of Sciences, Beijing 100049, China;3.Beijing Advanced Innovation Center for Future Blockchain and Privacy Computing (Beihang University), Beijing 100083, China;4.Shandong Key Laboratory of Blockchain Finance, Jinan 250014, China
Abstract:
Cross-chain asset swaps are a typical mode of asset circulation across blockchains. Existing cross-chain swap solutions, represented by the hashed timelock contract (HTLC) protocol, typically adopt a bind-then-lock mode, in which the follower is bound first and then locks assets. Under this mode, once the bound follower withdraws, the initiator cannot replace the swap counterparty and must wait for the timelock to expire before reclaiming the assets and restarting the swap process, which significantly prolongs the swap duration and incurs high on-chain costs. To address this issue, this study proposes a lock-then-bind mode for cross-chain asset swaps. In this paradigm, the follower is not pre-specified in the contract before the swap starts. Instead, an eligible responder first locks assets and is then bound as the follower. This paradigm avoids repeated retries and long-term asset locking caused by follower withdrawal. Under the new paradigm, this study proposes a cross-chain asset swap protocol based on an address signature lock, namely OpenSwap. OpenSwap designs an address signature lock by embedding the follower’s identity information into the lock structure, enabling it to be synchronized between two blockchains during the asset locking and unlocking process, thus ensuring consistency in follower binding across both chains. In addition, OpenSwap enhances protocol security and execution efficiency through the introduction of a challenge period and an assisted unlocking mechanism. Theoretical analysis and experimental results demonstrate that OpenSwap ensures atomicity while significantly reducing swap latency and lowering on-chain costs in low user response scenarios, providing a more flexible and efficient solution for cross-chain swaps.
Key words:  blockchain  cross-chain asset swap  hashed timelock contract (HTLC)