loop
loop copied to clipboard
Config option for defensive fee check for client related sweep transactions
trafficstars
Provide loop with a configuration option that specifies a global defensive fee check for sweep transaction that the client initiates. This should be applicable to any bitcoin transaction the client might publish.
The config option should express the maximum ratio of fees to transaction output amount that is permisable.
A value of 0.05 would denote that the client will only publish transactions with <5% fees of the amount of the transaction itself.
Samples where this option could be used:
https://github.com/lightninglabs/loop/blob/e08d9da6442588fe00d8b7a3e26216dcc6027176/instantout/instantout.go#L174
https://github.com/lightninglabs/loop/blob/e08d9da6442588fe00d8b7a3e26216dcc6027176/loopin.go#L1081