# Tutorial

## Runing Shadows

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

[Setting Up a Node use docker image](https://shadows-blockchain.gitbook.io/shadows/getting-started/setting-up-a-node-use-docker-image)

[Setting Up Polkadot-js-apps use docker image](https://app.gitbook.com/@shadows-blockchain/s/shadows/getting-started/setting-up-polkadot-app-use-docker)

## Set Collateral Params

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

### Developer->Sudo->DeptEngine->setCollateralParams

{% hint style="info" %}
You must use Sudo privileges to perform this operation
{% endhint %}

![](https://1234026632-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MSCLbP9kX2H5ey_zBoh%2F-MSbYcZI9UP1G2xNMO8d%2F-MScp_r24uLrHnU_svZd%2Fsetparams.jpg?alt=media\&token=b81cf91e-2271-4d6c-8aeb-01eaf7790779)

### Parameter introduction

{% hint style="info" %}
Except for maximum\_total\_debit\_value, other parameters use 0x prefixed hex and have 18 precision
{% endhint %}

#### 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

![](https://1234026632-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MSCLbP9kX2H5ey_zBoh%2F-MSbYcZI9UP1G2xNMO8d%2F-MScm9m--iSF9vYb2ln_%2FfeedValues.jpg?alt=media\&token=6abbfeb6-bda3-436c-a2b6-acd783db8bbc)

> 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.&#x20;

### Developer->Extrinsics->Mintx->issue

![](https://1234026632-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MSCLbP9kX2H5ey_zBoh%2F-MScvscyh9xDoMs9nFPH%2F-MScx-ynYxqsig9sd0mc%2Fissue.jpg?alt=media\&token=59bcade6-480e-4a0b-9ade-9f452cf538b3)

We can query issue result by calling the accounts method of the Tokens module.&#x20;

![](https://1234026632-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MSCLbP9kX2H5ey_zBoh%2F-MScvscyh9xDoMs9nFPH%2F-MScxhCPkF7qxBq7s3sR%2Fresult.jpg?alt=media\&token=783922b9-fb47-45ea-a491-f2a2f78fa88c)
