Coder Social home page Coder Social logo

sealed-bid-auction-house's Introduction

Sealed bid auction house

This project expands the challenge presented by Patrick McCorry in his second Cryptocurrency Class 2022 challenge. The main goal was to implement a contract capable of handling deposits and withdrawals. However, it mentioned sealed bids and timed withdrawals as possible use cases. So I decided to build this simple auction house.

This is in no way a fully secure project. This was just practice. Keep that in mind.

With that said, here's the most important project capabilities:

  • Only the Auction House owner can start an auction. There are two important deadlines set when starting an auction:
    • Auction End: the frontend only allows auctions to be between 5 and 1440 minutes1;
    • Open Bid Deadline: 5 minutes after the auction end;
  • If there's a live auction for which the auction end has not been reached yet, users can place sealed bids. Multiple bids by the same user will be summed up2.
  • After the auction end is reached, users have 5 minutes to open their bids:
    • If the user bid is not the highest to have been open to date, the user receives his funds;
    • If the user bid is the highest to have been open to date, the user will either win the auction or receive is funds if another user opens an higher bid.
    • Funds from sealed bids after the auction is no longer live stay in the Auction House contract.

Functionalities not implemented:

  • Prizes - both setting prizes and distributing them afterwards;
  • Auction history.

To see the project working, you can check out this contract and this UI of which I am the owner, meaning only I can start an auction. But the best way to get the hang of this is to clone and modify/deploy the project yourself.

kyrers

Footnotes

  1. The contract does not validate this, meaning that the owner could start an auction with different duration values by sending a transaction directly to the contract.

  2. Even though bids are sealed, checking a block explorer would allow everyone to see what the value passed to the contract was.

sealed-bid-auction-house's People

Contributors

kyrers avatar

Watchers

 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.