💎⛏ Earn your share of 500,000 SCRT by mining the Secret Ethereum Bridge! CLICK HERE to learn more. 💎⛏

×
heroherohero
solutions

Secret Auctions: Towards Decentralized OTC and Dark Pools

Learn how Secret Network can enable more trustless, non-custodial, privacy-preserving over-the-counter trading. Our first OTC auction is LIVE!

CK
16 Dec 2020 • min read

Hello to the Secret Network community!

Now that the Secret Network - Ethereum bridge is live and Secret Network is providing programmable privacy to ETH and 14 ERC20s, let’s have even more fun with Secret Tokens!

Today we are going to use the secret auction contract built by Secret Network contributor Baedrick to demonstrate the first trustless, non-custodial and privacy preserving Over-The-Counter trade for crypto-assets. We'll be auctioning off one Secret Token (secretSCRT) and accepting bids in the form of another (secretETH). In fact, it's already live on the Secret Network mainnet!

Why secret auctions for OTC trading?

When Alice is looking to buy / sell large quantities of an asset, she gets prices from multiple OTC desks and executes based on the best price. Each interaction is private and siloed as OTC desks shouldn’t know each other’s bids and be able to collude. Here’s how this process currently takes place on Telegram chats:

Recently Paradigm.co developed a workflow automation tool for the highly manual and siloed OTC processes. However when working with OTC desks, there’s always the counter-party and settlement risk. You agree to buy Asset X in exchange for Asset Y, but the delivery of these assets are based on trust among the two counter-parties. Our goal today is to see whether we can replace the trust with secret contracts 🚀

Secret auction walk through

In order to create your own auction, or participate in an on-going auction, you will need to download secretcli, jq, bash v4 (or higher) and auction.sh code (mac_auction.sh if you are using a mac). Once you have all these downloaded, we can start with the creating the auction from the terminal:

Step 1 - Alice starts running auction.sh

Step 2 - Alice provides her address

Step 3 - Alice chooses to create a new auction or see existing auctions We are choosing "create now" for Alice. Later we will "show list" for Bob, who will be bidding in the auction.

Step 4 - Alice chooses the SNIP-20 address for the token she wants to sell. The address below is for secretSCRT:

Step 5 - Alice chooses the SNIP-20 address for the token she wants in return. The address below is for secretETH:

Step 6 - Alice fills in auction details

Boom! The auction contract is deployed on mainnet!

The minimum price at the time the auction was set up was equal to the current SCRT/ETH price.

Step 7 - Alice adds the SCRT to be sold in the auction to the contract

Now Bob will make a bid to buy (secret)SCRT paying secretETH. (skipping through detailed walkthrough for Bob)

Now that Bob submitted his Bid, Alice can finalize the auction which will result in tokens being swapped!

Next steps

  1. Using the CLI instructions, you can now create auctions for any of SCRT, ETH, WBTC, USDT, DAI, TUSD, COMP, UNI, YFI, OCEAN, LINK, MKR, SNX, BAND, AAVE and KNC, using any asset pair.
    If you are creating an auction for SCRT, we encourage you to post in the Secret Network forum! While the auction UI is being built out, this is the best current way to communicate. For any other assets, please post in that community’s forum to increase engagement.
  2. Using the CLI instructions, you can view on-going auctions and make a bid! The SCRT auction that is shown above will stay open until 9am December 21, Monday.

Note: The auction contract has not been formally audited. You should use it at your own risk. We take no responsibilities or any liability for any claim, damages or other liabilities that may arise from use of this software.

Happy auctioning!

To discuss Secret Network and Secret Apps, visit our community channels:
Website | Forum | Twitter | Discord | Telegram