If you are able to donate and contribute to the Haven project, please click here. Thank you.
One step closer to digital cash
The long term aim for Haven Protocol has always been to provide a true digital version of cash, usable by anyone, anywhere.
One of the most important aspects of making Haven truly usable and flexible is the ability to convert between the network’s private assets with the minimal amount of friction for users. As the network grows and matures, the user experience will be refined, and we’re now very pleased to announce that an important step forward in this regard has been implemented into the protocol.
Change Unlock Improvement
Up until now, when you send an amount of XHV to your Haven Vault to convert to xUSD, it was likely that the “change” portion of that amount would be locked up for the same duration as the amount you wish to convert.
An example of this is shown below:
Jonny sends 10 XHV to his vault and wants to convert 6 XHV to xUSD using the low (7 day) priority unlock. This converts the 6 XHV but also locks the remaining 4 XHV (the change) for the same period of time (7 days).
You can read details of how a CryptoNote ‘note’ transaction works here
This makes it cumbersome for users to manage their assets without potentially making portions of their balance unusable until the transaction is complete.
But, not any more.
The Haven developers have now implemented a new method to eliminate the change unlock issue for users. This improvement will apply to all conversions, including XHV<>xUSD and xUSD<>xAssets.
Instead of locking up the entire amount for the duration of the lock period, the change portion of the conversion will now only be locked for only the minimum 10 blocks (~20 mins) as per standard transfers.
So, in the example above, the 4 XHV change will be unlocked in 20 mins instead of 7 days.
The Technical Bit
This has been achieved by supplementing the conventional ‘tx.unlock_time‘ field with a vector of unlock times; one per transaction output. The functionality allows individual outputs to unlock at different times.
In the case of an ‘offshore’ tx, it allows us to set the converted amounts to be locked for the full term (up to 7 days, or 21 days under the new tokenomics design), while the unconverted (change) amounts unlock after the 10 block period for transfer tx’s.
Thanks to the team at Loki for their work on this feature and also community member Harrison for his contribution in adapting it for Haven.