White-Whale-Defi-Platform / white-whale-core

Core contracts for White Whale, The Interchain Liquidity Protocol for the Cosmos.
https://whitewhale.money
MIT License
36 stars 23 forks source link

feat: single-side liquidity provision #345

Closed kerber0x closed 5 months ago

kerber0x commented 5 months ago

Description and Motivation

Enables single-side liquidity provision. Closes #310

Related Issues


Checklist:

codecov[bot] commented 5 months ago

Codecov Report

Attention: Patch coverage is 96.77996% with 18 lines in your changes are missing coverage. Please review.

Project coverage is 90.08%. Comparing base (deebeee) to head (5f5b6a8). Report is 4 commits behind head on release/v2_contracts.

Files Patch % Lines
...quidity_hub/pool-manager/src/liquidity/commands.rs 93.44% 8 Missing :warning:
...ty_hub/pool-manager/src/tests/integration_tests.rs 98.92% 4 Missing :warning:
...ontracts/liquidity_hub/pool-manager/src/helpers.rs 76.92% 3 Missing :warning:
...ts/liquidity_hub/pool-manager/src/swap/commands.rs 77.77% 2 Missing :warning:
...ntracts/liquidity_hub/pool-manager/src/contract.rs 95.83% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## release/v2_contracts #345 +/- ## ======================================================== + Coverage 89.86% 90.08% +0.21% ======================================================== Files 261 261 Lines 27339 27784 +445 ======================================================== + Hits 24569 25029 +460 + Misses 2770 2755 -15 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

0xFable commented 5 months ago

I like this implementation but on second view it looks like Osmosis does do a swap before provision rather than only providing to one side. Additionally looks like Wynd did that too. The behaviour of single provision and only providing to one side is similar to Uniswap. Do we want maybe to add an option to do the swap? https://medium.com/osmosis-community-updates/single-asset-lp-67fb48abce53

kerber0x commented 5 months ago

I like this implementation but on second view it looks like Osmosis does do a swap before provision rather than only providing to one side. Additionally looks like Wynd did that too. The behaviour of single provision and only providing to one side is similar to Uniswap. Do we want maybe to add an option to do the swap? https://medium.com/osmosis-community-updates/single-asset-lp-67fb48abce53

Good point. Let's explore doing it this way.

github-actions[bot] commented 5 months ago

Schema generation had missing jobs:

contracts/liquidity_hub/pool-manager/schema/pool-manager.json
contracts/liquidity_hub/pool-manager/schema/raw/execute.json

Please run just schemas locally and upload the generated schemas.

github-actions[bot] commented 5 months ago

Schema generation had missing jobs:

contracts/liquidity_hub/pool-manager/schema/pool-manager.json
contracts/liquidity_hub/pool-manager/schema/raw/execute.json

Please run just schemas locally and upload the generated schemas.