Name | Lookup | Parameters | |
---|---|---|---|
create_pool | 4a00 | 4 | |
add_liquidity | 4a01 | 4 | |
remove_liquidity | 4a02 | 3 | |
sell | 4a03 | 5 | |
buy | 4a04 | 5 |
Name | Lookup | Attributes | |
---|---|---|---|
LiquidityAdded | 4a00 | ["AccountId","AssetId","AssetId","Balance","Balance"] | |
LiquidityRemoved | 4a01 | ["AccountId","AssetId","AssetId","Balance"] | |
PoolCreated | 4a02 | ["AccountId","AssetId","AssetId","Balance","AssetId","AccountId"] | |
PoolDestroyed | 4a03 | ["AccountId","AssetId","AssetId","AssetId","AccountId"] | |
SellExecuted | 4a04 | ["AccountId","AssetId","AssetId","Balance","Balance","AssetId","Balance","AccountId"] | |
BuyExecuted | 4a05 | ["AccountId","AssetId","AssetId","Balance","Balance","AssetId","Balance","AccountId"] |
Name | Type | |
---|---|---|
ShareToken | {"origin":"Map","n_map_type":{"hashers":["Blake2_128Concat"],"key_vec":["AccountId"],"value":"U32","keys_id":0,"value_id":4}} | |
TotalLiquidity | {"origin":"Map","n_map_type":{"hashers":["Blake2_128Concat"],"key_vec":["AccountId"],"value":"U128","keys_id":0,"value_id":6}} | |
PoolAssets | {"origin":"Map","n_map_type":{"hashers":["Blake2_128Concat"],"key_vec":["AccountId"],"value":"Tuple:U32U32","keys_id":0,"value_id":95}} |
Name | Type | Value | |
---|---|---|---|
NativeAssetId | U32 | 00000000 | |
GetExchangeFee | Tuple:U32U32 | 03000000e8030000 | |
MinTradingLimit | U128 | e8030000000000000000000000000000 | |
MinPoolLiquidity | U128 | 40420f00000000000000000000000000 | |
MaxInRatio | U128 | 03000000000000000000000000000000 | |
MaxOutRatio | U128 | 03000000000000000000000000000000 | |
OracleSource | [U8; 8] | 687964726178796b |
Name | Docs |
---|---|
CannotCreatePoolWithSameAssets | It is not allowed to create a pool between same assets. |
InsufficientLiquidity | Liquidity has not reached the required minimum. |
InsufficientTradingAmount | Amount is less than min trading limit. |
ZeroLiquidity | Liquidity is zero. |
ZeroInitialPrice | It is not allowed to create a pool with zero initial price.Not used, kept for backward compatibility |
CreatePoolAssetAmountInvalid | OverflowNot used, kept for backward compatibility |
InvalidMintedLiquidity | Overflow |
InvalidLiquidityAmount | Overflow |
AssetAmountExceededLimit | Asset amount has exceeded given limit. |
AssetAmountNotReachedLimit | Asset amount has not reached given limit. |
InsufficientAssetBalance | Asset balance is not sufficient. |
InsufficientPoolAssetBalance | Not enough asset liquidity in the pool. |
InsufficientNativeCurrencyBalance | Not enough core asset liquidity in the pool. |
TokenPoolNotFound | Liquidity pool for given assets does not exist. |
TokenPoolAlreadyExists | Liquidity pool for given assets already exists. |
AddAssetAmountInvalid | Overflow |
RemoveAssetAmountInvalid | Overflow |
SellAssetAmountInvalid | Overflow |
BuyAssetAmountInvalid | Overflow |
FeeAmountInvalid | Overflow |
CannotApplyDiscount | Overflow |
MaxOutRatioExceeded | Max fraction of pool to buy in single transaction has been exceeded. |
MaxInRatioExceeded | Max fraction of pool to sell in single transaction has been exceeded. |
Overflow | Overflow |
CannotCreatePool | Pool cannot be created due to outside factors. |