-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Closed
Labels
featIssue is a featureIssue is a feature
Description
Problem
- Users may have a lot of dust coins
- A transaction can't have more than
Ninputs - When funding a transaction, it may require more than
Ncoins - Users have no way to consolidate their coins
- As a result, they might get stuck
Actionable Items
We need to think about two phases:
- Exporting method utilities for UTXO
splitandconsolidation Provide an automated flow to consolidate coins on the fly during transaction funding/submission- This may be done later, expand the collapsible below for more info.
Automatic UTXO Consolidation
Because UTXO consolidation will use gas, it's tricky to enable it by default.
However, we could..
..offer an extra submission method or add parameters to the existing one.
The idea is to have the flow available, but it should be opt-in.
Here's a first sketch:
---
title: Automatic UTXO Consolidation
theme: dark
---
%%{
init: {
'theme': 'dark'
}
}%%
flowchart TB
Start(Start) --> GetCoins{GetCoins}
GetCoins --> IsEnough[[Is it enough?]]
IsEnough --> Yes(Yes)
IsEnough --> No(No)
Yes --> Submit{Submit}
Submit --> End(End)
No --> HasFreeInputs[[Max Inputs Reached?]]
HasFreeInputs --> FreeYes(Yes)
HasFreeInputs --> FreeNo(No)
FreeNo --> Error(ERROR<br/>Insuf. Balance)
FreeYes --> AutoConsolidate[[Auto consolidate?]]
AutoConsolidate --> AutoNo(No)
AutoConsolidate --> AutoYes(Yes)
AutoYes --> Transfer{Transfer}
Transfer --> GetCoins;
AutoNo --> Error
style Error stroke:#570f43, fill:#570f43, color:#ffffff;
classDef StartEnd stroke:#333, fill:#fff, color:#000;
class Start StartEnd;
class End StartEnd;
classDef Actions stroke:#10375b, fill:#10375b, color:#ffffff;
class Consolidate Actions;
class Submit Actions;
class GetCoins Actions;
class Transfer Actions;
Metadata
Metadata
Assignees
Labels
featIssue is a featureIssue is a feature