Skip to content

Kuly14/DJED

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DJED - A Formally Verified Crypto-Backed Pegged Algorithmic Stablecoin

This is a Solidity implementation of this beautiful paper from IOHK: https://eprint.iacr.org/2021/1069.pdf

We use WBTC as the Base Coin, DJED as the Stable Coin and SHEN as the Reserve Coin.

Because Bitcoin is not as volatile as other coins I moved the rmax to 700% and rmin to 300%

To install

Clone this repo

git clone https://github.com/Kuly14/DJED.git

Install dependencies

yarn

Create .env file and specify your Rinkeby Rpc Url, Mainnet Rpc Url and your Private key.

Tests

After installing dependencies run

yarn hardhat test

Coverage

To run solidity-coverage

yarn hardhat coverage

Deploy to mainnet

First we deploy Djed, Shen and the ICO. The script automatically mints shen for the ico. It will mint 10 000 000 tokens and the price is set to 4.5$ during the ico.

yarn hardhat --network mainnet deploy --tags first

After the ICO is over deploy the main controller that the users will interact with. If you deploy before the ICO is over the transfer_tx won't go through and you will have to do it manually.

yarn hardhat --network mainnet deploy --tags second

This will deploy the controller, transfer the WBTC from the ICO and transfers ownership of the tokens to the controller. After this step the stable coin is live and can be freely traded.

About

Solidity implementation of DJED - A Formally Verified Crypto-Backed Pegged Algorithmic Stablecoin

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors