Plutonomicon / cardano-transaction-lib

A Purescript library for building smart contract transactions on Cardano
https://plutonomicon.github.io/cardano-transaction-lib/
MIT License
91 stars 52 forks source link

Plugable balancer strategies #1621

Open euonymos opened 1 month ago

euonymos commented 1 month ago

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 commented 1 month ago

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

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...