Practical Fair Exchange of Digital Goods
This repository contains a research prototype and evaluation dataset of FairDEx protocol proposed in "FairDEx: Practical Fair Exchange of Digital Goods" submitted to the 19th International Conference on Cryptology and Network Security (CANS 2020).
- Client applications require
web3.py
for blockchain interaction. Install it viapip install web3
. - The prototype uses Infura API to connect Ethereum network. Get a free API key at https://infura.io.
- To deploy the contract you can use MetaMask wallet installed in your browser. MetaMask is available at https://metamask.io/.
- Clone git repository
git clone https://github.com/fairdex-cans2020/fairdex
- Deploy FairDEx smart contract on Ropsten network. Go to remix.ethereum.org and open fairdex.sol in Remix IDE. Next, compile the source and deploy the contract.
- Edit conf files. Open sender.conf and receiver.conf in a text editor and enter required information like Infura URL and contract address.
- Run sender application
python sender.py
. - This will produce a file called
offchain.txt
. Make sure that this file is in the same folder withreceiver.py
. - Run receiver application
python receiver.py
. - Follow the instructions on the terminal.
Sender | Receiver |
---|---|
- fairdex.sol: Source code of FairDEx smart contract.
- evaluation-dataset.ods: Reports the measurement of costs for deploying and running FairDEx. In addition, this file contains the contract addresses used in our experiments.
- sender.py: Client application for sender.
- receiver.py: Client application for receiver.
- sender.conf: Configuration file for sender application. Must be filled before running sender.py.
- receiver.conf: Configuration file for receiver application. Must be filled before running receiver.py.