Preparing for Haven’s Mainnet Launch of xUSD

Image for post
Image for post

xUSD: The First Private Stablecoin from Haven

The Haven team and community has made significant progress over the last year building the first truly private stablecoin: xUSD. The mainnet launch of xUSD is now just weeks away. This post provides a detailed look into the preparations being made for the launch.

When xUSD goes live, the Haven network will provide anyone in the world with access to xUSD exchange liquidity in the Haven Vault; fully anonymous addresses, balances, and transactions using Monero-based privacy features; and complete control over their money at all times.

xUSD will serve as the foundation for a completely private, decentralized finance ecosystem in the months and years to come.

Most importantly, Haven will become the secure place to control and store your money in private stablecoins.

Development of Desktop Haven Vault

Over the last month, Haven’s developers integrated all the offshoring and onshoring functions into a new desktop Haven Vault. The desktop Vault shares the same simple, intuitive user interface as the web-based Haven Vault. The desktop Vault will serve as the first place xUSD is launched on Haven’s mainnet.

Exchanging (or offshoring) XHV for xUSD works like this: Users select the amount of XHV to exchange and see the current exchange rate. The xUSD value is calculated in real time and the user confirms the exchange. The pending exchange transaction displays until the transaction is confirmed. In the interim, the amount of time left to unlock the newly-minted xUSD is displayed in the history tab for each transaction.

The onshore process (exchanging xUSD for XHV) happens in the exact same manner, only with the assets reversed.

At any point, users can toggle between XHV and xUSD balances. Separate tabs for each asset show transaction details, price history, time left to unlock pending transactions, and more.

It is important to note xUSD can only be exchanged directly against XHV. As XHV is Haven’s base currency, burning XHV is the only way to create xUSD. 1 xUSD will always be worth $1 worth of XHV.

Final Phase of Public Testnet

In November, the Haven community conducted the first public testnet of xUSD and Haven’s offshore exchange functions. For the first time, users tested offshore (XHV to xUSD) and onshore (xUSD to XHV) exchanges in a command line interface (CLI) wallet. The xUSD testnet has now been live for over a month and has grown to over 50,000 blocks. Hundreds of XHV to xUSD and xUSD to XHV exchanges have been successfully completed.

The final phase of the public testnet will be conducted using the native desktop Haven Vault as described above. Both macOS and Windows builds of these Vaults have been completed and tested internally by the team. A video of this initial round of testing can be found here. A final round of minor fixes to the user interface are being completed now. Public release of the desktop Haven Vault testnet will begin in the coming days. A Linux version of the desktop Haven Vault will be available closer to mainnet launch.

Time-Lock Structure for xUSD Exchanges

Haven uses a unique time-lock structure to determine unlock times for xUSD exchanges within the Haven Vault. The use of this function is designed to reduce the incentive for bad actors while offering optimal conversion times for users.

Without these time-locks, someone looking to manipulate the xUSD exchange process could utilize infinite liquidity in the Haven Vault and rapidly exchange between XHV and xUSD with no restrictions. Instant unlocking of xUSD transactions, while appealing to users, would encourage attempts to manipulate the exchange process.

We have considered several other options to deter manipulation of the xUSD exchange process — such as defined percentage-based fees for each xUSD exchange — but decided the use of time-locks would be most beneficial to users.

Haven offers four different unlock times for users to select:

· Unimportant — xUSD is unlocked in 1,620 blocks or about 2 days

· Normal — xUSD is unlocked in 540 blocks or about 18 hours

· Elevated — xUSD is unlocked in 180 blocks or about 6 hours

· Priority — xUSD is unlocked in 60 blocks or about 2 hours

xUSD transaction fees are calculated using a decay formula based on the difference between the XHV exchange price (which uses a moving average, described below) and the current spot price. Fees start at almost zero for the slowest unlock times and increase for the faster unlock times. This results in higher fees in times of high price volatility for faster transactions. A more detailed explanation of this formula can be found in the Haven whitepaper.

During the final public testnet, the default xUSD exchange time-lock will be set at “priority” (about 2 hours). The default xUSD exchange time-lock for mainnet launch is still under consideration by the Haven team, and can be implemented readily when deemed safe and optimal. Unlock times can always be changed by users in their Vault.

Moving Averages for xUSD Exchanges

In addition to the time-lock structure, Haven also utilizes a moving average to determine price quotes for xUSD exchanges.

The ongoing testnet uses a 12 hour moving average to determine XHV price when exchanging to xUSD. A 12 hour moving average is short enough to provide certainty for users (by staying closer to the XHV spot price), but long enough to deter exchange-based manipulation for the sake of xUSD exchanges. Longer moving averages (such as several days) have been considered by the Haven team. However, a longer moving average would make it more difficult for users to effectively plan their exchange decisions.

This tool, combined with the use of the time-lock structure, will make it tremendously costly and time consuming to manipulate XHV’s price or the xUSD exchange process. As Haven approaches the mainnet launch of xUSD, we will continue to discuss the structure of these modest limitations in order to balance user experience with protection of the Haven network.

Deployment of Decentralized Pricing Oracle

The purpose of Haven’s pricing oracle will be to create a real-time pricing record containing exchange rates (against XHV) for xUSD at the time each block is mined. During the public xUSD testnet, pricing information is updated every 30 seconds via the Haven oracle and presented to the Haven daemon upon request.

These pricing records are then embedded into the Haven blockchain in every block header. By including this information in every block, the protocol guarantees transaction values cannot be tampered with or altered in any way. Haven’s pricing information will be immutable.

