This story draft by @escholar has not been reviewed by an editor, YET.
Protocol
Security Analysis
A. Codes
B. Proofs
Theorem 6. Protocol 4.2 satisfies option correctness: If both the Alice and Bob are conforming, then if Alice does not exercise the right, Alice doesnβt lose the π΄π π ππ‘π΄ and Bob doesnβt lose the π΄π π ππ‘πΊ and π΄π π ππ‘π΅; or if Alice exercise the right, then Alice will receive π΄π π ππ‘π΅ and Bob will receive π΄π π ππ‘π΄ and π΄π π ππ‘πΊ .
Proof. According to Protocol 4.2, it is evident that if Alice escrows her collateral in the πΆπππ‘ππππ‘π΄ contract and calls ππ₯πππππ π (), then a conforming Bob will reveal the pre-image π΅ in πΆπππ‘ππππ‘π΄ to reclaim the guarantee π΄π π ππ‘πΊ and Aliceβs collateral π΄π π ππ‘π΄. Subsequently, Alice can use π΅ to obtain π΄π π ππ‘π΅. If Alice does not escrow the collateral, Bob will not reveal π΅. After the option expires at ππΈ +2Ξ, Bob can callπππππ() and ππ π π’ππ () on the respective chains to reclaim π΄π π ππ‘πΊ and π΄π π ππ‘π΅.
Theorem 7. Protocol 4.2 satisfies exercisablity: During the transfer from Bob to Dave, the option remains active, allowing Alice to exercise the option without any delays.
Proof. According to Protocol 4.2.1, during the transfer from Bob to Dave, Alice can make a deposit and exercise her option at any time. If the transfer is in the Setup Phase, Bob will need to reveal π΅ to fulfill his obligation and revoke the transfer. It is important to note that Dave can use π΅ to reclaim π ππππ π . If the transfer is in the Attempt Phase and Bob acts maliciously by using π΅ to take π΄π π ππ‘πΊ , Alice can use π΅ to obtain π΄π π ππ‘π΅. Dave will need to use π΅ on πΆπππ‘ππππ‘π΅ to withdraw the transfer. Otherwise, when Dave uses ππ to change the writer and the hash lock, he will reveal a new preimage secret π·, which Alice can then use to obtain π΄π π ππ‘π΅.
Theorem 8. Protocol 4.2 satisfies failure compensation: Before expiration, Alice can exercise the option successfully, or if the exercise fails, she is compensated with the guarantee deposited by Bob.
Proof. By Theorem 6, if Alice successfully exercises her option, she will receive Bobβs collateral. Otherwise, after Alice makes a deposit and calls ππ₯πππππ π (), πΆπππ‘ππππ‘π΄ can invoke ππ π·ππππ ππ‘ππ () to determine if the exercise has occurred. If Bob does not fulfill his obligation within a period of Ξ, Alice can call πππππ() to obtain π΄π π ππ‘πΊ as compensation, and Bob will lose his guarantee.
Authors:
(1) Zifan Peng, The Hong Kong University of Science and Technology (Guangzhou) Guangzhou, Guangdong, China ([email protected]);
(2) Yingjie Xue, The Hong Kong University of Science and Technology (Guangzhou) Guangzhou, Guangdong, China ([email protected]);
(3) Jingyu Liu, The Hong Kong University of Science and Technology (Guangzhou) Guangzhou, Guangdong, China ([email protected]).
This paper is available on arxiv under CC BY 4.0 license.