subscan
Runtime Modules / Omnipool
Spec Version:
Events
Name
Lookup
Attributes
TokenAdded3b00["AssetId","Balance","Price"]
TokenRemoved3b01["AssetId","Balance","Balance"]
LiquidityAdded3b02["AccountId","AssetId","Balance","PositionItemId"]
LiquidityRemoved3b03["AccountId","PositionItemId","AssetId","Balance","FixedU128"]
ProtocolLiquidityRemoved3b04["AccountId","AssetId","Balance","Balance","Balance"]
SellExecuted3b05["AccountId","AssetId","AssetId","Balance","Balance","Balance","Balance","Balance","Balance"]
BuyExecuted3b06["AccountId","AssetId","AssetId","Balance","Balance","Balance","Balance","Balance","Balance"]
PositionCreated3b07["PositionItemId","AccountId","AssetId","Balance","Balance","Price"]
PositionDestroyed3b08["PositionItemId","AccountId"]
PositionUpdated3b09["PositionItemId","AccountId","AssetId","Balance","Balance","Price"]
TradableStateUpdated3b0a["AssetId","Tradability"]
AssetRefunded3b0b["AssetId","Balance","AccountId"]
AssetWeightCapUpdated3b0c["AssetId","Permill"]
Storage Functions
Name
Type
Assets{"origin":"Map","n_map_type":{"hashers":["Blake2_128Concat"],"key_vec":["U32"],"value":"pallet_omnipool:types:AssetState","keys_id":4,"value_id":493}}
HubAssetImbalance{"origin":"PlainType","plain_type":"pallet_omnipool:types:SimpleImbalance","PlainTypeValue":494}
HubAssetTradability{"origin":"PlainType","plain_type":"U8","PlainTypeValue":84}
Positions{"origin":"Map","n_map_type":{"hashers":["Blake2_128Concat"],"key_vec":["U128"],"value":"pallet_omnipool:types:Position","keys_id":6,"value_id":495}}
NextPositionId{"origin":"PlainType","plain_type":"U128","PlainTypeValue":6}
Constants
Name
Type
Value
HdxAssetIdU3200000000
HubAssetIdU3201000000
MinWithdrawalFeeU3264000000
MinimumTradingLimitU128e8030000000000000000000000000000
MinimumPoolLiquidityU12840420f00000000000000000000000000
MaxInRatioU12803000000000000000000000000000000
MaxOutRatioU12803000000000000000000000000000000
NFTCollectionIdU12839050000000000000000000000000000
Error Types
Name
Docs
InsufficientBalanceBalance too low
AssetAlreadyAddedAsset is already in omnipool
AssetNotFoundAsset is not in omnipool
MissingBalanceFailed to add token to Omnipool due to insufficient initial liquidity.
InvalidInitialAssetPriceInvalid initial asset price.
BuyLimitNotReachedSlippage protection - minimum limit has not been reached.
SellLimitExceededSlippage protection - maximum limit has been exceeded.
PositionNotFoundPosition has not been found.
InsufficientSharesInsufficient shares in position
NotAllowedAsset is not allowed to be traded.
ForbiddenSigned account is not owner of position instance.
AssetWeightCapExceededAsset weight cap has been exceeded.
AssetNotRegisteredAsset is not registered in asset registry
InsufficientLiquidityProvided liquidity is below minimum allowed limit
InsufficientTradingAmountTraded amount is below minimum allowed limit
SameAssetTradeNotAllowedSell or buy with same asset ids is not allowed.
HubAssetUpdateErrorLRNA update after trade results in positive value.
PositiveImbalanceImbalance results in positive value.
InvalidSharesAmountAmount of shares provided cannot be 0.
InvalidHubAssetTradableStateHub asset is only allowed to be sold.
AssetRefundNotAllowedAsset is not allowed to be refunded.
MaxOutRatioExceededMax fraction of asset to buy has been exceeded.
MaxInRatioExceededMax fraction of asset to sell has been exceeded.
PriceDifferenceTooHighMax allowed price difference has been exceeded.
InvalidOraclePriceInvalid oracle price - division by zero.
InvalidWithdrawalFeeFailed to calculate withdrawal fee.
FeeOverdraftMore than allowed amount of fee has been transferred.
SharesRemainingToken cannot be removed from Omnipool due to shares still owned by other users.
AssetNotFrozenToken cannot be removed from Omnipool because asset is not frozen.
ZeroAmountOutCalculated amount out from sell trade is zero.