subscan
Runtime Modules / CdpEngine
Spec Version:
Call Functions
Name
Lookup
Parameters
liquidate68002
settle68012
set_collateral_params68026
Events
Name
Lookup
Attributes
LiquidateUnsafeCDP6800["CurrencyId","AccountId","Balance","Balance","Balance"]
SettleCDPInDebit6801["CurrencyId","AccountId"]
CloseCDPInDebitByDEX6802["CurrencyId","AccountId","Balance","Balance","Balance"]
InterestRatePerSecUpdated6803["CurrencyId","Option<Rate>"]
LiquidationRatioUpdated6804["CurrencyId","Option<Ratio>"]
LiquidationPenaltyUpdated6805["CurrencyId","Option<Rate>"]
RequiredCollateralRatioUpdated6806["CurrencyId","Option<Ratio>"]
MaximumTotalDebitValueUpdated6807["CurrencyId","Balance"]
Storage Functions
Name
Type
DebitExchangeRate{"origin":"Map","n_map_type":{"hashers":["Twox64Concat"],"key_vec":["acala_primitives:currency:CurrencyId"],"value":"U128","keys_id":50,"value_id":60}}
CollateralParams{"origin":"Map","n_map_type":{"hashers":["Twox64Concat"],"key_vec":["acala_primitives:currency:CurrencyId"],"value":"module_cdp_engine:RiskManagementParams","keys_id":50,"value_id":540}}
LastAccumulationSecs{"origin":"PlainType","plain_type":"U64","PlainTypeValue":8}
Constants
Name
Type
Value
DefaultLiquidationRatioU1280000167b0d12d1140000000000000000
DefaultDebitExchangeRateU12800008a5d784563010000000000000000
DefaultLiquidationPenaltyU1280000087e93371c010000000000000000
MinimumDebitValueU12800203d88792d00000000000000000000
GetStableCurrencyIdacala_primitives:currency:CurrencyId0001
MaxSwapSlippageCompareToOracleU12800004f8c34e814020000000000000000
UnsignedPriorityU6418ecab75a40d0000
Error Types
Name
Docs
ExceedDebitValueHardCap
BelowRequiredCollateralRatio
BelowLiquidationRatio
MustBeUnsafe
MustBeSafe
InvalidCollateralType
RemainDebitValueTooSmall
CollateralAmountBelowMinimum
InvalidFeedPrice
NoDebitValue
AlreadyShutdown
MustAfterShutdown
CollateralNotEnough
NotEnoughDebitDecrement
ConvertDebitBalanceFailed