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

Move balancer to a separate package with public API #1621

Open
euonymos opened this issue May 23, 2024 · 1 comment
Open

Move balancer to a separate package with public API #1621

euonymos opened this issue May 23, 2024 · 1 comment

Comments

@euonymos
Copy link
Contributor

Some dApps may need to use specific balancing strategies that cannot be expressed using balancing constraints. In Cardano balancers can utilize different strategies most of which are designed to prevent dust, and they have their pros and cons. One example is a wallet used by a backend service to perform some administrative operations that we want to run in parallel. The ability to provide a custom strategy looks very attractive for cases like that.

@klntsky
Copy link
Member

klntsky commented May 29, 2024

True. There are at least two ways forward I see:

  • do not use CTL's balancer, implement your own. It's actually not that hard, you can repurpose CTL's guts
  • propose an interface for pluggable balancers

I'd vote in favor of decoupling balancer logic from CTL altogether, just like we did with tx builder: https://github.com/mlabs-haskell/purescript-cardano-transaction-builder
however, balancer needs to query both the backend and the wallet, so it's not that easy...

@klntsky klntsky changed the title Plugable balancer strategies Move balancer to a separate package with public API Jul 23, 2024
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

No branches or pull requests

2 participants