Sooraj 🚢 Profile picture
May 10 31 tweets 11 min read
Djed was the Quintessence of ''stability'' in ancient Egypt

The symbolic backbone of the god Osiris, the god of Afterlife & Ressurection

And Stability is what Djed is bringing to the #Cardano ecosystem

Here’s a deepdive on the tech behind Djed, stable coin on #Cardano🧵👇
So what is a stable coin?

A stable coin is a price-stable digital asset

that behaves like a fiat currency

but maintains the mobility and utility of a cryptocurrency

It offers a way to bridge the gap between fiat currencies like the U.S dollar and cryptocurrencies
Stable coins are important for crypto markets

Because price stability is built into the assets themselves

It opens up many opportunities for DeFi and value transfer without the risk of price fluctuations

They achieve this price stability is through the underlying collateral
Based on the underlying collateral structures

They are broadly divided into 2 classes

1. Centralized asset-backed stable coins (based on the U.S. dollar)

eg: USDT, USDC

2. Decentralized algorithmic stable coins: eg DAI, SigmaUSD, etc
Centralized asset-backed stablecoins came under criticism and scrutiny by authorities for the lack of transparency

USDT is a well-known example

Due to the centralization and lack of transparency

these stablecoins cant be seen as a reliable solution

decrypt.co/88250/tether-a…
On the other hand

Building a reliable algorithmic stable coin is an immense challenge

Yesterday we saw UST in free fall

The algorithmic stable coin, which had the biggest market cap was in free fall and lost its peg to the dollar
This is where we realize

that methodic approach, based on research & rigorous testing is the only way to build reliable systems

That aspire to serve Billions of people

& #Cardano is pioneering this technique in the world of crypto

Now it's building a stable coin👇
Djed is the 1st stablecoin protocol for which

Stability claims are precisely & mathematically stated, proven & formally verified

Djed's governing algorithm behaves like an autonomous Bank

that buys and sells stablecoins for a price in a range that is pegged to a target price
Let's dig deeper into the ''stability properties'' of Djed

The stability properties of Djed are based on ''provable Theorems''

which are mathematically tested & verified using formal techniques

Let's try to understand the essence of these complex mathematical theorems👇
The stability properties of Djed are based on 8 ''provable Theorems''

• Peg upper and lower bound maintenance
• Peg robustness during market crashes
• No insolvency
• No bank runs
• Monotonically increasing equity per reserve coin
• No reserve draining
• Bounded dilution
Theorem 1 & 2: Peg upper & lower bound maintenance

This theorem states that

the price will not go above or beyond the set price

eg: the price of Djed will never go above 1.01 dollars and never go below 99.9 cents 👇
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 👇
The Theorems were checked for their mathematical correctness with automated tools

Researchers used 2 formal verifications methods

• Model checking: a fully automated technique
&
• Interactive theorem prover- Isabell
where you have to interact with it to prove the correctness
The Djed research paper envisions two versions of Djed

• minimal Djed: simple uncomplicated design
&
• extended Djed

minimal Djed is currently implemented on #Ergo as sigmaUSD

This version could be vulnerable to attacks like the Reserve draining attack
The sigmaUSD was subject to a reserve drain attack

by an anonymous user who owned a large amount of ERG

The attack was ultimately unsuccessful & the attacker is estimated to have lost $ 100,000

Extended Djed envisions to overcome these shortcomings with dynamic fees mechanism
Now that we have an idea about the formally verified ''stability properties'' of Djed

let's look at how Djed's advanced algorithm works

Djed has a Base coin, which is $Ada

and a reserve coin, which is $Shen
The cryptocurrency that will be backing Djed is $Ada 

In order to mint the Djed

the user will need to interact with the smart contract by sending Ada to its address

after that contract will send Djed back to the user
So let's assume Ada is worth $2 and Djed is worth $1

so in order to mint one Djed

the user needs to send 0.5 Ada to the smart contract

this process can be repeated

and users can send more and more $Ada to the contract and get more Djed
if the user wants to sell one Djed

user should send it back to the contract

which will then burn the Djed and sends back the amount of Ada that is equivalent to $1

As the price of $Ada can fluctuate

there may not be enough $Ada in the contract to give back to the Djed holders
Here is where $Shen comes into the picture

It is the reserve coin in charge of providing extra reserves for the pool

it's an ancient Egyptian symbol representing infinity & durability

unlike the Djed stablecoin

$Shen is not pegged to a specific asset & its price can fluctuate
So what is the incentive for users to mint & hold $Shen?

There are fees associated with minting and burning $Djed & $Shen

which will be collected and sent to an $Ada pool 

•$Shen holders will get a share of these fees

•&positive price appreciation from the growing $Ada pool
according to @shahafbg , CEO of COTI

Djed’s collateral ratio is in the range of 400%-800%

Djed can be over collateralized (up to 8x)

this considerably decreases the risk of $Djed being unpegged

This means that for every 1 $Djed minted, there are 4-8 $Shen in the reserve pool
And If the ratio falls below 400%

users will not be able to mint $Djed

and $Shen holders won’t be able to burn their $Shen

So in the event of a market crash, there is a security for the peg of $Djed

that ensures its stability of $Djed
$Djed is awaiting its first implementation on @COTInetwork

After months of development months of development

the public Testnet version of Djed was released last week

medium.com/cotinetwork/dj…
TL;DR -

