Skip to content

elip201: Reduce Elements default dust relay feerate to match min relay feerate #24

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

Merged
merged 4 commits into from
Mar 11, 2025

Conversation

kilrau
Copy link
Contributor

@kilrau kilrau commented Mar 7, 2025

No description provided.

@kilrau kilrau force-pushed the feat/ELIP201 branch 3 times, most recently from c132da9 to 85975cf Compare March 9, 2025 18:51
@kilrau kilrau requested a review from psgreco March 9, 2025 18:56
@delta1
Copy link
Member

delta1 commented Mar 10, 2025

Hi @kilrau, thanks for the submission.

As you note, the "dust limit" for output types is node policy and unrelated to consensus of the network.

The default dustrelayfee rate is 3 sats/vb (3000 sats/kvb) 1.

This only becomes an issue with certain Elements RPCs. As you demonstrated a wallet can trivially create confidential outputs with lower amounts.

In my testing, a confidential WPKH output has a base size of 98 bytes. The function GetDustThreshold then adds a further 67.75 bytes, giving a floored total of 165 bytes. At the default dustrelayfee of 3 sat/vb this gives a dust threshold of 495 sats.

By reducing the dustrelayfee on your node to 0.1 sats/vb (100 sats/kvb), your Elements RPCs can create confidential WPKH outputs with amounts as low as 17 sats ( 165 vb * 0.1 sats/vb rounded up to the next int ).

There is an IsDust check in IsStandardTx 2, but this can only be checked for explicit transactions.

I am not sure this requires an ELIP, personally I'd be happy to accept a PR to Elements reducing the DUST_RELAY_TX_FEE to match the DEFAULT_MIN_RELAY_TX_FEE of 0.1 sats/vb (100 sats/kvb) 3. But if we do want to keep this information in an ELIP then I think it just needs similar motivation as above and titled something like "Reduce default dust relay fee in Elements".

@delta1
Copy link
Member

delta1 commented Mar 10, 2025

@apoelstra what do you think?

@kilrau
Copy link
Contributor Author

kilrau commented Mar 10, 2025

Originally I was tasked to create this ELIP to "have something tangible to track" for the effort to lower the dust limit across the Liquid wallet ecosystem. But I am fine to reduce this to be applicable to Elements-only as proposed by @delta1 or even just close it as in that case prbly all it takes is ElementsProject/elements#1433

@delta1 delta1 changed the title elip201: Dust limit reduction for Confidential Transactions elip201: Reduce Elements default dust relay feerate to match min relay feerate Mar 11, 2025
@delta1
Copy link
Member

delta1 commented Mar 11, 2025

Updated as per the discussion and reference PR

ACK 4be5ce4

@psgreco
Copy link
Contributor

psgreco commented Mar 11, 2025

ACK 4be5ce4

@psgreco psgreco merged commit 7e9bf83 into ElementsProject:main Mar 11, 2025
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

Successfully merging this pull request may close these issues.

3 participants