Skip to content
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: stop LPs without refund addresses for both assets from creating orders in a pool (PRO-896) #4099

Merged
merged 3 commits into from Oct 11, 2023

Conversation

AlastairHolmes
Copy link
Contributor

No description provided.

@linear
Copy link

linear bot commented Oct 10, 2023

PRO-896 Pool pallet allows lps to get a balance in an asset that they don't have a refund address for.

This could happen via the creation of a limit order or a one sided range order, in a pair where they have not provided a refund address for one of the assets. When swaps occurs and they collect from their position, it is possible for them to receive the asset they never set a refund address for.

I haven't tested if this is a problem, but it seems likely as the pool and lp pallets don't consider if the refund addresses have been set.

@AlastairHolmes AlastairHolmes enabled auto-merge (squash) October 10, 2023 14:51
@codecov
Copy link

codecov bot commented Oct 11, 2023

Codecov Report

Merging #4099 (705c165) into main (3b72edd) will decrease coverage by 0%.
Report is 4 commits behind head on main.
The diff coverage is 81%.

@@          Coverage Diff          @@
##            main   #4099   +/-   ##
=====================================
- Coverage     71%     71%   -0%     
=====================================
  Files        377     377           
  Lines      60015   60022    +7     
  Branches   60015   60022    +7     
=====================================
+ Hits       42753   42754    +1     
- Misses     15018   15019    +1     
- Partials    2244    2249    +5     
Files Coverage Δ
state-chain/cf-integration-tests/src/swapping.rs 67% <100%> (+1%) ⬆️
state-chain/pallets/cf-pools/src/benchmarking.rs 100% <100%> (ø)
state-chain/traits/src/liquidity.rs 73% <100%> (+11%) ⬆️
state-chain/pallets/cf-pools/src/lib.rs 49% <0%> (-<1%) ⬇️
state-chain/pallets/cf-lp/src/lib.rs 69% <67%> (-1%) ⬇️

... and 18 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@AlastairHolmes AlastairHolmes merged commit be2a946 into main Oct 11, 2023
44 checks passed
@AlastairHolmes AlastairHolmes deleted the fix/refund-address-pools-pallet branch October 11, 2023 13:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants