GithubHelp home page GithubHelp logo

smartcontract_auctions's Introduction

Auction Smart Contract

A smart contract for conducting an auction for a set of bidders and a set of items.

Dependencies

  • ganache or ganache-cli, truffle, solc

Instructions

ganache
truffle migrate --reset

Working and Structure

  • The auctioneer initialises the contract with the values Q and M, where Q is a prime number used for random representation of values, and M is the number of items in the item set.
  • Once the contract is created, Notaries and bidders can register(registerNotary() and registerBidder()) for the auction. No bidder can place a bid more than once and no notary can register more than once.
  • The auctioneer assigns distinct notaries to each bidder(assignNotary()). The bid values for the assigned bidder are accessible by this notary.
  • Now, the notaries are required to perform work i.e. they exchange values among each other(performWork()), which is later used for sorting the bidder list.
  • Once the notaries have exchanged values, the auctioneer calls the sortBidders() function, which sorts the bidder in a descending order, according to a specific procedure involving random representations.
  • To calculate the winners, Notaries are now required to exchange values, to calcuate whether the items bidded are intersecting with other bidders or not(priorWinners()).
  • Once the winners are calculated, the auctioneer calls the findWinners() function which determines the final winners.
  • The makePayments() function determines how much the winners owe.
  • The notaries are paid in proportion to the amount of work done by them.

smartcontract_auctions's People

Contributors

ravsodhi avatar apoorav29 avatar shipta-golechha avatar himanshi0608 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.