Name | Lookup | Parameters | |
|---|---|---|---|
| create_pool | 1e00 | 4 | |
| add_liquidity | 1e01 | 4 | |
| remove_liquidity | 1e02 | 3 | |
| sell | 1e03 | 5 | |
| buy | 1e04 | 5 |
Name | Lookup | Attributes | |
|---|---|---|---|
| LiquidityAdded | 1e00 | ||
| LiquidityRemoved | 1e01 | ||
| PoolCreated | 1e02 | ||
| PoolDestroyed | 1e03 | ||
| SellExecuted | 1e04 | ||
| BuyExecuted | 1e05 |
Name | Type | |
|---|---|---|
| ShareToken | {"origin":"MapType","map_type":{"key":"AccountId","hasher":"Blake2_128Concat","value":"AssetId","isLinked":false}} | |
| TotalLiquidity | {"origin":"MapType","map_type":{"key":"AccountId","hasher":"Blake2_128Concat","value":"Balance","isLinked":false}} | |
| PoolAssets | {"origin":"MapType","map_type":{"key":"AccountId","hasher":"Blake2_128Concat","value":"(AssetId, AssetId)","isLinked":false}} |
Name | Type | Value | |
|---|---|---|---|
| NativeAssetId | AssetId | 0x00000000 | |
| GetExchangeFee | fee::Fee | 0x02000000e8030000 |
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. |
| CreatePoolAssetAmountInvalid | Overflow |
| 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. |