Giter Site home page Giter Site logo

escrow_solidity's Introduction

escrow_solidity

Basic Escrow contract

  1. There are two parties Alice and Bob, Alice want to buy something from Bob.
  2. Following terms are agreed upon-
  • abitrator : address of the arbitrator
  • amount_payable : price of good/service
  • arbitration_fee : fees to be paid to arbitrator by loosing party in case of dispute
  • time_to_raise_dispute : time given to Alice(payer) to raise dispute after activation of contract
  1. Alice make the payment for good/service + arbitration fee to the smart-contract using pay payment_by_payer function.
  2. Bob pay arbitration fee to the smart-contract using pay payment_by_payee function.
  3. When both parties pay fees, the contract is activated and a timer starts.
  4. If Alice(payer) is satisfied with the delivery, she can settle the contract. The money of good is sent to Bob, and the arbitration fees of respective parties are returned.
  5. If Alice doesn't raise dispute in time_to_raise_dispute, Bob can call force_settle to settle the dispute, and payments are made same as when settled by Alice.
  6. If Alice raise dispute in given time, the Arbitrator decides whom to send the money. The arbitration fee of the loosing party in dispute is confisticated and sent to arbitrator. The winner gets the money and his arbitration fee.

Potential Problems

  • The arbitrator has no incentive to act honestly
  • The parties need to send the proof of their case using other channels(maybe email, or upload on website hosting front-end)

escrow_solidity's People

Contributors

ror-shubham avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.