Fair Exchange based on Smart Contract: A Generalization of FairSwap and OptiSwap
摘要
Fair exchange is a cryptographic protocol that enables two parties to exchange their electronic data fairly, i.e., it ensures that no one can steal the other party’s item. FairSwap and OptiSwap are well-known fair exchange protocols for files and coins based on smart contracts. Although the design principles for the two protocols are similar, there is an extreme difference in round complexity and communication overhead between the two protocols. This gap can be a barrier to users since they must choose one of them. In order to remove the barrier, this work generalizes these two protocols. It proposes a fair exchange protocol that allows users to adjust the communication overhead and the number of rounds by a newly introduced parameter. Our protocol contains FairSwap, OptiSwap, and protocols with intermediate efficiency between them. Moreover, to evaluate the gas costs of our protocol, we present a performance evaluation of the proposed protocol by Solidity implementation over Ethereum.