Skip to content

fairdex-cans2020/fairdex

Repository files navigation

FairDEx

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).

Getting Started

Prerequisites

  1. Client applications require web3.py for blockchain interaction. Install it via pip install web3.
  2. The prototype uses Infura API to connect Ethereum network. Get a free API key at https://infura.io.
  3. To deploy the contract you can use MetaMask wallet installed in your browser. MetaMask is available at https://metamask.io/.

Installation

  1. Clone git repository git clone https://github.com/fairdex-cans2020/fairdex
  2. 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.
  3. Edit conf files. Open sender.conf and receiver.conf in a text editor and enter required information like Infura URL and contract address.

Usage

  1. Run sender application python sender.py.
  2. This will produce a file called offchain.txt. Make sure that this file is in the same folder with receiver.py.
  3. Run receiver application python receiver.py.
  4. Follow the instructions on the terminal.
Sender Receiver
Sender Usage Receiver Usage

Description of Files

  • 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.

About

FairDEx: Practical Fair Exchange of Digital Goods

Topics

Resources

Stars

Watchers

Forks

Languages