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

Add change splitting #17

Open
joacohoyos opened this issue Dec 26, 2023 · 2 comments
Open

Add change splitting #17

joacohoyos opened this issue Dec 26, 2023 · 2 comments

Comments

@joacohoyos
Copy link
Contributor

Using lucid does not allow change splitting. This could be problematic sometimse cause you end up pushing all the change to a single UTxO that could lead to contention issues and also is not ideal even when doing transaction chaining as you could avoid long chains if your UTxO are optimized/splitted

@micahkendall
Copy link
Member

Are there CIPs for change splitting or should the users wallet just be reasonably sharded?

@joacohoyos
Copy link
Contributor Author

No it just a requirement we had in jpg back in the day. We try to avoid putting everything into a single utxo.
When creating txs we parametrized the change splitting to something like

ADA_VALUE: 100
MAX_AMOUNT_OF_TOKENS: 20.

So each utxo will have up to 20 tokens and 100 ada. But both values are configurable.

This is what I have in my lucid fork.

export const defaultConfig: Configuration = {
  enableChangeSplitting: true,
  changeCollateral: '5000000',
  changeMinUtxo: '100000000',
  changeNativeAssetChunkSize: 20,
};

This is set when instantiating Tranlucent and then it's used on complete to handle the change

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