A Guide For Stablecoins Owners On Handling Liquidation - Accurate Prices Matter
The multichain framework for crypto-backed stablecoins and DeFi products
In May 2019, Equilibrium
announced a partnership with Provable, a very efficient oracle that produces reliable real-time prices that the framework uses today to calculate critical levels every six minutes. Since this time, the project has also engaged in further research and development to reduce third-party risk, and improve the quality of its price feeds for EOSDT position owners and NUT (the framework’s utility token) holders.
Quality price feeds help position owners make informed decisions for accurate valuation and sound management of their positions and risks.
It also guides NUT holders through the liquidation process:
- Position owners should closely monitor their collateralization ratio. If the ratio drops below the 170% minimum collateralization threshold, the owner will suffer a 20% liquidation penalty. The EOS price feed determines the current dollar value of the collateral, which in turn is divided by the dollar value of the EOSDT debt (assuming 1 EOSDT = 1 USD) in order to calculate the collateralization ratio.
- NUT holders can buy EOS collateral with NUT at a discount, then buy and redeem the bad EOSDT debt. In other words, they are de-leveraging the Equilibrium Balance Sheet. This price-dependent process must be swiftly executed to effectively minimize Equilibrium’s insolvency risk.
The EOS price feed needs to be accurate and reliable. If not, the consequences on a contract’s output can be catastrophic.
The great oracle problem
Synthetix, a service that provides fiat currency stablecoins, experienced serious issues in June 2019 due to a mispriced Korean Won (KRW) rate in its private oracle. In normal conditions, the reference price produced is based on the average of several sources.
Let’s consider a hypothetical scenario where the initial collateralization ratio is at 170%. Close your eyes, open them a few minutes later, and imagine that EOS price has declined more than 45% in that short time.
The resulting collateralization ratio is now below 100%! Equilibrium is insolvent and the oracle failed to warn the framework in time! A drop like this hasn’t happened on EOS yet, but there is always a chance that it could happen in the future. Let’s imagine a further worse scenario in which the oracle feed isn’t delayed, but incorrect, like with Synthetix.
Whichever decision the smart contract makes will not only be wrong, but will usually be irreversible too.
The problem we’ve been describing so far is “the great oracle problem.” If we feed outdated or incorrect data to a smart contract, that contract’s output will likely be incorrect as well: garbage in, garbage out.
One solution is to use not one but multiple external price feeds. The robust median value of reported prices would define a reliable, more accurate reference price than the average.
It isn’t affected by outliers, therefore it would disregard any outdated or erroneous price as long as most of the price feeds are neither outdated nor erroneous.
In any case, this is no guarantee that there won’t be any mispricing down the road, but it’s an important step in the right direction.
The inclusion of several sources, combined with the choice of the median as a reference price, drastically improves the oracle’s quality.
In the case of MakerDAO, the triggers for a reference price update are either:
- a difference between the last reference price and the updated median price that’s above 1%
- an update time that comes more than six hours after the previous price update.
These trigger conditions are scattered in value or time (at least 1% or six hours apart) for good reason. The process of running the medianizer contract and using its output to update other smart contracts (e.g. the liquidation contract) comes at a cost
In EOSDT’s case, the resources required to scale the process for thousands of users can be costly and limited even though the EOS blockchain can theoretically support unlimited scale and speed: the current RAM price
is 0.0851 EOS/KB, and the current CPU price is 0.00236 EOS/ms/day.
The RAM supply is also currently capped at 129.13 GB. These constraints drive dApp developers to look for affordable and effective solutions.
Equilibrium’s partnership with LiquidApps
Equilibrium and LiquidApps are partnering up today with the ultimate objective of implementing a scalable, cost effective on-chain rate medianizer for better event monitoring.
As a first step, Equilibrium refactored its rates table to incorporate the EOS and NUT prices quoted in several currencies from multiple sources.
Acting as arbitrators, NUT holders need to observe timely and consistent EOS and NUT reference prices to determine whether they should handle the liquidation, or expect to handle it very shortly.
Timing is always critical in a market that will more likely be volatile when significant liquidations are triggered. A swift procedure brings more certainty in an arbitrator’s ability to turn the discount on his purchase of a bad debt’s collateral, into a realized USD profit.
To alleviate the arbitrator’s duty even further, Equilibrium is adding an on-chain function that automatically liquidates the position with the lowest collateral ratio if it stands below the critical level.
This function acts as a strong safeguard against insolvency risk. Its input is a table of positions sorted by their collateralization ratio, that is updated with every new event by the eosdtcntract
In time, this table can not only spot and liquidate the under-collateralized positions, but also act to preserve a position (similar to MakerDAO’s “CDP saver” feature) by warning position owners of forthcoming liquidations.
Subscribe to get your daily round-up of top tech stories!