Table of Links
-
Protocol
-
Security Analysis
A. Codes
B. Proofs
B.2 Option
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鈥檛 lose the 饾惔饾憼饾憼饾憭饾憽饾惔 and Bob doesn鈥檛 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鈥檚 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鈥檚 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]).