Haven has partnered with Zel to utilize their decentralized nodes as a pricing oracle. However, due to time and resource constraints, we are still evaluating the feasibility of using the Zel network for mainnet launch of xUSD.

It should be noted that Haven’s pricing oracle will not be fully decentralized at mainnet launch. The oracle will be hosted initially either by Zel or the Haven team. It is the priority of the entire Haven community to deploy multiple layers of pricing oracles after mainnet launch in order to achieve complete decentralization of the Haven network. This will also require Haven to be listed on additional exchanges to allow the oracle(s) to process additional pricing data points.

In the future, we plan to never rely solely on one oracle system, but rather allow the network to add, swap, and remove decentralized oracle systems (such as Blocknet).

Web-Based Haven Vault Update

The web-based Haven Vault does not yet have xUSD functionality. After development of the desktop Haven Vault is completed (with full xUSD exchange functionality), the Haven team will work to further build out the web-based Haven Vault. This will likely happen after the mainnet launch of xUSD due to the team’s time and resource constraints. There are several important technical reasons we chose this path.

First, the web-based Haven Vault currently used on mainnet (which is also optimized for mobile platforms) was developed using OpenMonero. Previous versions of Haven’s desktop and command line interface (CLI) wallets did not use OpenMonero, but instead relied directly on the use of remote procedure calls (RPCs).

RPCs function in the same way as application programming interfaces (APIs). They provide a user interface wrapper with access to existing functionality in a codebase. In Haven’s case, RPC calls allow remote access for the xUSD exchange functions already written in the core codebase, which was previously only usable by the old CLI wallets.

With this in mind, the work required to create a desktop Haven Vault using RPC was significantly less than the work required to recreate the Haven code (which actually generates and calculates xUSD exchange transactions) for the web-based Haven Vault. Even while the web-based Haven Vault is being updated to include xUSD, it will remain available on mainnet for storing and sending XHV.

Supply Transparency Solution

After the mainnet launch of xUSD, the circulating supply of XHV will fluctuate dynamically based on burning of XHV for xUSD, and the minting of XHV when burning xUSD. In some market cycles, XHV supply will be reduced. In others, supply will increase.

It is important to note that with activation of xUSD on Haven’s mainnet, there will be zero xUSD in existence. That means the initial XHV supply change will be deflationary by design. The Haven whitepaper models several of these supply scenarios in detail.

The Haven community expressed a desire to enable visibility of all XHV and xUSD circulating supply numbers while retaining full privacy for user transactions, balances, and addresses. There are several benefits to enabling supply transparency, including:

· Allowing more efficient monitoring of the Haven network, which means attempted attacks and large-scale manipulation can be detected and mitigated much faster.

· Giving users greater confidence to enter the Haven network with the ability to view the number of XHV and xUSD in circulation at any given moment.

· Allowing for greater visibility, and therefore more precise analysis, on coin metrics websites.

We have identified a solution to implement supply transparency in the codebase. This solution is currently being refined and tested by the team. It will be released publicly before the mainnet launch of xUSD.

Public Code Release

Most of Haven’s development’s work — both on the protocol and related software — has been conducted publicly on our Github. However, several key pieces of Haven’s codebase related to the xUSD exchange process have been intentionally kept private.

Throughout the development process, the Haven team has sought and received advice from experts in the cryptographic community to vet these portions of the codebase and make them as secure and reliable as possible. The entire codebase, including the pieces related to xUSD exchanges, will be released publicly in advance of mainnet launch. This will ensure all pools and exchanges have time to prepare for the hard fork that will be required for Haven to launch xUSD on its mainnet.

New Exchange Listings

Haven was added to two new exchanges and a fiat on-ramp over the last two months:

In November, Haven was selected for listing on the Abra investment app, alongside DAI and USDT. It is exciting to see growing interest in the first private stablecoin. This listing provides a fiat on-ramp and direct access to XHV withdrawals and deposits anywhere in the world.

In December, Haven was listed on VCC Exchange. This new Singapore-based exchange shares its liquidity and security infrastructure with Bittrex and gives users in Vietnam trading pairs in VND.

Also in December, Haven was added to Citex. Based in South Korea, Citex will offer expanded access to Haven in Asia.

These listings are a credit to the hard work of our volunteer team and active community.

Additional Whitepaper Translations

We have added several new translations of the Haven Whitepaper. Spanish, Vietnamese, and an updated Chinese translation are now live on our website. Many thanks to the community members who helped with this effort. Please continue to reach out to the Haven team on Discord if you are able to assist with additional translations as we continue to grow awareness of the project.

Mainnet Launch Date

Given all the ongoing development work described above, the mainnet launch of xUSD is still on target for late January or early February 2020.

As the final public testnet progresses and development of the xUSD exchange codebase is completed, the Haven team will announce an official mainnet launch date.

This announcement will provide ample time for pools and exchanges to prepare for the hard fork that will be necessary to launch xUSD on Haven’s mainnet.

In Closing

We are thrilled with the progress that has been made to this point. Haven has always been a unique, innovative, and ambitious concept. None of this progress would have been possible without the active support of Haven’s largely volunteer team and community, which has provided support for code development, technical implementation, graphic design, economic modeling, and marketing over the last year.

Come join the conversation on Twitter, Discord, Reddit, and Telegram and see what Haven can do for your financial privacy and freedom.

Ecosystem of private stable assets. Based on Monero. The world's first private stablecoin xUSD is now live.

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