The Acala aUSD issue was by far the most significant event to have happened in the Dotsama ecosystem the past few months and we of course, had a front row seat. Despite the incident’s technical complexity taking several weeks to resolve, our faith in the Acala team hasn’t wavered and we’re working closely with them and will continue to do so for the foreseeable future.
More importantly however is how our products, namely, tDOT, reacted to this event, as well as the subsequent pause of almost all network functions. Normally, we prefer tDOT maintains between 30–40% DOT, with the remainder being LDOT as this seems to be a good balance when it comes to both stability and also yield.
However, when the aUSD issue occurred, many liquidity pools were thrown into disarray. tDOT was no exception, with the bad actors swapping a great deal of their erroneously minted aUSD for DOT which drained the DOT-LDOT pool, throwing the composition out of balance.
Here’s a screengrab of our dashboard, specifically the composition of tDOT:
Seems like a pretty considerable drop doesn’t it? Well let’s take a step back and truly put it in perspective.
If we look at 8/14, we can see that the amount of DOT in the pool fell off a cliff and was 97.2% LDOT and 2.8% DOT which on the surface seems disastrous. But thankfully, it wasn’t — our Stable Asset engine functioned correctly and our thought experiments regarding this sort of scenario came to fruition.
At approximately 3AM on the 14th of August, there was only about 4000 DOT in the tDOT pool, with a staggering 144,000 DOT worth of LDOT, however, when calculating the collateralization of DOT with the following calculation:
(4000 DOT + 144,000 DOT worth of LDOT) / 140,000 tDOT in circulation = 1.057, or more specifically about 106%.
Said another way, at this moment in time, tDOT was overcollateralized at 106%, meaning for every tDOT in circulation, it was still backed by approximately 1.06 DOT, showcasing the stability of the underlying mechanism even in times of trouble (this is a result of averaging over time, however at its most skewed, 1 DOT could be swapped for 1.43 DOT worth of LDOT).
More importantly however, this presented an excellent arbitrage opportunity where users were able to deposit or swap 1 DOT, for more than 1 DOT worth of LDOT. This is as a result of the stable asset pallet automatically maintaining a stable 1 tDOT: 1 DOT ratio on a constant basis.
The way it does this involves a lot of math, but it all boils down to the StableSwap Invariant shown below:
In plain English, the proportion of DOT to LDOT within the pool is being constantly monitored and the price of each asset is adjusted in real time, depending on the ratio and it does this using 2 simple mechanisms:
Users clearly spotted this tremendous chance to profit and you’re able to see that in the first image, the balance was improved dramatically quite quickly (although not back to previous levels) with it settling at around 20% DOT and 80% LDOT. As the proportion improved, the amount of LDOT you’d receive for a single DOT of course decreased, reducing the attractiveness of the trade, allowing it to even out, ensuring that the pool’s volatility was short lived. Currently though, DOT is approximately 31% and comfortably within our composition goals.
While the issue having taken place with Acala Network affecting tDOT was not expected nor beneficial, it did serve a bittersweet purpose of validating that our hypothesis is not only sound, but exceptionally effective when it came to maintaining the security and stability of the pool.
Tapio is a synthetic asset protocol enabling efficient liquidity for staking and crowdloan derivatives. It is designed to remove liquidity silos by synthesizing different formats of derivatives into a highly usable synthetic asset on Polkadot.
Tapio officially began in early 2021 when we received our first Web3 Foundation Open Grant. We are also the inaugural recipient for the Acala Ecosystem Grant. Our team is composed of engineers, financiers, security experts and serial entrepreneurs.