If you are able to donate and contribute to the Haven project, please click here. Thank you.
xBTC Price Lag Mitigation
Since the launch of xAssets, and more specifically xBTC, we’ve all paid very close attention to how the protocol is used. Haven, xUSD, and the xAsset ecosystem is unlike anything before it, so as you’d expect, we are all constantly learning and adjusting to ensure the project’s success.
In our recent Market Volatility Report we reviewed the effect of last month’s market correction. The team were delighted that the protocol performed as expected. However, the report did flag one concern, where traders were taking advantage of a lag in pricing records for the most volatile xAsset, xBTC.
We have listened to the debate in Discord and specific feedback from a range of users, and compiled the following plan.
Trading vs Asset Storage
To put this conversation in context, it’s worth considering the purpose of Haven Protocol.
Haven’s suite of synthetic assets each has its own use case. Put them together, and they create an investment tool akin to an offshore bank account. This analogy fits, as Haven’s intended use is private asset storage. This is in contrast to a trading platform, which would require a very different design. Trading platforms benefit from centralized low latency technology to efficiently negotiate market information, while asset storage requires robust decentralization and long term platform availability.
As a result, the fees, locks and other mechanisms discussed in this post are not designed to appeal to traders. Instead, they intend to create a reliable ecosystem for the long-term that not only supports xUSD, but allows investors to store and manage assets.
Haven’s mint and burn mechanism means that the network will go through periods of inflation, deflation and stability. This is by design. But the network is not sustainable if loopholes exist that allow users to print assets without suitable risk and friction. The price lag does create one such loophole, that will result in un-natural and unacceptable inflation if not addressed.
The effect of price lag in volatile markets
Some traders attempted to take advantage of a pricing lag in xBTC conversions during Bitcoin’s most volatile periods. This lag was always expected, but the 0.3% fee and a 20 minute lock time were meant to make it unprofitable. Unfortunately this measure has not been enough, as we’ve seen large holders moving in and out of xBTC fairly quickly to gain xUSD.
The team responded quickly by modifying the xBTC conversion price to use a one-hour moving average rather than the spot price. This significantly reduced the price volatility and, therefore, potential gain (see graph below). It also stopped an issue where traders could make two opposing transactions in the same block with different pricing records – to guarantee a gain. This is no longer possible with the MA.
The MA update hasn’t closed the loophole, but it was a quick patch to minimise the impact whilst we assess a more robust and permanent approach.
What causes the price lag?
All Haven conversions rely on a price record from the oracle. Ideally, the current spot price would always be used, but several factors cause this conversion price to lag behind the spot:
- ChainLink pricing oracle doesn’t supply a live price. It updates every x minutes, or earlier if the price deviates by more than 0.5% (since last update).
- Conversions are based on the price record stored in the previous block – creating a 2 minute lag.
- The protocol allows 10 blocks to confirm a transaction before it is rejected. This allows users to use price records that are up to 10 blocks old.
How to prevent users gaming the price lag
The team and community have reviewed a number of options to mitigate gains by anyone exploiting this lag. We intend to make 4 changes to address this
- Increase the fees
- Introduce a fee burn
- Increase the lock times
- Shorten the moving average
Each of these changes will reduce the ability to profit without risk.
xAsset Conversion Fees
Currently, the fee is 0.3% on conversions between xAssets and xUSD. We intend to increase this to 0.5%.
We intend to increase this fee to reduce the incentive to game the system. This change will apply to all xAssets. Having a consistent rate across the board will keep the fees simple to understand, keep inflation in check and prevent bots from exploiting sudden price changes in the less volatile assets.
The 0.5% rate has been chosen specifically, as it matches and therefore neutralises any advantage that can be gained by gaming the 0.5% threshold trigger in ChainLink.
The Fee Burn
We will modify the protocol to burn 0.4% of all asset conversion fees. (80% of the 0.5% fee)
Burning (or destroying) fees should offset any excessive inflationary effect caused by trading of xAssets.
The remaining 0.1% will be split in half for the governance wallet and miners.
The governance wallet will be held in the non-profit Haven Foundation – which can only be spent to benefit the project. This will significantly reduce current income, but recent activity has generated enough funds, when combined with other income, to comfortably sustain current operations until we reach the decentralised phase. (See: The Path Ahead)
The miners will receive 0.05% on each asset transaction. The current configuration does not pay miners for asset conversions, so this will come as a welcome incentive to support the network.
Lock times are critical for XHV <> xUSD conversions, as they disincentivize price manipulation. Given that trading within the Haven Vault will have no impact on the price of Bitcoin, Gold or other assets, a 20 minute time lock was deemed sufficient.
In light of recent activity, we have re-assessed this position. Increasing this lock time would make it harder to profit from the price lag, as the price at the end of the longer lock period is harder to predict. It would also significantly slow the rate of gains – to the point a trader’s money would be better placed elsewhere.
We have considered that a trader could short BTC on an exchange to hedge price changes during the lock period. But gains on another system don’t inflate Haven, so this is of little concern.
We propose a 48 hour lock on all xasset conversions
Modifying the Moving Average
The advantage of using a Moving Average price is that it smooths out volatility, which reduces the opportunity to game the system. On the flip side, it gives traders a view of the future, giving them an advantage. Currently a 1 hour MA is used, to balance these two factors. A recent review of the data suggests that a 30 minute MA would be a better compromise, as it still reduces volatility but halves the view of the future MA price.
It’s clear from recent Discord discussions that the community supports urgent action to reduce the impact of this type of trading. For this reason, we will proceed with these changes as soon as possible, but they will require a hard fork. We will announce a fork date as soon as possible.
The team has also considered other measures, which may be instated if these planned changes do not have the required effect.
We appreciate some of these changes may be unpopular, particularly those looking to trade within their wallet, but our primary concern is the network’s health. So these changes are necessary.
Thank you all for your support.