This proposal introduces updates to the following components:
calculate_provide_liqudity_return_amount
to support non-proportinal liquidity provision.0x1::dex
).update_operator_info
function to modify commission_max_rate
and commission_max_change_rate
via governance.get_module_store
to expose the module store for weight_vote
.vote_with_amount
to enable voting with precise amounts.1. Enable Custom Amount Liquidity Provision
The InitiaDEX (at 0x1::dex
) currently only supports proportional or single-asset liquidity provision. With this update, the contract will support custom (non-proportional) liquidity provision, allowing users to add liquidity to a pool using custom amounts rather than following the standard ratio that matches the current pool asset ratio.
2. VIP Lock Staking Compatibility Fix
The VIP lock staking mechanism requires liquidity to be provided proportionally. However, the new custom liquidity provision feature in 0x1::dex
would allow users to bypass this requirement by staking non-proportional amounts (e.g., providing only INIT when providing liquidity and staking in the INIT-USDC pool).
To preserve the intention of the original VIP lock staking mechanism, this proposal includes a modification to the VIP contract that enforces proportional liquidity provision during VIP lock staking, regardless of the custom amount liquidity provision feature.
3. Misc
Additionally, features such as update_operator_info
and get_module_store
requested by rollup teams are included in this update.
The following contracts will be updated:
0x1::dex
0x3a886b32a802582f2e446e74d4a24d1d7ed01adf46d2a8f65c5723887e708789::operator
0x3a886b32a802582f2e446e74d4a24d1d7ed01adf46d2a8f65c5723887e708789::tvl_manager
0x3a886b32a802582f2e446e74d4a24d1d7ed01adf46d2a8f65c5723887e708789::vip
0x3a886b32a802582f2e446e74d4a24d1d7ed01adf46d2a8f65c5723887e708789::weight_vote
0x3a886b32a802582f2e446e74d4a24d1d7ed01adf46d2a8f65c5723887e708789::lock_staking
Relevant PRs:
Yes
No
No with Veto
Abstain