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

[feature request]:use electrum server for fee rate estimation #33

Open
YusukeShimizu opened this issue May 22, 2024 · 3 comments
Open

Comments

@YusukeShimizu
Copy link
Contributor

YusukeShimizu commented May 22, 2024

The fee rate appears to be a fixed value if not specified, such as send rpc.
I would like to request to use the electrum/electrs blockchain.estimatefee for a fee rate estimate.

Also, it would be nice if it could be considered the confidential transaction discounts.
ElementsProject/elements#1317

Steps to reproduce

My understand is that the fee used in the following commands is a fixed value.

lwk_cli wallet send --wallet w1 --recipient tlq1qqwe0a3dp3hce866snkll5vq244n47ph5zy2xr330uc8wkrvc0whwsvw4w67xksmfyxwqdyrykp0tsxzsm24mqm994pfy4f6lg:1000:144c654344aa716d6f3abcc1ca90e5641e4e2a7f633bc09fe3baf64585819a49

Additional Context

As far as I have checked the code, the fee_rate is set to 100.0.

fee_rate: 100.0,

This is a feature that I thought would be nice to have in the implementation to make lwk available in peerswap.
Now, we call directly on electrs' estimate fee.
ElementsProject/peerswap#288

@LeoComandini
Copy link
Contributor

Hi @YusukeShimizu

That value above is the default value for fee rate.

We allow to change it with --fee-rate:

$ lwk_cli wallet send --help
Create an unsigned transaction (PSET)

Usage: lwk_cli wallet send [OPTIONS] --wallet <WALLET> --recipient <RECIPIENT>

Options:
  -w, --wallet <WALLET>
          Wallet name
          
          [env: WALLET=]

      --recipient <RECIPIENT>
          Specify a recipient in the form "address:satoshi:asset_id"
          
          Can be specified multiple times.
          
          Address can either be a valid address or "burn" if you want to burn the asset, i.e. create a provably unspendable output.

      --fee-rate <FEE_RATE>
          Fee rate to use

confidential transaction discounts

We will default to that once that is live in the default electrum servers.

So for most users it will be a transparent change.

In the meantime, or for users that want to set a different fee rate, they can use --fee-rate.

We will add utils for fee estimation, but that's currently not a priority since there is no fee market on Liquid.

@YusukeShimizu
Copy link
Contributor Author

Thank you for your answer.
I understand.

@wtogami
Copy link

wtogami commented May 23, 2024

I think the request is misunderstood.

Elements wallet is able to ask its own node for an estimate of the current fee based upon the mempool.
LWK clients are not able to estimate on their own. They need to ask the server. The server should have an elementsd in the backend. All I'm asking here is for a way to pass through the server's estimate so LWK clients can make decisions as needed.

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

3 participants