-
Notifications
You must be signed in to change notification settings - Fork 534
2. Honzon Stablecoin
- 1. Overview
- 2. Honzon on Mandala Test Network
The Honzon Protocol is a set of mechanisms to manage aUSD loans with multiple collaterals, monitor and adjust stability of aUSD based on various risk parameters such as collateral ratio, interest rates, debt level etc. We outline a user guide per below to use the Honzon protocol.
If you have yet had an account and test tokens, please refer to the Get Started Guide.
The guide below will illustrate the following functionalities
- Check Required Collateral Ratio
- Check Token Prices
- Create a Self Serviced Loan for aUSD
- Check Loan Status
- Withdraw Residual Collateral & Payback Loan
- Liquidate
Mandala Test Network available test tokens
Currency ID | Symbol | Description |
---|---|---|
0 | ACA | Acala network token for fees, rewards etc. |
1 | aUSD | Acala USD stablecoin |
2 | DOT | Polkadot network token DOT |
3 | BTC | Bitcoin |
Use Chain state
-> cdpEngine
-> requiredCollateralRatio
to check required collateral ratio for a given token.
On Mandala Test Network
, DOT at 160%, and BTC at 150%.
Use Chain state
-> oracle
-> values
to check price for a given token. Convert the hex value to number.
Use Extrinsics
-> honzon
-> updateVault
to loan out aUSD.
-
currency_id
: asset used as collateral -
collateral
: amount to deposit as collateral for this loan -
debit
: the amount to loan out, note this is not aUSD amount, but a debit unit to account for aUSD owed plus accumulated interest etc.
To get debit to aUSD exchange rate, use Chain state
-> cdpEngine
-> debitExchangeRate
.
On Mandala Test Network
, the debit to aUSD exchange rate starts at 0.1
.
As for the above aUSD example
- 1 DOT is deposited as collateral for the loan
- 1500 debit units equivalent to 150.736577445027942000 aUSD will be loaned out
- with DOT value at about $300, the actual collateral ratio was about 199.02%
Use Chain state
-> loan
-> collaterals
to check collaterals locked in the loan.
Use Chain state
-> loan
-> debits
to check amount owing, again this is not aUSD amount, but a debit unit to account for aUSD owed plus accumulated interest etc. See above section for obtaining debit to aUSD exchange rate.
Use Extrinsics
-> honzon
-> updateVault
to withdraw collateral and/or payback aUSD loan.
-
collateral
: a negative amount means a withdraw -
debit
: a negative amount means paying back aUSD, again this is not aUSD amount, but a debit unit to account for aUSD owed plus accumulated interest etc. See above section for obtaining debit to aUSD exchange rate.
Use Extrinsics
-> honzon
-> liquidate
to liquidate a loan at danger.
If a loan is unsafe, that is the collateral ratio of this loan is below the liquidation ratio
, then it is deem to be liquidated by anyone with a reward.
Use Extrinsics
-> honzon
-> liquidationPenalty
to check penalty.
As an example, the liquidation ratio
is 10%. It is applied on top of the debit amount and paid to the liquidator.
Use Chain state
-> cdpEngine
-> liquidationRatio
to check.
For Mandala Test Network
, you can use Polkascan to check transaction details, and perform various queries.