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(transfer): update liquidity policy #2386

Merged
merged 1 commit into from
Dec 10, 2024
Merged

fix(transfer): update liquidity policy #2386

merged 1 commit into from
Dec 10, 2024

Conversation

pwltr
Copy link
Collaborator

@pwltr pwltr commented Dec 5, 2024

Description

  • update LSP channel balances according to new policy
  • show split network and service fees for CJIT

Linked Issues/Tasks

Closes #1856 #2054 #2379

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Refactoring (improving code without creating new functionality)

Tests

  • Detox test
  • Unit test
  • No test

QA Notes

  • although we decided to remove the minimum for the LSP balance there is still a technical minimum required for LDK of 2% of total channel size, so it cannot be 0
  • there's also required minimum channel size from blocktank (currently 20k sats on production), in some cases more is added on the LSP side to fulfill this requirement
  • we still subtract a buffer of 2% of the maximum channel size from blocktank to account for exchange rate fluctuation
  • there is still a 80% cap on the max client balance to account for onchain fees
  • sometimes you have to add/subtract the reserve balance (1%) for channel balances to get the numbers you expect
  • currently there is an issue where CJIT "you will receive" amount is wrong

Copy link

socket-security bot commented Dec 5, 2024

New and removed dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher
npm/@synonymdev/[email protected] None 0 84.7 kB sebubu

🚮 Removed packages: npm/@synonymdev/[email protected]

View full report↗︎

@pwltr pwltr force-pushed the fix/lsp-policy branch 2 times, most recently from a6cd7ff to e72eb8e Compare December 5, 2024 15:37
@pwltr pwltr requested a review from limpbrains as a code owner December 5, 2024 15:37
@limpbrains
Copy link
Collaborator

Why don't we implement a test for the new logic? Or is it so simple that we don't need this?

@pwltr
Copy link
Collaborator Author

pwltr commented Dec 6, 2024

Why don't we implement a test for the new logic? Or is it so simple that we don't need this?

Yes we do want tests, currently QA is making sure that I implemented the spec correctly. Not going to merge this yet.

@pwltr pwltr force-pushed the fix/lsp-policy branch 3 times, most recently from e0a32b5 to 9509432 Compare December 9, 2024 14:35
@pwltr pwltr merged commit 37dd5ad into master Dec 10, 2024
7 checks passed
@pwltr pwltr deleted the fix/lsp-policy branch December 10, 2024 14:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants