-
-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: accepted_assets_conf #498
Conversation
@@ -80,7 +80,7 @@ jq '.app_state.derivatives.params.pool_params.base_lpt_mint_fee = "0.001"' $NODE | |||
jq '.app_state.derivatives.params.pool_params.base_lpt_redeem_fee = "0.001"' $NODE_HOME/config/genesis.json > temp.json ; mv temp.json $NODE_HOME/config/genesis.json; | |||
jq '.app_state.derivatives.params.pool_params.report_liquidation_reward_rate = "0.001"' $NODE_HOME/config/genesis.json > temp.json ; mv temp.json $NODE_HOME/config/genesis.json; | |||
jq '.app_state.derivatives.params.pool_params.report_levy_period_reward_rate = "0.001"' $NODE_HOME/config/genesis.json > temp.json ; mv temp.json $NODE_HOME/config/genesis.json; | |||
jq '.app_state.derivatives.params.pool_params.accepted_assets = [{"denom":"ubtc", "target_weight": "0.6"}, {"denom":"uusdc", "target_weight":"0.4"}]' $NODE_HOME/config/genesis.json > temp.json ; mv temp.json $NODE_HOME/config/genesis.json; | |||
jq '.app_state.derivatives.params.pool_params.accepted_assets_conf = [{"denom":"ubtc", "target_weight": "0.6"}, {"denom":"uusdc", "target_weight":"0.4"}]' $NODE_HOME/config/genesis.json > temp.json ; mv temp.json $NODE_HOME/config/genesis.json; | |||
jq '.app_state.derivatives.params.perpetual_futures.commission_rate = "0.001"' $NODE_HOME/config/genesis.json > temp.json ; mv temp.json $NODE_HOME/config/genesis.json; | |||
jq '.app_state.derivatives.params.perpetual_futures.margin_maintenance_rate = "0.5"' $NODE_HOME/config/genesis.json > temp.json ; mv temp.json $NODE_HOME/config/genesis.json; | |||
jq '.app_state.derivatives.params.perpetual_futures.imaginary_funding_rate_proportional_coefficient = "0.0005"' $NODE_HOME/config/genesis.json > temp.json ; mv temp.json $NODE_HOME/config/genesis.json; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall, the code patch seems to modify the parameters of a derivatives protocol. There are some minor improvements that can be suggested:
- It would be better to have the path to the genesis file as a variable instead of hardcoding it.
- It is a good practice to add comments to explain what each line of the patch is doing.
Regarding potential bug risks, it is difficult to assess without knowing the context and the specifics of the derivatives protocol. However, as long as the modified parameter values are valid and tested, there should not be any immediate bug risk.
$BINARY tx derivatives burn-lpt 1 ubtc --from=$USER1 $conf | jq .raw_log | sed 's/\\n/\n/g' | ||
$BINARY tx derivatives burn-lpt 1 ubtc --from=$USER1 $conf | jq .raw_log | sed 's/\\n/\n/g' | ||
$BINARY tx derivatives withdraw-from-pool 1 ubtc --from=$USER1 $conf | jq .raw_log | sed 's/\\n/\n/g' | ||
$BINARY tx derivatives withdraw-from-pool 1 ubtc --from=$USER1 $conf | jq .raw_log | sed 's/\\n/\n/g' | ||
|
||
# open-position perpetual-futures | ||
$BINARY tx derivatives open-position perpetual-futures 100ubtc ubtc uusdc long --from=$USER1 $conf | jq .raw_log | sed 's/\\n/\n/g' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code patch seems to be replacing the commands for minting and burning LPT with new commands for depositing to and withdrawing from a pool using binaries. It also includes a command for opening a position in perpetual futures. Without knowledge of the system being used, it is difficult to assess if there are any bug risks or improvements that can be suggested. However, make sure to thoroughly test the new commands before deploying them in production.
Fix for
build then lunch