The Liquidity Protection mechanism introduces 3 new chain parameters as follows:
is_active
to switch on or off the liquidity protection mechanismmax_rowan_liquidity_threshold
to set maximum net amount of Rowan allowed within a day, the threshold can be defined in usdc
or any other token using the second param below. The value should account for the decimal adjustment, for example in the case of usdc
it should includes 6 zeros.max_rowan_liquidity_threshold_asset
to set the asset of the threshold value to use (by default set to cusdc
but can be replaced by cusdt
or any other assets available in our pools). This can also be set to rowan
which results in setting the threshold value in rowan
.epoch_length
should roughly be equal to a day in block time.The mechanism also includes a variable named current_rowan_liquidity_threshold
to keep track of the remaining net amount of Rowan allowed to sell. This variable asset value is specified in the parameter max_rowan_liquidity_threshold_asset
is_active = true
max_rowan_liquidity_threshold = 100000000000
max_rowan_liquidity_threshold_asset = cusdc
epoch_length = 1 day
# Allow to sell a net amount of $100k in Rowan daily
is_active = true
max_rowan_liquidity_threshold = 10000000000
max_rowan_liquidity_threshold_asset = uatom
epoch_length = 10 day
# Allow to sell a net amount of 10k Atom in Rowan every 10 days
is_active = true
max_rowan_liquidity_threshold = 10000000000000000000000000
max_rowan_liquidity_threshold_asset = rowan
epoch_length = 1 day
# Allow to sell a net amount of 10 million of Rowan daily
is_active = false
max_rowan_liquidity_threshold = 10000000000000000000000000
max_rowan_liquidity_threshold_asset = rowan
epoch_length = 1 day
# Allow to sell all the Rowan available in the pool
Lets query the current liquidity protection parameters we can use the following command:
sifnoded q clp liquidity-protection-params \\
--node ${SIFNODE_NODE} \\
--chain-id $SIFNODE_CHAIN_ID
Result:
params:
epoch_length: "14400"
is_active: false
max_rowan_liquidity_threshold: "1000000000"
max_rowan_liquidity_threshold_asset: cusdc
rate_params:
current_rowan_liquidity_threshold: "1000000000"