If you like what you see, please consider supporting me by delegating to my pool: EASY1.
I’ve been head down learning about Djed the Cardano/COTI stablecoin. After few hours of reading and watching Shahaf interview, I’ve decided to create a website where simulating Djed and Shen minting/burning and implement all guards as per Djed spec.
I don’t understand the distinction between “ADA pool” and “ADA reserve” (where “ADA reserve” seems to be almost the same as “SHEN supply in ADA”, why only almost and not exactly?). According to the Djed paper, there is only the reserve, which can be divided into liabilities (to DJED holders) and equity (for SHEN holders). That would mean that your “ADA pool” is the reserve, “DJED supply in ADA” are the liabilities, and “ADA reserve”/“SHEN supply in ADA” is the equity. But the reserve ratio is reserve divided by liabilities, “ADA pool” divided by “DJED supply in ADA” in your notions, and you seem to do “ADA reserve” divided by “DJED supply in ADA”.
You are spot on. I gave these names w/o thinking too much. I will rename accordingly. I will double check the reserve ratio. I inteded to calculate the reserve ration as you pointed out, but I don’t have the formula I used handy, so if you spotted an issue that must be a bug. I’ll fix that one too! Great catches!
From the doc Shen initial price seems to be 1 dollar worth of ada.
Ah, you think “1 $ADA” means “1 USD worth of ADA”? Viable interpretation. But they prepend every token name with a “$” throughout the document – “$DJED”, “$SHEN”, “$ADA”, “$COTI”. (Not my style guide at all, I just capitalise them.) So, I really think they just mean “1 ADA”.
Setting it to 1 USD worth of ADA at the beginning would also not make too much sense, be a little arbitrary. It will rather quickly deviate from that and probably never again meet that 1 DJED = 1 SHEN = 1 USD situation from point zero.
I still don’t get the difference between “SHEN supply in ADA” and “SHEN supply in ADA (Equity)”. There seem to be only small differences except for the depeg case.
The collateral/reserve ratio seems to be rounded to whole percentage points now (because of my earlier rounding request?). Don’t know if that is accurate enough, but then maybe without displaying the decimals?
I don’t know if the right thing is done in the depeg scenario. That the DJED supply in ADA is more than the whole reserve seems wrong.
I never realised we have 2 “shen supply in ada” now, and one is obviously redundant. I’m not sure what is the most appropriate value of $shen when it depegs. Any suggestions on the formula? Currently I calculated it as follows (reserve - liabilities) / shen supply. That should to < 0 in case of depeg, right?
Yeah collateral now it’s an integer, I;m about to release a fix to remove the decimal part. I don’t think it adds much
Yeah that’s a case limit I never thought about. What do you think it should be the value there?
What the paper does:
It redefines the price of the stablecoin/DJED to be exactly reserves divided by number of DJED in circulation:
(the second case of the min)
Don’t really know how to present it. Maybe mark the DJED supply in ADA as depegged in red, when it happens, when we slide into the second case of that min?
That way the liabilities will be exactly equal to the reserves, the reserve ratio will stay at exactly 100% and never go below it, and SHEN equity will be exactly 0.
Regarding the price of SHEN:
There’s a difference between the target price and the buying price (no such difference for DJED). The minimal price is only relevant for buying, not for selling SHEN. So, I’d give “SHEN supply in ADA” exactly as equity, 0 in the depeg case (but probably show the buying price as price nevertheless).