Closed chappjc closed 1 year ago
Although it gets trickier because ETH's FeeRate()
method is based on the baseRate * 2 + tip
formula used to set a recommended max fee rate for a transaction. However, if we're interested in an estimate of what the swap fees are likely to be, that's almost double.
Using c.feeSuggestion
is fine for utxo assets, but is obviously wrong for eth, since server always just reports maxfeerate. We could use c.feeSuggestionAny
. It's just an estimate. Or we could ignore the FeeSuggestion
in PreSwap
and MaxOrder
and use baseRate + tip
.
Let's have at least PreSwap
ignore the input and use base + tip it has internally.
For some reason I have
PreOrder
doing this: https://github.com/decred/dcrdex/blob/998ddd23602f7bf67c9fef5050cf6c0d44ccba26/client/core/core.go#L5221-L5226That is,
c.feeSuggestion
instead ofc.feeSuggestionAny
, which would ask the wallet. The comment saysserver rates only for the swap init
, but this is an estimate and shouldn't it be realistic?