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

More fee rate sources #278

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

More fee rate sources #278

wants to merge 4 commits into from

Conversation

knocte
Copy link
Member

@knocte knocte commented May 19, 2024

Fixes #272

knocte added 3 commits May 18, 2024 16:57
Just extract some functions to be able to reuse later.
Historically, electrum servers return really shitty (as in, too
expensive) fee rates, so we mitigate this problem by querying
mempool.space API too and calculate the average.
Rather than just having electrumservers and mempool.space API,
let's have a third source of truth.
knocte added a commit that referenced this pull request May 19, 2024
While working on the unit tests for PR 278 [1], I noticed
that when I implemented this function in the stable branch
to calculate the average between 3 values discarding the
outlier, I missed the edge case when the distance between
the highest and the lowest is the same.

So, in this case, let's discard the intermediate (the
intermediate will in the end be the average, but that
is calculated later in the code).

[1] #278
Fee rate estimation in geewallet has always aimed to be high
because we've always aimed to focus on finishing L2 support,
so for channels to be opened/closed we wanted fast conf times.
However, LN development is taking a bit long, and we're now
sometimes facing periods of high-fee environments, so it's
interesting to start working on this feature.

Right now, this refactoring introduces two kinds of priority
but the UX towards the user doesn't change because the wallet
is still configured to choose the highest. This just lays the
groundwork for a future feature.
@knocte knocte force-pushed the wip/moreFeeRateSources branch from 8442358 to f762410 Compare June 10, 2024 16:15
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.

FeeRates proposed by Electrum servers (BTC) are abnormally high
1 participant