This project aims to implement basic functionalities of an auction platform using Ethereum.
The application should be decentralized and utilize Ethereum's stack:
- Smart contracts for business logic(auctions, bids, refund and transfer of ownership)
- Swarm for data storage(image and metadata)
- Whisper for a peer-to-peer messaging(chatrooms)
Manage non-fungible tokens by implementing an asset/token/deed repository which hold unique asset/token/deed.
See following link: ethereum/EIPs#721
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)
- Allow users bid on auctions
- Keep track of auctions/bids/ownership
- Transfer ownership of asset/token/deed to winder
- Transfer Funds to auction creator if auction is ended and there is at least one winner
- Cancel auction and deal with refunds
- UI to interact with the above functionality
The front-end is developed using a reactive UI framework with integration of Vuetify, a google's material design implementation.
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.
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.
Creating the auction is a simple process of entering auction details such as name, strarting price, expirty date etc. The important part is to have the reference between the deed and the 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:
- Auction not expired
- Bidder is not auction owner
- Bid amount is greator than current bid or starting price(if no bid)
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.
If there is an auction winner, the asset/token/deed is transfered to the bidder and the bid amount is sent to the auction creator.