Dynamic fees
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:
dynamicorstatic
How to test:
- Trading assets that support
estimatesmartfeeeg. block/ltc, block/btc, ltc/btc and review tx details, noting fees, and check logs for fee method - 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
estimatesmartfeework 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:
dynamicorstatic
QA build: https://gitlab.com/blocknetdx/blocknet/-/pipelines/368022475
Info on estimatesmartfee: https://blog.litecoin.org/litecoin-core-v0-15-0-1-e3c414ce86ee
This feature needs further discussion and has temporarily been moved to backlog.