subscan
Runtime Modules / CdpEngine
Spec Version:
Call Functions
Name
Lookup
Parameters
liquidate68002
settle68012
set_global_params68021
set_collateral_params68036
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"]
GlobalInterestRatePerSecUpdated6808["Rate"]
Storage Functions
Name
Type
DebitExchangeRate{"origin":"Map","n_map_type":{"hashers":["Twox64Concat"],"key_vec":["acala_primitives:currency:CurrencyId"],"value":"U128","keys_id":44,"value_id":57}}
GlobalInterestRatePerSec{"origin":"PlainType","plain_type":"U128","PlainTypeValue":57}
CollateralParams{"origin":"Map","n_map_type":{"hashers":["Twox64Concat"],"key_vec":["acala_primitives:currency:CurrencyId"],"value":"module_cdp_engine:RiskManagementParams","keys_id":44,"value_id":519}}
LastAccumulationSecs{"origin":"PlainType","plain_type":"U64","PlainTypeValue":8}
Constants
Name
Type
Value
CollateralCurrencyIdsVec<acala_primitives:currency:CurrencyId>100082008300800300000000
DefaultLiquidationRatioU1280000167b0d12d1140000000000000000
DefaultDebitExchangeRateU12800008a5d784563010000000000000000
DefaultLiquidationPenaltyU1280000087e93371c010000000000000000
MinimumDebitValueU12800203d88792d00000000000000000000
GetStableCurrencyIdacala_primitives:currency:CurrencyId0081
MaxSwapSlippageCompareToOracleU12800004f8c34e814020000000000000000
UnsignedPriorityU6418ecab75a40d0000
AlternativeSwapPathJointListVec<Vec<acala_primitives:currency:CurrencyId>>08040082040083
Error Types
Name
Docs
ExceedDebitValueHardCapThe total debit value of specific collateral type already exceed thehard cap
BelowRequiredCollateralRatioThe collateral ratio below the required collateral ratio
BelowLiquidationRatioThe collateral ratio below the liquidation ratio
MustBeUnsafeThe CDP must be unsafe status
MustBeSafeThe CDP must be safe status
InvalidCollateralTypeInvalid collateral type
RemainDebitValueTooSmallRemain debit value in CDP below the dust amount
InvalidFeedPriceFeed price is invalid
NoDebitValueNo debit value in CDP so that it cannot be settled
AlreadyShutdownSystem has already been shutdown
MustAfterShutdownMust after system shutdown
CannotSwapCannot swap
CollateralNotEnoughCollateral in CDP is not enough
NotEnoughDebitDecrementdebit value decrement is not enough
ConvertDebitBalanceFailedconvert debit value to debit balance failed