basilisk
subscan
Runtime Modules / XYK
Spec Version:
Call Functions
Name
Lookup
Parameters
create_pool1e004
add_liquidity1e014
remove_liquidity1e023
sell1e035
buy1e045
Storage Functions
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}}
Constants
Name
Type
Value
NativeAssetIdAssetId0x00000000
GetExchangeFeefee::Fee0x02000000e8030000
MinTradingLimitBalance0xe8030000000000000000000000000000
MinPoolLiquidityBalance0xe8030000000000000000000000000000
MaxInRatiou1280x03000000000000000000000000000000
MaxOutRatiou1280x03000000000000000000000000000000
Error Types
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.
Overflow Overflow