helios
helios copied to clipboard
Enhance Coin Selection
Perhaps we can use the Nami Implementation as a basis for this?
https://github.com/berry-pool/nami/blob/main/src/lib/coinSelection.js
Please consider giving this a read and think about maybe implementing something else than Smallest First and Largest First. I am consulting on a project where helios is used and the Coin Selection is resulting in a very large amount of invalid transactions (mainly because of tx size).
https://github.com/cardano-foundation/CIPs/issues/232
The discussion presents a few ways to address this issue with better algorithms
@nicolasayotte thanks for commenting on this.
The largestFirst/smallestFirst coinselection algorithms were implemented provisionally, and more advanced algorithms will be added to the library in the coming months (a project I'm currently working is having similar issues).
Note to all those reading this: the coinselection interface is a mere function type, so custom algorithms can easily be used with the Helios library (eg. wrapping whatever already exists in other libraries)