Name | Lookup | Parameters | |
|---|---|---|---|
| add_token | 3b01 | 4 | |
| add_liquidity | 3b02 | 2 | |
| add_liquidity_with_limit | 3b0d | 3 | |
| remove_liquidity | 3b03 | 2 | |
| remove_liquidity_with_limit | 3b0e | 3 | |
| sacrifice_position | 3b04 | 1 | |
| sell | 3b05 | 4 | |
| buy | 3b06 | 4 | |
| set_asset_tradable_state | 3b07 | 2 | |
| refund_refused_asset | 3b08 | 3 | |
| set_asset_weight_cap | 3b09 | 2 | |
| withdraw_protocol_liquidity | 3b0b | 4 | |
| remove_token | 3b0c | 2 |
Name | Lookup | Attributes | |
|---|---|---|---|
| TokenAdded | 3b00 | ["AssetId","Balance","Price"] | |
| TokenRemoved | 3b01 | ["AssetId","Balance","Balance"] | |
| LiquidityAdded | 3b02 | ["AccountId","AssetId","Balance","PositionItemId"] | |
| LiquidityRemoved | 3b03 | ["AccountId","PositionItemId","AssetId","Balance","FixedU128"] | |
| ProtocolLiquidityRemoved | 3b04 | ["AccountId","AssetId","Balance","Balance","Balance"] | |
| SellExecuted | 3b05 | ["AccountId","AssetId","AssetId","Balance","Balance","Balance","Balance","Balance","Balance"] | |
| BuyExecuted | 3b06 | ["AccountId","AssetId","AssetId","Balance","Balance","Balance","Balance","Balance","Balance"] | |
| PositionCreated | 3b07 | ["PositionItemId","AccountId","AssetId","Balance","Balance","Price"] | |
| PositionDestroyed | 3b08 | ["PositionItemId","AccountId"] | |
| PositionUpdated | 3b09 | ["PositionItemId","AccountId","AssetId","Balance","Balance","Price"] | |
| TradableStateUpdated | 3b0a | ["AssetId","Tradability"] | |
| AssetRefunded | 3b0b | ["AssetId","Balance","AccountId"] | |
| AssetWeightCapUpdated | 3b0c | ["AssetId","Permill"] |
Name | Type | |
|---|---|---|
| Assets | {"origin":"Map","n_map_type":{"hashers":["Blake2_128Concat"],"key_vec":["U32"],"value":"pallet_omnipool:types:AssetState","keys_id":4,"value_id":630}} | |
| HubAssetTradability | {"origin":"PlainType","plain_type":"U8","PlainTypeValue":201} | |
| Positions | {"origin":"Map","n_map_type":{"hashers":["Blake2_128Concat"],"key_vec":["U128"],"value":"pallet_omnipool:types:Position","keys_id":6,"value_id":631}} | |
| NextPositionId | {"origin":"PlainType","plain_type":"U128","PlainTypeValue":6} |
Name | Type | Value | |
|---|---|---|---|
| HdxAssetId | U32 | 00000000 | |
| HubAssetId | U32 | 01000000 | |
| MinWithdrawalFee | U32 | 64000000 | |
| MinimumTradingLimit | U128 | e8030000000000000000000000000000 | |
| MinimumPoolLiquidity | U128 | 40420f00000000000000000000000000 | |
| MaxInRatio | U128 | 03000000000000000000000000000000 | |
| MaxOutRatio | U128 | 03000000000000000000000000000000 | |
| NFTCollectionId | U128 | 39050000000000000000000000000000 | |
| BurnProtocolFee | U32 | 20a10700 |
Name | Docs |
|---|---|
| InsufficientBalance | Balance too low |
| AssetAlreadyAdded | Asset is already in omnipool |
| AssetNotFound | Asset is not in omnipool |
| MissingBalance | Failed to add token to Omnipool due to insufficient initial liquidity. |
| InvalidInitialAssetPrice | Invalid initial asset price. |
| BuyLimitNotReached | Slippage protection - minimum limit has not been reached. |
| SellLimitExceeded | Slippage protection - maximum limit has been exceeded. |
| PositionNotFound | Position has not been found. |
| InsufficientShares | Insufficient shares in position |
| NotAllowed | Asset is not allowed to be traded. |
| Forbidden | Signed account is not owner of position instance. |
| AssetWeightCapExceeded | Asset weight cap has been exceeded. |
| AssetNotRegistered | Asset is not registered in asset registry |
| InsufficientLiquidity | Provided liquidity is below minimum allowed limit |
| InsufficientTradingAmount | Traded amount is below minimum allowed limit |
| SameAssetTradeNotAllowed | Sell or buy with same asset ids is not allowed. |
| HubAssetUpdateError | LRNA update after trade results in positive value. |
| InvalidSharesAmount | Amount of shares provided cannot be 0. |
| InvalidHubAssetTradableState | Hub asset is only allowed to be sold. |
| AssetRefundNotAllowed | Asset is not allowed to be refunded. |
| MaxOutRatioExceeded | Max fraction of asset to buy has been exceeded. |
| MaxInRatioExceeded | Max fraction of asset to sell has been exceeded. |
| PriceDifferenceTooHigh | Max allowed price difference has been exceeded. |
| InvalidOraclePrice | Invalid oracle price - division by zero. |
| InvalidWithdrawalFee | Failed to calculate withdrawal fee. |
| FeeOverdraft | More than allowed amount of fee has been transferred. |
| SharesRemaining | Token cannot be removed from Omnipool due to shares still owned by other users. |
| AssetNotFrozen | Token cannot be removed from Omnipool because asset is not frozen. |
| ZeroAmountOut | Calculated amount out from sell trade is zero. |
| ExistentialDepositNotAvailable | Existential deposit of asset is not available. |
| SlippageLimit | Slippage protection |
| ProtocolFeeNotConsumed | Extra protocol fee has not been consumed. |