@polkadot/api
along with @acala-network/api
. You can learn more about @polkadot/api
[here]. (https://polkadot.js.org/docs/api).collateral
and amount of minted stablecoin as debit
for specific collateral type and account.Note⚠debit
reflects the only amount of minted kUSD. The amount of debt is higher as it includes accumulated interest. To calculate the total amount to payback you need to usedebitExchangeRate
parameter (the example for fetchingdebitExchangeRate
is shown below).
collateral
and amount of borrowed stablecoin as debit
for specific collateral type.globalInterestRatePerSec
to calculate the debtSEED_PHRASE
environment variable defined in your .env
file.honzon.adjustLoan
Notethe supply amount should be denormalised with KAR decimals for this example⚠
to
).Extrinsic
type that should be signed with a private key.to
). This method can be used to decline previously given permission.Extrinsic
type that should be signed with a private key.Extrinsic
type that should be signed with a private key.authorize
was called previously by from
account).Extrinsic
type that should be signed with a private key.adjustLoan
, but there is a shortcut created for this purpose which is applied only to safe vaults (where the collateral ratio is above liquidation level) and where the debt amount is positive.Extrinsic
type that should be signed with a private key.