Designing a Decentralized Auction Protocol

Dibyo Majumder | Heisenberg
6 min readFeb 18, 2019

--

Src: Forbes

It is pretty interesting to have an auction in a Decentralized platform governed by the Ethereum protocol.

For a system design first, we need to have an overview of how all the processes work in an auction and what are the problems we are going to solve with the blockchain based system.

Lets first ponder upon the processes which govern an auction

General auction space works as :

  1. Ownership of the product is checked by the auction holders.
  2. A fee is paid for putting your product in the auction.
  3. One By One the bidders have a rough look on the product they have for auction at one session
  4. Open for bidding one at a time, pipelined as a per some criterion.
  5. Bidders bid on products as displayed.
  6. The person with the highest bid owns the product and 3, 2, 1, Sold !!!

The Problem!

Problem with the current online based auction is the trust !

Trust is the first point that should be taken care off

Trust for Authenticity,

When we push on the auction over the internet we can’t ensure that the seller is the owner of the product he/she is selling. That is one of the reasons people travel to attend the auctions just because of the authenticity that is provided by the organization holding the auction. And there is no chance of getting cheated in that case.

The consensus of participants ( aka The Decentralized trust )

In the real auction, nobody can deny the results, as it is held in front of everyone and can be if one guy backs off other will not let him. But, in the online based auction, there is no consensus. It is just like a buying and selling scenario there should be a consensus mechanism holding up the system.

I hope you are getting a hint of why a decentralized system works here. If not, don’t worry its totally ok. Will have a deep drive soon.

Trust in the system for money transferring throughout the process of bidding.

In normal OnBoard Auction, there is no chance of getting cheated as everything is in front of you. You give the money and get the product you won in the auction. But in case of an online auction, a delivery system takes off and until then the money spent by the bidder should be held in such a way both way trust is maintained and money transferring mechanism should be best and authentic.

Additional Cost for the auction

Auction always comes up with a lot of money for organizing the event and in the case of the online-based system too the cost of the middlemen which gives you a centralized trust comes with a cost.

Now, My Story is all about overcoming the auction problems mentioned and reduce the cost overheads.

Players in the screen

  1. Admin: An individual who has the ability to register the seller ( Registration of the seller is based upon the reputation they have ). Admin has the privilege to stop the contract and withdraw the eth in the contract for safety in case of an attack.
  2. Sellers: They are the one owning the product and they only can place their owned commodity for auction, for being a seller in the auction they need to be registered priorly with the smart contract and can only be done by the admin if a new seller or by the previous reputation gained by the selling authentic product.
  3. Bidders: The targeted audience who are not able to visit far enough for just an auction and don’t actually trust the web for an auction as manipulation can hamper an auction a lot.

In a centralized system, you want to guarantee that the data should not be manipulated but it’s not in your hand basically

Solution! The Design

1. Token Handling

A specific token will be generated for following up the transaction in the auction name it ( Auction Token ). The bidders will be buying the tokens from the faucet by transferring a sufficient amount of ether into the faucet contract. Once the bidders get the tokens in their account they are good to go. Tokens are transferrable within the EOAs and the contract accounts, it follows the ERC20 standards and is preferably exchangeable in any of the cryptocurrency exchanges. The token contract is made in such a way it leverages the token exchange with real or test ether and handles all the possible security concerns. The token contract is made like an ICO and all the token distribution logic is in that contract itself.

2. Bidding Logic

Bidding logic is made in such a way to build two-way trust both in the bidders’ side as well as the sellers’ side and the trust in between are maintained by a smart contract. Let’s name it “bidding contract”.

Let us specify the process of bidding :

  • Seller posts the product that is to be sold in the auction. And submit some tokens as a security deposit (this will prioritize the product as more safer to bid on ).
  • Once the product is up for auction, it will be recorded in the ethereum blockchain and an event will be published.
  • After the products get confirmed in a valid block they emit events and are listened by the bidders as a Bid-feed
  • The bidders are allowed to bid on any of the products in the feed providing they have enough token balance added in their account.
  • Once they bid in some product they transfer the amount of token specified to the contract.
  • Auction Token cannot be withdrawn from the smart contract until you are the winning bidder at the instance.
  • Their tokens will be locked and will be deducted from the main token balance so that the bidders don’t bid on something with larger Bid-value than what they are having in balance (it removes the false bidding )
  • When the bidding session of the product is over the last highest bidder will be the winner and others can take their tokens back. (English Auction)

3. Supply Chain: Governing the two-way trust

In this design, we have achieved the trust with a simple supply chain Smart Contract which manages all the hassles in the trust-based system.

Once the winner has been identified the supply chain kicks off and the tokens of the winner get locked in the contract. It is a point where the tokens are nowhere, neither in the hands of bidder nor with the seller. Supply chain governs who should be getting the token back.

Once the seller ships the process, the product will be a part of the supply chain and it will be validated with RFID tags at each gateway the product reaches. The products are not checked and updated manually in the blockchain, in-turn the blockchain is updated by Oraclized codes which interact with the outside world and the blockchain. (Suppose a scanner, when a product passed through it, it scans the RFID and updates the blockchain state )

When the bidder gets the product in hand the blockchain is updated accordingly as per their response to the delivery person. After that happens, Supply chain smart contract triggers a function in the bidding contract which allows the bidder to withdraw the amount ( token ) given by the bidder.

4. Transaction handling

Refund on not winning the bid :

Other than the winner, everyone can claim their money back through the withdrawal pattern the smart contract on the end of the session one function is called which leverages all the bidders with the amount they have used for the bid. They just can withdraw the tokens for further transactions.

Refund, if the bidder doesn’t get the product they won:

Everything on the blockchain can be monitored and open for all, so any hazards caused to the product is the responsibility of the owner ( seller ) as they haven’t used a trusted delivery party. In that case, the bidder can monitor the progress of the delivery and claim for the money back once that is verified by the delivery provider, refund to the bidder will be initiated with the withdrawal pattern and the product will be transferred to the seller (owner) or any further processing from the Deliver partner will be taken.

This is an abstract idea of how the decentralized internet can help to govern an “English Auction” that too without any intermediary . As it can be made a DAO (Decentralized Autonomous Organization) holding Auction in the new P2P Network .

Thank You ………

Reviews are solemnly appreciated :)

--

--

Dibyo Majumder | Heisenberg

CEO & Founder Turf Gaming | 2x Entrepreneur | Built @instaraise | Strategy & Product Architect | Built on top of Ethereum, Tezos, Polygon