blocknet icon indicating copy to clipboard operation
blocknet copied to clipboard

Dynamic fees

Open shrnkld opened this issue 4 years ago • 2 comments

Scenario:

Right now fee's on BTC and ETH are dynamic, so having a hard-coded value in the config, like we currently have, doesn't work.

Instead, Service Nodes can query the blockchain and get the current fee dynamically, so the counter-parties can do the same and have proper fee values at time of trade execution.

Info: https://developer.bitcoin.org/reference/rpc/estimatesmartfee.html

To do:

  • [ ] implement dynamic fees for wallets that support estimatesmartfee
  • [ ] implement static fallback method for assets that don’t support estimatesmartfee
  • [ ] add logging to show which fee method a tx uses: dynamic or static

How to test:

  1. Trading assets that support estimatesmartfee eg. block/ltc, block/btc, ltc/btc and review tx details, noting fees, and check logs for fee method
  2. trade assets that don’t support estimatesmartfee and check fees are statically generated, and check logs for fee method

QA pass:

to be confirmed…

  • [ ] wallets that support estimatesmartfee work as expected when fee is calculated
  • [ ] implemented static fallback method when an asset doesn't support estimatesmartfee
  • [ ] logging added to show which fee method a tx uses: dynamic or static

QA build: https://gitlab.com/blocknetdx/blocknet/-/pipelines/368022475

shrnkld avatar Jul 19 '21 09:07 shrnkld

Info on estimatesmartfee: https://blog.litecoin.org/litecoin-core-v0-15-0-1-e3c414ce86ee

shrnkld avatar Sep 09 '21 14:09 shrnkld

This feature needs further discussion and has temporarily been moved to backlog.

shrnkld avatar Oct 04 '21 07:10 shrnkld