The liquidity module contains the following parameters:
Key | Type | Example |
---|---|---|
PoolTypes | []PoolType | [{"id":1,"name":"StandardLiquidityPool","min_reserve_coin_num":2,"max_reserve_coin_num":2,"description":"Standard liquidity pool with pool price function X/Y, ESPM constraint, and two kinds of reserve coins"}] |
MinInitDepositAmount | string (sdk.Int) | "1000000" |
InitPoolCoinMintAmount | string (sdk.Int) | "1000000" |
MaxReserveCoinAmount | string (sdk.Int) | "0" |
PoolCreationFee | sdk.Coins | [{"denom":"stake","amount":"40000000"}] |
SwapFeeRate | string (sdk.Dec) | "0.003000000000000000" |
WithdrawFeeRate | string (sdk.Dec) | "0.000000000000000000" |
MaxOrderAmountRatio | string (sdk.Dec) | "0.100000000000000000" |
UnitBatchHeight | uint32 | 1 |
CircuitBreakerEnabled | bool | false |
List of available PoolType
type PoolType struct {
Id uint32
Name string
MinReserveCoinNum uint32
MaxReserveCoinNum uint32
Description string
}
Minimum number of coins to be deposited to the liquidity pool upon pool creation.
Initial mint amount of pool coin on pool creation.
Limit the size of each liquidity pool. The deposit transaction fails if the total reserve coin amount after the deposit is larger than the reserve coin amount.
The default value of zero means no limit.
Note: Especially in the early phases of liquidity module adoption, set MaxReserveCoinAmount
to a non-zero value to minimize risk on error or exploitation.
Fee paid for to create a LiquidityPool creation. This fee prevents spamming and is collected in in the community pool of the distribution module.
Swap fee rate for every executed swap. When a swap is requested, the swap fee is reserved:
- Half reserved as
OfferCoinFee
- Half reserved as
ExchangedCoinFee
The swap fee is collected when a batch is executed.
Reserve coin withdrawal with less proportion by WithdrawFeeRate
. This fee prevents attack vectors from repeated deposit/withdraw transactions.
Maximum ratio of reserve coins that can be ordered at a swap order.
The smallest unit batch size for every liquidity pool.
The intention of circuit breaker is to have a contingency plan for a running network which maintains network liveness. This parameter enables or disables MsgCreatePool
, MsgDepositWithinBatch
and MsgSwapWithinBatch
message types in liquidity module.
Key | Type | Constant Value |
---|---|---|
CancelOrderLifeSpan | int64 | 0 |
MinReserveCoinNum | uint32 | 2 |
MaxReserveCoinNum | uint32 | 2 |
The life span of swap orders in block heights.
The mininum and maximum number of reserveCoins for PoolType
.