-
Notifications
You must be signed in to change notification settings - Fork 534
2. Honzon Stablecoin
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
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 | XBTC | ChainX bridged Bitcoin |
4 | LDOT | Liquid DOT accounts for DOT and staking reward |
Check important figures for a particular loan:
-
liquidation price
: if a collateral price drops to or under theliquidation price
, then the loan is unsafe -
liquidation ratio
: if the collateral ratio of a loan is below this ratio, then the loan is unsafe -
liquidation penalty
: it is applied on top of the debit amount and paid to the liquidator. -
current ratio
: current collateral ratio -
required ratio
: required collateral ratio for borrowing (additional) aUSD, this is usually higher thanliquidation ratio
to maintain a safety vault -
interest rate
: annualized interest rate for the loan, this is indicative of course, as rates are calculated each block
Click the Create Loan
button, follow the prompt to select a collateral type, and the amount of aUSD to generate.
For the aUSD borrowed, you can pay back, and generate more if there is enough collateral. For the collateral asset, you can deposit more (but not immediately generate aUSD), or withdraw available collateral.
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.
For Mandala Test Network
, you can use Polkascan to check transaction details, and perform various queries.