Closed ALPAC-4 closed 4 months ago
In the stableswap.move
module of the initia_std
package, several enhancements have been made. Key changes include updates to the ProvideEvent
and WithdrawEvent
structs, the addition of new constants, and significant modifications to various functions. New functions for liquidity withdrawal and calculations have been introduced, along with additional tests to ensure the correctness of these updates.
File | Change Summary |
---|---|
precompile/modules/initia_stdlib/sources/... |
Updates to ProvideEvent and WithdrawEvent structs to include fee_amounts . |
precompile/modules/initia_stdlib/sources/... |
Introduced a new constant EMAX_LIQUIDITY with a value of 21. |
precompile/modules/initia_stdlib/sources/... |
Adjusted get_pool and end_to_end function signatures. |
precompile/modules/initia_stdlib/sources/... |
Enhanced the swap_simulation function for better handling of amounts and fees. |
precompile/modules/initia_stdlib/sources/... |
Introduced new functions: single_asset_withdraw_liquidity_script , single_asset_withdraw_liquidity , and additional test functions. |
precompile/modules/initia_stdlib/sources/... |
Added calculation-specific functions: calc_withdraw_one_coin , calc_withdraw_imbalance , get_y_with_given_d , and swap_simulation_with_given_amounts . |
Amidst the code where logic weaves,
New wonders grow like summer leaves.
Swaps and yields now clear and bright,
Liquidity flows just right.
A rabbit hops in fields of code,
Embracing changes, on we rode.
🌿✨🚀
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
New features
imbalance_withdraw_liquidity_script
: withdraw liquidity with custom amounts of coins.single_asset_withdraw_liquidity_script
: withdraw function that withdraws only one type of coin.Update
Fix
Summary by CodeRabbit
New Features
ProvideEvent
andWithdrawEvent
to include detailed fee amounts.EMAX_LIQUIDITY
for improved liquidity management.Improvements
swap_simulation
for better fee and amount handling.Tests