In the first part I presented the Djed protocol, and how its stabilization algorithm works.
I explained that Djed is an algorithmic stablecoin, over-collateralized up to 8x, and with Proof of Reserve on-chain, which transparently tests the circulating supply and how many ADAs are in reserve.
I talked about the reserve currency Shen, and that ADA is the true reserve. Shen is an asset that intermediates to cushion the possible sudden price changes of ADA.
Now we will see the practice of use, and its comparison with other stablecoins.
A Practical Exercise
Suppose the market value of ADA is USD 1 and Bob buys $Shen 5,000, the protocol mints it, when he pays ₳ 5,000. There is now ₳ 5,000 in reserve. Anyone could now coin Djed.
Suppose Alice wants $Djed 1,000, she needs to give up ₳ 1,000, and there will now be a total of ₳ 6,000 in reserve (1,000 + 5,000), worth $6,000, and $Djed 1,000 in circulation.
Even if the market value of ADA falls to USD 0.25, the algorithm can redeem holders’ $Djed 1,000 at their request, returning ADA to them at a rate of ₳ 4 to $Djed 1.
The Shen/Djed ratio is 500% (5,000 / 1,000 x 100). If the ratio between the reserve of Shen and Djed in circulation is less than 400%, the algorithm will not allow the exchange of Shen to its holders, (return of ADAs).
ADAs in reserve are accounted for in two parts, where one part is the liability, which is the Djed in circulation that must match the USD value, and the rest is equity.
In our example, with ₳ 6,000 in reserve, and with ADA at USD 1, ₳ 1,000 is liabilities (due to Djed’s current) and ₳ 5,000 is reserve equity, shares owned proportionally by all Shen holders with $Shen 5,000 in circulation (in our example they are from Bob). The relationship between liabilities and equity will change according to the volatility of the ADA price in USD.
If the ADA market price grows, with no change in reserves, there will be more equity ADAs than liabilities.
On the other hand, if ADA falls to USD 0.5, without increasing the amount of ADAs in reserve, the liability will increase to ₳ 2,000, to maintain the $Djed 1,000 with the parity of USD 1, and the reserve’s equity will fall from ₳ 5,000 to ₳ 4,000. The total reserves are offset between assets and liabilities, and in our example it holds a total of ₳ 6,000 (2,000 liabilities + 4,000 assets).
It is not profitable for Shen holders to sell in these cases of falling ADA prices, and the algorithm will not even allow them to do so if the ratio is below the 400% minimum. In that case it is profitable, from the economic point of view, to buy Shen.
Of course, in a private negotiation, and at any time, two parties can transact Shen for ADA, but not within the protocol, but in an independent operation.
Whitepaper Theorems 1 and 2 show parity preservation.
Djed and Shen minting and burning fees will be collected in ADA and allocated to the pool, increasing the pool and reward coefficient for Shen holders. Shen holders will be able to redeem their rewards by burning their Shen. Djed minting and burning operating fees are also paid in ADA, then converted to COTI currency periodically, to be included in the COTI Treasury.
I consider community contributions important, so I selected three analysts who made interesting observations.
— Sooraj (M.D.), co-founder of the blog Just the Metrics and from the YouTube channel This Week In Cardano, developed at Twitter thread explaining the 8 theorems of Section 3: Stability Properties of the Whitepaper.
He said and I quote verbatim: “The stability properties of Djed are based on ”provable Theorems” which are mathematically tested & verified using formal techniques”.
“Theorem 1 & 2: Peg upper & lower bound maintenance This theorem states that the price will not go above or beyond the set price”
“Theorem 3: Peg robustness during market crashes It states that up to a set limit, depending on the reserve ratio, the peg is maintained even when Price of the base coin crashes. eg: if the reserve ratio is 1:3, Djed can withstand a market crash of 66% without losing the peg.”
“Theorem 4: No insolvency. This theorem states that the equity of the smart contract governing Djed can never go bankrupt or negative meaning if you hold the stable coin, you will be always able to get your money back given the peg is still maintained”
“Theorem 5: No bank runs this basically means in the case of a market crash there is no incentive for users to race to redeem their stablecoins The smart contract treats all users fairly and equally and paid accordingly.”
“Theorem 6: Monotonically increasing equity per reserve coin this basically means provided that the exchange rate remains constant the equity or the value returned to the holders of the reserve coin always increases and reserve coin holders are guaranteed to profit from this.”
“Theorem 7: No reserve draining, this theorem states that provided that the exchange rate remains constant it is impossible for a malicious user to execute a sequence of actions that would steal reserves from the bank / smart contract.”
“Theorem 8: Bounded dilution, this basically means that there is a ”limit” to how many reserve coin holders and their profit can be diluted due to the issuance of more reserve coins and this incentives users to hold reserve coins.”
— Matthew Plomin, Founder of Mehen Group, also discussed this issue in his twitter thread, but with a critical sense, and that I summarize here:
He wondered, how big does Shen’s buffer need to be to absorb the volatility of ADA? And he maintained that it is not defined anywhere in the Whitepaper.
Matthew Plomin said and I quote verbatim: “The paper’s authors simply hand-wave the question away in section 3 stating “users have no incentive to trade … outside the range. The authors pay lip-service to fiat-backed stablecoins and state that the biggest problem is trust in the entity holding the securities. This is true. Only Tether knows what Tether holds.”
Later said: “Theorem 4 (No insolvency) is a mess. Theorem 6 and Theorem 7 presuppose an impossibility. The same impossibility, along with another one, is in Theorem 8, which is about Shen”.
Then he added: “The authors know that there are “minor” issues with Djed, including “haircut” for stablecoin holders, and the high likelihood that $SHEN holders would run if they get close to the 4:1 peg and may start absorbing losses. “Extended Djed” does not fix these. The authors know all of this too. They admit it way in the back after plebs stop reading because of scary maths.”
He also said: “So, again: Why is the 4:1 peg right? I don’t know, but have a strong sense it came from figurin’ that an 80% cushion would be sufficient to attract buyers into $DJED and 25% leverage (plus fees) would be sufficient to attract $SHEN buyers.Statistical experience driven by $ADA volatility would demand a bigger cushion, on the order of between 5:1 and 7:1 to guard against a deadly 3-sigma event but that ties up capital and reduces leverage for $SHEN. Hardly what we expect from #Cardano’s rigorous methods.”
— Finally zygomeb criticized the Minimal Djed version with this Tweet: “I heard rumors that the release version of Djed will use the minimal version. I refrained from speculating. Now that it has been confirmed, I would NOT advise anyone to use the system as according to the document itself, it is not a very robust design. (Mainly the reservation drain part).“
The Whitepaper in Section 4 ‘Known Minor Issues of Minimal Djed’, warns of 6 issues that will be resolved with the Extended Djed version. In the Roadmap published by COTI, the exclusive issuer of Djed, it was announced that Minimal Djed will be the first version available in January 2023.
Learn from the mistakes of your neighbors
You cannot disregard the mistakes that others have made, because you can make those same mistakes yourself.
There are stablecoins that have their parity based on physical reserves, such as USDT or USDC, with their dollars in traditional banks, but we cannot compare Djed with them, its monetary policy is not governed by an algorithm, but by the arbitrariness of its managers .
Djed can be compared to DAI, from MakerDAO, or UST from the Terra blockchain, and considering the failure of the latter, it is a great opportunity to judge the design.
The TerraUSD (UST) stablecoin maintained its USD peg through direct arbitrage with LUNA, the Terra blockchain cryptocurrency.
UST’s own algorithm was not designed to react to the loss of parity, whether it was trading at $0.97 or $1.03. To maintain the parity of UST with the value of USD, arbitrages had to work, using the Terra Station’s market exchange function. Before the purchase of UST, the stablecoin was minted and LUNA was burned.
In the case of LUNA’s price increase, users could sell UST, mint LUNA for their holding, and make a profit by adding UST to Terra’s pool. Thus the supply of UST increased.
The authors of the algorithm were confident that arbitrage could handle all market turmoil, and as we know, this assumption was wrong.
The stablecoin lost parity for increasing its issuance, and for trying to maintain its stability in a market arbitration based on a volatile cryptocurrency.
All this was enhanced when the Anchor protocol offered market returns of up to 20% per year to users who deposited their UST on the platform. Up to 75% of all UST circulating supply was locked up in Anchor.
The fall in the price of LUNA, as it happened to all cryptocurrencies in this year 2022, unleashed the beginning of the end. UST deposits in Anchor fell sharply and users closed their positions to take profit, thus UST entered the open market.
When it began to become obvious that there was no longer a LUNA security to back each UST minted, a run was started. UST’s loss of parity generated panic and sell-offs of the stablecoin, and this led to the minting of LUNA. A large amount of LUNA entered the market and caused its price to collapse, increasing the fall that already existed in the entire crypto market, in general.
Djed’s algorithm, as we explained, maintains an overcollateralization, using the reserve currency Shen, to cushion the volatility of ADA, which is the true reserve.
Djed could lose parity temporarily if the market value of ADA were to plummet extremely and rapidly, say by 90% in a few days. If such a condition lasted for an extended period of time, Djed would remain unpegged until ADA’s value increased or until people bought Shen (which would be very profitable), to increase reserves.
That is why the design of Djed has an excess of guarantees, and also the protocol blocks the burning of the stablecoin to avoid a death spiral, in case of a price fall.
Furthermore, unlike LUNA with its burning and arbitrary issuance policy, disastrous for any financial system, Cardano has a clear deterministic ADA policy, there is no burning, and its maximum issuance will be ₳ 45 billion, having been issued to date ₳ 35.29 trillion or ~78%. You can read my article Taking a Look at Cardano’s Monetary Policy.
This graph summarizes the most important differences between both stablecoins:
There are no perfect designs, just some better than others.
Contemplating the greatest number of risk variables in the protocol implies, in theory, having less chance of failure.
We know that IOG is a company that develops peer-reviewed research, and that scientific support adds a greater probability of success.
The theory is in sight, and the design of the Djed protocol looks solid, but of course, then time will judge success or failure with practice.