btcpayserver / btcTransmuter

A self-hosted ,modular IFTTT-inspired system for bitcoin services written in C#
https://btcpayserver.org
77 stars 22 forks source link

Unable to use On-Chain forwarder when there is a dust transaction in the wallet #82

Open erikmollink opened 3 years ago

erikmollink commented 3 years ago

I use the On-Chain forwarder preset recipe so send the complete internal BTCPay internal wallet balance to another address when the balance is > 0.

Last night we had a transaction from Woocommerce which included a transaction for 0.00000547 BTC, probably originating from memo.sv looking at the transaction on the blockchain: https://blockstream.info/tx/a8f80340068ddc981f6525b74b845c25f59d7eeeb341a5cf70dfb886e9599567

Since this transaction, the forwarder does not work anymore. the logs is filled with the message "Not enough funds to cover the target with missing amount 0.00000547". Even after new transactions, which made the balance well over 0.1 BTC, it is still saying that there are "Not enough funds to cover the target with missing amount 0.00000547".

I tried to alter the manual fee of 100sat/bytes to even 1sat/byte and played with the percentage, but it keeps giving me this error. Current settings for the Transaction Action is: Amount: {{TriggerData.Balance.ToDecimal(MoneyUnit.BTC) * (100/100)}} Destination Address: {{ActionData0}} (coming from the Generated_PaymentForwarder_BTC_Dest_Wallet_external service) Substract fees from this output: Checked Fee settings: Fee rate of 100 sat per byte.

I was not even able to manually send the funds from the internal wallet, as it gave me the same error. Eventually I was able to get rid of the 0.00000547 dust by leaving just a very small bit in the wallet and send it with 1sat/byte.

How to cope with the dust? Why is this all happening?