Git Product home page Git Product logo

suresh-pollai / auction-dapp Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ac12644/auction-dapp

0.0 0.0 0.0 283 KB

The Auction Dapp allows a user to register a “deed” token, which represents some unique asset. Once a token has been registered, the ownership of the token is transferred to the Auction Dapp, allowing it to be listed for sale. The dapp lists each of the registered tokens, allowing other users to place bids. During each auction, users can join a chat room created specifically for that auction. Once an auction is finalised, the deed token ownership is transferred to the winner of the auction.

JavaScript 29.48% HTML 0.56% Vue 42.35% Solidity 27.61%

auction-dapp's Introduction


Logo

Auction Dapp

The Auction Dapp allows a user to register a “deed” token, which represents some unique asset. Once a token has been registered, the ownership of the token is transferred to the Auction Dapp, allowing it to be listed for sale. The dapp lists each of the registered tokens, allowing other users to place bids. During each auction, users can join a chat room created specifically for that auction. Once an auction is finalised, the deed token ownership is transferred to the winner of the auction.
Explore the article on Medium »

Requirements

The application should be decentralized and utilize Ethereum's stack:

  1. Smart contracts for business logic(auctions, bids, refund and transfer of ownership)
  2. Swarm for data storage(image and metadata)
  3. Whisper for a peer-to-peer messaging(chatrooms)

flow-diagram

Deed Repository

Manage non-fungible tokens by implementing an asset/token/deed repository which holds unique asset/token/deed.

ERC: Non-fungible Token Standard #721 (NFT)

See following link: ethereum/EIPs#721

Auction Repository

Auction repository MUST act as an auction house which does the following:

  • Holds asset/token/deed that is to be auctioned(ERC721 Ownership by smart contract)
  • Allows users bid on auctions
  • Keeps track of auctions/bids/ownership
  • Transfers ownership of asset/token/deed to winder
  • Transfers Funds to auction creator if auction is ended and there is at least one winner
  • Cancels auction and deal with refunds
  • UI to interact with the above functionality

Front-end: Vuejs2.x + Vuetify

The front-end is developed using a reactive UI framework with integration of Vuetify, a Google's Material Design implementation.

Implementation/Data flow

1. Register an ERC721 Non-Fungible Token with the AuctionDaap Deed Repository

The idea of a Deed Repository is used across this project to hold any NFT with metadata attached to. A token/deed is registered by giving a unique ID and attaching metadata(TokenURI). The metadata is what makes each token important or valuable.

2. Transfer Ownership of the NFT to AuctionRepository(Auction house)

The Auction house needs to verify that a NFT is owned by the auction creator, therefore before the auction is created, the owner should transfer the ownership of the NFT to the AuctionRepository smart contract address.

3. Create Auction for NFT

Creating the auction is a simple process of entering auction details such as name, starting price, expiry date etc. The important part is to have the reference between the deed and the auction.

4. Bid on Auction

Anyone can bid on an auction except the owner of the auction. Biding means that previous bidders are refunded and new bid is placed. Bid requirements are as follow:

  1. Auction not expired
  2. Bidder is not auction owner
  3. Bid amount is greator than current bid or starting price(if no bid)

5. Refunds

If an auction is canceled, the Auction Repository MUST return the ownership of the asset/token/deed back to the auction creator and refund bidders if any.

6. Bidder Win Auction

If there is an auction winner, the asset/token/deed is transferred to the bidder and the bid amount is sent to the auction creator.

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

(back to top)

auction-dapp's People

Contributors

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