• Djed is the first formally verified algorithmic stablecoin protocol

• Its stability claims have been precisely and mathematically stated, proven, and formally verified

• Djed is currently on the testnet version @COTInetwork & awaiting mainnet implementation
If you found this thread valuable:

1. Toss me a follow for more threads on technical deep dives and Defi→ @Soorajksaju2

2. Here’s another thread on the L2 solution ''Orbis project'' bringing zk-Rollup on #Cardano that you might enjoy:

• • •

Missing some Tweet in this thread? You can try to force a refresh
 

Keep Current with Sooraj 🚢

Sooraj 🚢 Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @Soorajksaju2

May 8
#CardanoCommunity is in the top three and growing & more and more Projects are building on #Cardano

99% of the fud on #Cardano is not honest criticism

They do it to legitimize the drawbacks of the platform they are invested in

Or to do engagement farming
The most honest criticism that #Cardano gets is from the people who are engaged in building projects on #Cardano

So let's not focus our attention on fud that says ''global state is a necessity for DeFi''

But let's put our heads down, focus on building & educating
Respect is not earned by begging for it!!

Let's do it by demonstrating the capabilities of the platform that #Cardano is building

the upgrades that are planned for the second half of 2022 are of paramount importance in demonstrating these capabilities

so let's focus on that👇
Read 8 tweets
Apr 24
@orbisproject is one of the first projects engaged in building mission-critical scalability infrastructure on #Cardano

Bringing L2 scalability to Cardano through Zero-Knowledge(ZK) Rollup

Here’s a breakdown of the tech that scales #Cardano to be a global financial platform:🧵👇
@orbisproject is a general purpose ZK Rollup on #Cardano

So, what are Rollups?

They are L2 solutions

• that settles the transactions outside of the L1, eg. #Cardano

• but post the transaction data back to the L1

• which allows rollups to be secured by native L1 security
• Rollups are fully general-purpose

meaning

any one can even run an copy of L1 (eg: #Cardano) inside a rollup

allowing existing dApps and native assets to migrate to rollups

with almost no need to write any new code
Read 26 tweets
Apr 21
Hydra: The Layer 2 scaling solution with ''Isomorphic state channels''

is one of the most anticipated scaling solutions on #Cardano

which awaits its implementation in 2022

Here’s a breakdown of the tech that brings Layer 2 (L2) scaling to #Cardano: 🧵👇 Image
Let's start from the basics!

So what's an L2 scaling solution?

It's a collective term used for solutions created to help scale a Blockchain

by processing transactions off of the Mainnet/L1

while still maintaining the same security measures and decentralization as the mainnet
So what are the main types of L2 scaling solutions?

•Sidechains

•Optimistic rollups

•Zero-knowledge rollups

•Channels (state channels and payment channels) Image
Read 23 tweets
Apr 18
#Cardano is anticipating a new wave of upgrades with the Vasil HFC event on the 29th of June 2022

Upgrades on Plutus- #Cardano's smart contract platform (CIPs)

are among the most anticipated components of this HFC event

Here’s a breakdown of each one of those upgrades:🧵👇
Plutus is the smart contract platform of the #Cardano blockchain

It allows you to write applications that interact with the Cardano blockchain

The capabilities that Plutus enable range from

• NFTs
• dApps
• native assets &
• on-chain conditional logic
So let's go a bit deep into how programming in Plutus works!

This starts with the compiler pipeline

Plutus contracts are currently written in the functional programming language ''Haskell'

The source code in Haskell is then converted into Plutus IR (Intermediate Representation
Read 26 tweets
Apr 15
The point of #Cardano with its solid scientific and mathematical foundations was not to replicate the degen DeFi space of #Ethereum

But to elevate decentralized Finance to a whole new level

Maladex is an upcoming project on #cardano which aims to live up to that expectation🧵👇
So what is Maladex?

Maladex is not a DEX

But a novel Research-Driven ''trading platform'' on #Cardano

Which aims to revolutionize the Decentralized Finance (DeFi) ecosystem by application of research rigour and quantitative modelling expertise from Traditional Finance (TradFi)
So what is the core innovation Maladex bringing to the DeFi space?

As of now, DeFi is plagued with capital inefficiencies like ''Impermanent loss(IL)'' and ''high slippage''

Maladex introduces a revolutionary execution model based on the concept of ''Programmable Swaps''
Read 19 tweets
Apr 14
''Ouroboros consensus Protocol'' is the heart of #Cardano

which gives it rigorous security guarantees comparable to those achieved by the Nakamoto consensus of #Bitcoin

Here’s a breakdown of the tech that makes #Cardano more similar to #Bitcoin than any other L1 out there:🧵👇
Let's start from the first principles like #Cardano does it!!

So what is a consensus Protocol?

It is a method through which all the peers of the distributed decentralized network (for eg: #Bitcoin) reach a common agreement about the present state of the distributed ledger
So what is the current state of consensus of most blockchains out there?

The prevalent types of consensus models used by blockchains are the classical consensus and the Nakamoto consensus algorithm
Read 25 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Don't want to be a Premium member but still want to support us?

Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal

Or Donate anonymously using crypto!

Ethereum

0xfe58350B80634f60Fa6Dc149a72b4DFbc17D341E copy

Bitcoin

3ATGMxNzCUFzxpMCHL5sWSt4DVtS8UqXpi copy

Thank you for your support!

Follow Us on Twitter!

:(