Smart Contract Auctions for Trusted Trade

HaveFund Dev Team
Nov 8, 2019 · 6 min read

One of the pillars of the HaveFund Loan Trading Platform is what we call Trusted Trade. This is achieved through the use of smart contracts on Distributed Ledger Technology.

In this article, we will describe exactly how employing smart contracts to conduct the loan trading auctions leads to secure, immediate, fair and trusted transactions.

What Is A Distributed Ledger?

First, let's get down to basics and examine the base that this whole thing is built on, which is Distributed Ledger Technology (DLT).

A distributed ledger is a store of records which is not held by any central authority, but is maintained as multiple independent but synchronized copies residing on individual nodes. Of course, there is a need to make those copies agree with each other, and DLT (of which blockchain is one type) provides the mechanism by which all the participating nodes attain consensus.

Image for post
Image for post
Distributed Ledger Technology (DLT)

In HaveFund, auctions are conducted on a distributed ledger. Each alliance member—each lender who has joined the HaveFund platform to buy and sell loans—runs and controls their own distributed ledger node.

The HaveFund ledger is private and permissioned, meaning not just anyone can run a node. Because of legal constraints, only licensed lenders may apply to join HaveFund as an alliance member and run their own node.

What Is A Smart Contract?

Auctions in HaveFund are coordinated using smart contracts, which are self-executing contracts deployed to the digital ledger. These contracts are enforced not by laws, but by computer code. In fact, this is sometimes referred to as “code as law”, where participants submit the value they each hold to technological mechanisms which constrain their actions and execute exchanges of value when verifiable conditions are met.

Image for post
Image for post
Smart contracts for trusted trade

What's useful about smart contracts is that there is no need for a central or human arbiter to enforce the conditions. The smart contract itself can judge whether the conditions have been met, and executes the transaction without outside help. Because the smart contract itself lives on the distributed ledger, no single party has control over it. Furthermore, the code is publicly visible so all parties can examine it to ensure that it is fair.

Creating An Auction

So how do the auctions actually work? It starts out when an alliance member has a loan application that they want to sell, and submits it (in encrypted form) together with a winner selection policy to the platform.

This act of submitting is in fact a method call (an instruction) to the HaveFund auction smart contract. The submission is therefore recorded on the ledger for all alliance members to see.

Image for post
Image for post
Creating an auction

Before getting to the auction proper, there is an intermediate step where member nodes automatically submit their credit scoring policies and receive credit scores. For clarity and brevity we will omit the details here, but suffice it to say that each potential buyer gets a score for the borrower according to their own criteria without seeing the borrower's private information.

The Bidding Process

Based on the score they received, the alliance member considers whether or not they want to place a bid. If they decide to proceed, they place a bid by making another method call to the smart contract. Again, this action is recorded on the distributed ledger. The bids themselves are encrypted, so even though everyone knows there are bids being submitted, no lender can see any other lender's bid amounts.

Image for post
Image for post
Interested parties send in encrypted bids

The contract collects all bids placed during the prearranged bidding period, and when that period ends, any further incoming bids are rejected. Again, bear in mind that the smart contract runs on all the nodes, so no individual alliance member can manipulate the results.

The Auction Mechanics

Hold on a second, some readers might say. If the bids are encrypted, how do we know what amount to bid so that it's higher than all the others?

If this question crossed your mind, you may be thinking of English auctions, otherwise called ascending bid auctions, in which participants place multiple bids, each one higher than the last, until no one else is willing to pay more than the current highest bid. This is the most common auction type, and the one most ensconced in popular culture.

Another type of auction you may be familiar with is the Dutch auction or descending bid auction, where the auctioneer starts with a high amount and gradually lowers it until the first person to bid is pronounced the winner.

In contrast, HaveFund makes use of what is called a first price sealed bid auction (less formally called a blind auction). Bidders are only allowed one bid, and they cannot see all the other bids. This motivates them to place honest bids and submit their true best offer, rather than trying to game the system using various tricks and hacks.

Selecting the Winner

When time is up, the HaveFund Blackbox, which we described in a previous article, does three things:

  1. It calls another method on the smart contract to signal the end of the bidding period (the smart contract does not have the ability to tell time).
  2. It collects all the bids, decrypts them, and selects the winner according to the loan seller's winner selection policy.
  3. It calls yet another method on the smart contract to notify it about which bid won the auction.
Selecting a winner

If you are interested in how the blackbox is kept secure and protected from malicious manipulation, please refer to the article “How the HaveFund Blackbox Works”.

Once the winner has been selected, HaveFund contacts them and also the loan seller to let them know the good news. Contracts are prepared and signed, and the borrower gets the best loan available with a minimum of time and effort.

How Is This Different?

You may be wondering how this is different from an online auction operated by a centralized provider. The answer lies in the transparency with which the entire auction is conducted and the guaranteed fairness enforced by the smart contracts and the distributed ledger.

Recording all transactions on the distributed ledger ensures that the whole auction flow is completely transparent, but HaveFund also provides security and privacy by mandating that all sensitive data be encrypted before being posted to the platform.

In other words, while the auction transactions (creation, bidding, winner selection) are laid out on the public ledger for all participants to see, all private data—including borrower information and confidential credit policies—are encrypted and cannot be read by anyone, including the platform operators.

Privacy and transparency usually pull in opposite directions. The HaveFund platform manages to achieve a rare combination of both to remove friction from loan trading, delivering value to the loan seller, the loan buyer and the borrower.

HaveFund

HaveFund Loan Trading Platform

Medium is an open platform where 170 million readers come to find insightful and dynamic thinking. Here, expert and undiscovered voices alike dive into the heart of any topic and bring new ideas to the surface. Learn more

Follow the writers, publications, and topics that matter to you, and you’ll see them on your homepage and in your inbox. Explore

If you have a story to tell, knowledge to share, or a perspective to offer — welcome home. It’s easy and free to post your thinking on any topic. Write on Medium

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store