Protocol
Security Analysis
A. Codes
B. Proofs
Implementation. We implemented, tested, and evaluated our proposed protocol, Efficient Cross-Chain Options without Upfront Holder Collateral, in Section 4.2.1. This was conducted within a simulated environment using the Ethereum Virtual Machine (EVM) (Remix VM Cancun) and the Solidity Compiler version 0.8.22. We employ the same signature algorithm as Ethereum, utilizing the secp256k1 curve and the Elliptic Curve Digital Signature Algorithm (ECDSA) [17]. Since EVM does not support direct on-chain verification of a public-private key pair, we implement the proof of the private key ๐ ๐ by signing a specific message with it. The corresponding codes are provided in Appendix A.
Expected Transfer Time Evaluation. We compared our work with that of Engel and Xue [12]. Assuming that the probability of an option being transferred and ultimately finalized within the current network is ๐, the total number of transfers is ๐. Then, in their protocol, ๐ follows a geometric distribution, i.e. ๐ โผ ๐บ(๐). The relationship between the expected successful transfer time and the successful transfer probability of each phase is illustrated in Figure 3, where mutate lock phase in Engel and Xueโs protocol to corresponds to the reveal phase in our protocol. When a large number of malicious nodes exist in the current network, say, the finalization probability is 10%, the duration of the mutate lock phase and the consistency phase in their protocol becomes significantly prolonged, reaching 45ฮ, which is approximately equivalent to 2 days in Bitcoin. By initiating the replace phase earlier and consolidating the mutate and consistency phases, we significantly reduce the duration of these phases.
Gas Consumption Evaluation. Figure 4 lists the gas consumption for contract deployment, option operations, and gas consumption in different phases, where gas price is 4.131 Gwei and ETH price is $2274.87 (Sep 7, 2024). We calculate the maximum gas used for each operation. In the transfer failure case, we only calculate the gas consumption of conforming parties.
Notably, as shown in Figure 4a, compared to Engel and Xueโs protocol, the gas consumption for the holder transfer process has significantly decreased from 714,867 to 510,857 gas (a reduction of approximately 28.5% for successful transfers). For failed transfers, the gas consumption decreases from 330,350 gas to 248,388 gas (a reduction of approximately 3.4%). The gas consumption of the transferring writer also decreases to a similar level. The gas consumption for exercising an option increases from 96,916 to 145,337, while the gas consumption for abandonment decreased. This is because, during an exercise, Alice needs to deposit funds and Bob must fulfill the request by revealing the exercise secret. In contrast, for an abandonment, Bob only needs to perform a refund operation.
Figure 4b illustrates the gas consumption of a successful transfer across different phases. In our protocol, the reveal phase only requires the seller to reveal a signature in one contract, significantly reducing gas consumption compared to the mutate and replace/revert phases, lowering the gas for the holder and the writer to 123,158 and 123,435 gas, respectively. However, gas usage in the consistency phase is higher than that of their protocol, as we verify signatures in both contracts to ensure consistency.
The gas consumption for contract deployment in our protocol is generally higher compared to Engel and Xueโs protocol due to additional security measures and DAPS support. For instance, the deployment costs for ๐ถ๐๐๐ก๐๐๐๐ก๐ด and ๐ถ๐๐๐ก๐๐๐๐ก๐ต in our protocol are 2,549,610 and 2,220,156 gas, respectively. Nonetheless, this is acceptable, as deploying a transferable HTLC contract in Engle and Xueโs protocol consumes around 2.0M gas, while our protocol adds more secure operations and reduces the cost of option transfer.
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.