Design Choices

  • Protobuf for efficient data serialization and widespread support.

  • Cosmos SDK for its modular architecture and Interchain Security feature for enhanced security and cross-chain interoperability.

  • Go language for its robust handling of concurrency, crucial for managing multiple simultaneous auctions.

Engineering Patterns

  • Module Pattern: The Auction and Interchain Security functionalities are encapsulated in their own modules.

Security Aspects

Security is a cornerstone of CarBloc, with signed transactions, network validations, and cryptographic hash functions to ensure secure and fair auctions. The Interchain Security feature adds an extra layer of security by validating all transactions and maintaining the integrity of the data.

Auction Creation

The seller initiates an auction by providing the parameters like car_id and minimum_bid, which are added to the blockchain.

Bid Management

When buyers place their bids, they don't directly provide the bid_amount. Instead, they provide a cryptographic hash of their bid amount. This hash is created using a secure hash function and a secret known only to the buyer. This method, known as Commitment Scheme, ensures no other party can determine the actual bid amount from the hash.

To place, update, or cancel a bid, buyers follow the same process as before but use the cryptographic hash of the bid_amount instead of the actual amount.

Bids can only be placed if the amount is not less than the minimum bid

Auction Termination and Revealing Bid

Once the auction duration is over, the system triggers the automatic termination process:

  1. Close the Auction: The module ends the auction, preventing any more bids from being placed.

  2. Initiate the Bid Reveal Phase: After the auction has ended, each buyer is required to reveal their actual bid by providing their secret and the bid_amount they used to create the hash. The system validates the revealed bids by rehashing the bid_amount with the secret and comparing it with the original hash. Note that this is only possible after the auction has expired.

  3. Determine the Highest Bid: After all the bids have been revealed and validated, the system automatically identifies the highest valid bid.

  4. Transfer Ownership: The buyer who placed the highest bid is declared the winner and receives ownership of the asset. The asset's ownership record on the blockchain is updated accordingly.

  5. Announce the Winner: The system logs the result of the auction and publicly announces the winner. The result can be retrieved later for audit purposes or for notifying the participants.

This automated process ensures transparency and fairness in the bidding process, providing an efficient and secure environment for car auctions.

Last updated