Tutorial

This tutorial will describe how to experience the main features of Shadows through the polkadot-js-apps

Runing Shadows

Before tutorial, you need to run the shadows node and ShadowsNetwork/polkadot-js-app

Setting Up a Node use docker image

Setting Up Polkadot-js-apps use docker image

Set Collateral Params

We can set the collateral params by calling the setCollateralParams method of the DeptEngine module use Sudo privileges.

Developer->Sudo->DeptEngine->setCollateralParams

You must use Sudo privileges to perform this operation

Parameter introduction

Except for maximum_total_debit_value, other parameters use 0x prefixed hex and have 18 precision

maximum_total_debit_value

Maximum total debit value generated from it, when reach the hard cap,DEBT's owner cannot issue more stablecoin under the collateral type.

stability_fee

Extra stability fee rate, None value means not set

E.g 0x00 = 0

liquidation_ratio

Liquidation ratio, when the collateral ratio of DEBT under this collateral type is below the liquidation ratio, this DEBT is unsafe and can be liquidated. None value means not set

E.g 0x0e92596fd6290000 = 105%

liquidation_penalty

Liquidation penalty rate, when liquidation occurs, DEBT will be deducted an additional penalty base on the product of penalty rate and debit value. None value means not set

E.g 0x6a94d74f430000 = 30%

required_collateral_ratio

Required collateral ratio, if it's set, cannot adjust the position of DEBT so that the current collateral ratio is lower than the required collateral ratio. None value means not set

E.g 0x0f43fc2c04ee0000 = 110%

Feed price

We can set the currency price by calling the feedValues method of the ShadowsOracle module. In the future, this will be the price feed entrance of the oracle.

Developer->Extrinsics->shadowsOracle->feedValues

We set the price of dos to $1, which needs to be multiplied by the precision 18

Issue

We can issue by calling the issue method of the Mintx module.

Developer->Extrinsics->Mintx->issue

We can query issue result by calling the accounts method of the Tokens module.

Last updated